/* =========================================================================
   Advanced Wallboard — design system
   Pure CSS. No framework.
   ========================================================================= */

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* palette */
  --aw-ink:    #0B141F;
  --aw-navy:   #212C35;
  --aw-navy-2: #35394C;
  --aw-sky:    #1585D4;
  --aw-sky-d:  #0E6BAE;
  --aw-mist:   #E6EDF2;
  --aw-mist-2: #C6D2DC;
  --aw-paper:  #FFFFFF;
  --aw-muted:  #95A3B3;
  --aw-rule:   rgba(255,255,255,0.08);
  --aw-rule-2: rgba(255,255,255,0.16);
  --aw-overlay: rgba(11,20,31,0.72);
  --aw-overlay-soft: linear-gradient(180deg, rgba(33,44,53,0.35) 0%, rgba(11,20,31,0.85) 100%);

  /* type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* layout */
  --container: 1200px;
  --container-narrow: 880px;
  --gutter: clamp(1.25rem, 3vw, 2rem);
  --section: clamp(4rem, 8vw, 7rem);

  /* radius */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 12px;
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; }

/* --- Base ---------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--aw-ink);
  background: var(--aw-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; color: inherit; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; font-weight: 500; }

p, li { font-size: 1rem; line-height: 1.65; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--aw-navy-2); }

a { text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--aw-sky); }

::selection { background: var(--aw-sky); color: white; }

/* --- Layout primitives --------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--ink   { background: var(--aw-ink); color: var(--aw-mist); }
.section--navy  { background: var(--aw-navy); color: var(--aw-mist); }
.section--mist  { background: var(--aw-mist); color: var(--aw-ink); }
.section--ink h1, .section--ink h2, .section--ink h3,
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--aw-paper); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--aw-sky);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; display: block; width: 28px; height: 2px; background: var(--aw-sky);
}

.section--mist .eyebrow { color: var(--aw-sky-d); }
.section--mist .eyebrow::before { background: var(--aw-sky-d); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500;
  border-radius: var(--r-sm);
  border: 1.5px solid currentColor;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
  cursor: pointer; white-space: nowrap;
}
.btn--primary {
  background: var(--aw-sky); border-color: var(--aw-sky); color: var(--aw-paper);
}
.btn--primary:hover { background: var(--aw-sky-d); border-color: var(--aw-sky-d); color: var(--aw-paper); }

.btn--ghost { background: transparent; color: currentColor; }
.btn--ghost:hover { background: var(--aw-paper); color: var(--aw-ink); border-color: var(--aw-paper); }
.section--mist .btn--ghost:hover { background: var(--aw-ink); color: var(--aw-paper); border-color: var(--aw-ink); }

.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* --- Header (custom element) -------------------------------------------- */
.aw-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--aw-ink);
  border-bottom: 1px solid var(--aw-rule);
}
.aw-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 1rem;
}
.aw-wordmark {
  display: inline-flex; align-items: center;
  color: var(--aw-paper);
  line-height: 0;
}
.aw-wordmark img {
  display: block;
  height: 64px; width: auto;
  max-width: 100%;
  transition: opacity 0.18s ease;
}
.aw-wordmark:hover img { opacity: 0.85; }
.aw-footer__brand .aw-wordmark img { height: 72px; }
@media (max-width: 800px) {
  .aw-wordmark img { height: 52px; }
}
@media (max-width: 540px) {
  .aw-wordmark img { height: 44px; }
}
.aw-nav { display: flex; align-items: center; gap: 2rem; }
.aw-nav a {
  font-size: 0.875rem; font-weight: 400;
  color: var(--aw-mist); padding: 0.25rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.aw-nav a:hover, .aw-nav a[aria-current="page"] { color: var(--aw-paper); border-bottom-color: var(--aw-sky); }
.aw-nav .btn { padding: 0.625rem 1.125rem; }

.aw-hamburger { display: none; color: var(--aw-paper); padding: 0.5rem; }
.aw-hamburger svg { width: 24px; height: 24px; }

@media (max-width: 800px) {
  .aw-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--aw-ink); border-top: 1px solid var(--aw-rule); padding: 1rem var(--gutter); }
  .aw-nav.is-open { display: flex; }
  .aw-nav a { padding: 0.875rem 0; border-bottom: 1px solid var(--aw-rule); width: 100%; }
  .aw-nav a:hover, .aw-nav a[aria-current="page"] { border-bottom-color: var(--aw-rule); color: var(--aw-sky); }
  .aw-nav .btn { margin-top: 0.5rem; align-self: flex-start; }
  .aw-hamburger { display: inline-flex; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 70vh; display: flex; align-items: center;
  background: var(--aw-ink); color: var(--aw-paper);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: var(--aw-overlay-soft); }
.hero__content { position: relative; padding-block: clamp(4rem, 10vw, 7rem); max-width: 720px; }
.hero h1 { color: var(--aw-paper); margin-bottom: 1.25rem; }
.hero p { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--aw-mist); max-width: 560px; line-height: 1.55; }
.hero__cta { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; }

.hero--compact { min-height: 36vh; }
.hero--compact .hero__content { padding-block: clamp(3rem, 6vw, 5rem); }

/* --- Services row (home) ------------------------------------------------- */
.services-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--aw-rule);
  border-top: 1px solid var(--aw-rule);
}
.service-tile {
  background: var(--aw-ink); color: var(--aw-paper);
  padding: 2rem 1.75rem 2.25rem; display: flex; flex-direction: column; gap: 0.75rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.service-tile:hover { background: var(--aw-navy); }
.service-tile__rule { width: 28px; height: 2px; background: var(--aw-sky); }
.service-tile h3 { font-size: 1.125rem; }
.service-tile p { color: var(--aw-mist-2); font-size: 0.9375rem; line-height: 1.5; }
.service-tile__more { margin-top: auto; padding-top: 1rem; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--aw-sky); }

@media (max-width: 900px) {
  .services-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .services-row { grid-template-columns: 1fr; }
}

/* --- Stats strip --------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border-top: 1px solid var(--aw-rule); border-bottom: 1px solid var(--aw-rule);
}
.stat { padding: 2rem 1.5rem; border-right: 1px solid var(--aw-rule); }
.stat:last-child { border-right: 0; }
.stat dt {
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--aw-muted); margin-bottom: 0.5rem;
}
.stat dd {
  font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500; color: var(--aw-paper);
}
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--aw-rule); } }

/* --- Two-up text + image ------------------------------------------------- */
.two-up { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.two-up--reverse { grid-template-columns: 1fr 1.05fr; }
.two-up--reverse .two-up__text { order: 2; }
.two-up__image { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-md); }
.two-up__image img { width: 100%; height: 100%; object-fit: cover; }
.two-up p + p { margin-top: 1rem; }
@media (max-width: 800px) { .two-up, .two-up--reverse { grid-template-columns: 1fr; } .two-up--reverse .two-up__text { order: 0; } }

/* --- Service detail card ------------------------------------------------- */
.svc-list { display: grid; gap: 0; border-top: 1px solid var(--aw-mist-2); }
.svc-item {
  display: grid; grid-template-columns: 280px 1fr auto;
  gap: 2rem; align-items: center; padding: 2rem 0;
  border-bottom: 1px solid var(--aw-mist-2);
}
.svc-item__image { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-md); background: var(--aw-mist); }
.svc-item__image img { width: 100%; height: 100%; object-fit: cover; }
.svc-item__body h3 { margin-bottom: 0.5rem; }
.svc-item__body p { color: var(--aw-navy-2); }
.svc-item__num {
  font-family: var(--font-display); font-size: 2.25rem; font-weight: 500; color: var(--aw-sky); line-height: 1;
  align-self: start; padding-top: 0.25rem;
}
@media (max-width: 800px) {
  .svc-item { grid-template-columns: 1fr; gap: 1rem; padding: 1.75rem 0; }
  .svc-item__num { order: -1; font-size: 1.5rem; }
  .svc-item__image { max-width: 100%; }
}

/* --- Gallery ------------------------------------------------------------- */
.gallery-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.project-card {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-md); background: var(--aw-ink); aspect-ratio: 4 / 3;
  cursor: pointer; transition: transform 0.25s ease;
}
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s ease, transform 0.5s ease; }
.project-card:hover img { transform: scale(1.04); opacity: 0.65; }
.project-card__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.25rem 1.25rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(11,20,31,0.95));
  color: var(--aw-paper);
}
.project-card__title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 500;
  margin-bottom: 0.125rem;
}
.project-card__location { font-size: 0.8125rem; color: var(--aw-mist-2); }
.project-card__rule { width: 24px; height: 2px; background: var(--aw-sky); margin-bottom: 0.5rem; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(11,20,31,0.97);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: clamp(1rem, 4vw, 2.5rem);
  -webkit-tap-highlight-color: transparent;
}
.lightbox.is-open { display: flex; animation: lb-fade 0.18s ease-out; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__inner {
  max-width: 1200px; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem;
}
.lightbox__stage {
  position: relative; width: 100%; flex: 1; display: flex;
  align-items: center; justify-content: center;
  min-height: 0;
}
.lightbox__img {
  width: 100%; height: auto; max-height: 80vh; object-fit: contain;
  border-radius: var(--r-md);
  transition: opacity 0.2s ease;
}
.lightbox.is-loading .lightbox__img { opacity: 0.25; }

/* Loader spinner — visible only while is-loading */
.lightbox__loader {
  position: absolute; top: 50%; left: 50%;
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--aw-sky);
  border-radius: 50%;
  opacity: 0; pointer-events: none;
  animation: lb-spin 0.7s linear infinite;
  transition: opacity 0.15s ease;
}
.lightbox.is-loading .lightbox__loader { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }

.lightbox__meta {
  display: flex; align-items: baseline; justify-content: space-between;
  width: 100%; gap: 1rem; padding: 0 0.25rem;
}
.lightbox__caption {
  color: var(--aw-mist); font-family: var(--font-display);
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem); font-weight: 500;
  margin: 0; text-align: left;
}
.lightbox__counter {
  color: var(--aw-muted); font-size: 0.8125rem; font-family: var(--font-body);
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  margin: 0; flex-shrink: 0;
}

/* Close (X) — visible top-right */
.lightbox__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--aw-rule-2);
  border-radius: 50%;
  color: var(--aw-paper);
  cursor: pointer; transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  z-index: 2;
}
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__close:hover { background: var(--aw-sky); border-color: var(--aw-sky); color: var(--aw-paper); }
.lightbox__close:active { transform: scale(0.94); }
.lightbox__close:focus-visible { outline: 2px solid var(--aw-sky); outline-offset: 3px; }

/* Prev / Next — vertically centred on edges */
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--aw-rule-2);
  border-radius: 50%;
  color: var(--aw-paper);
  cursor: pointer; transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  z-index: 2;
}
.lightbox__nav svg { width: 26px; height: 26px; }
.lightbox__nav--prev { left: clamp(0.75rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(0.75rem, 2vw, 1.5rem); }
.lightbox__nav:hover { background: var(--aw-sky); border-color: var(--aw-sky); }
.lightbox__nav:active { transform: translateY(-50%) scale(0.94); }
.lightbox__nav:focus-visible { outline: 2px solid var(--aw-sky); outline-offset: 3px; }
.lightbox__nav[hidden] { display: none; }

@media (max-width: 600px) {
  .lightbox__nav { width: 44px; height: 44px; }
  .lightbox__nav svg { width: 22px; height: 22px; }
  .lightbox__meta { flex-direction: column; gap: 0.25rem; align-items: flex-start; }
  .lightbox__counter { font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox.is-open, .lightbox__loader, .lightbox__img { animation: none !important; transition: none !important; }
}

/* --- Contact ------------------------------------------------------------- */
.contact-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info dl { display: grid; gap: 1.5rem; }
.contact-info dt {
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--aw-muted); margin-bottom: 0.25rem;
}
.contact-info dd { font-size: 1.0625rem; color: var(--aw-mist); }
.contact-info a { color: var(--aw-paper); border-bottom: 1px solid var(--aw-rule-2); }
.contact-info a:hover { color: var(--aw-sky); border-bottom-color: var(--aw-sky); }

.contact-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.375rem; }
.field label {
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--aw-muted); font-weight: 500;
}
.field input, .field textarea {
  width: 100%; padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--aw-rule-2);
  border-radius: var(--r-sm);
  color: var(--aw-paper);
  font-family: var(--font-body); font-size: 0.9375rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--aw-sky); background: rgba(255,255,255,0.06);
}
.field textarea { min-height: 140px; resize: vertical; }
.field--required label::after { content: " *"; color: var(--aw-sky); }
.form-status {
  padding: 0.875rem 1rem; border-radius: var(--r-sm); font-size: 0.9375rem;
  border: 1px solid var(--aw-rule-2);
}
.form-status--ok { background: rgba(21,133,212,0.12); border-color: var(--aw-sky); color: var(--aw-paper); }
.form-status--err { background: rgba(212,35,35,0.12); border-color: #d42323; color: #ffd0d0; }
.form-status[hidden] { display: none; }

/* --- Testimonial / quote ------------------------------------------------- */
.quote {
  font-family: var(--font-display); font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 400;
  line-height: 1.3; max-width: 760px; margin: 0 auto; text-align: center;
  letter-spacing: -0.01em;
}
.quote::before { content: "“"; color: var(--aw-sky); font-size: 2em; line-height: 0; vertical-align: -0.4em; margin-right: 0.1em; }

/* --- Footer -------------------------------------------------------------- */
.aw-footer { background: var(--aw-ink); color: var(--aw-mist-2); padding-block: 4rem 2rem; border-top: 1px solid var(--aw-rule); }
.aw-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.aw-footer__brand .aw-wordmark { color: var(--aw-paper); }
.aw-footer__brand p { margin-top: 1rem; max-width: 380px; font-size: 0.9375rem; }
.aw-footer__col h4 {
  font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--aw-muted); margin-bottom: 1rem; font-weight: 500;
}
.aw-footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.aw-footer__col a { font-size: 0.9375rem; color: var(--aw-mist); }
.aw-footer__col a:hover { color: var(--aw-sky); }
.aw-footer__legal {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; border-top: 1px solid var(--aw-rule);
  font-size: 0.8125rem; color: var(--aw-muted); flex-wrap: wrap; gap: 1rem;
}
@media (max-width: 700px) {
  .aw-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Misc utilities ------------------------------------------------------ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; } .mt-6 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 2rem; } .mb-6 { margin-bottom: 3rem; }
