/* ==========================================================================
   components.css — header, buttons, grids, cards, forms, footer
   Existing template class hooks are preserved.
   ========================================================================== */

/* --- Header / nav -------------------------------------------------------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Header height follows the logo (+ padding) instead of a fixed min-height,
     so the logo never clips and tuning --logo-h is the only knob. */
  padding-block: var(--space-3);
  gap: var(--space-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-logo {
  height: var(--logo-h, 56px);
  width: auto;
  display: block;
}
header.site nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
/* Exclude the CTA so it keeps its own white-on-ink button colors. */
header.site nav a:not(.cta) {
  font-size: var(--text-sm);
  color: var(--ink-2);
}
header.site nav a:not(.cta):hover {
  color: var(--ink);
  text-decoration: none;
}

/* --- Full-bleed home hero ------------------------------------------------ */
.hero-full {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(74vh, 760px);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink); /* bed behind the photo while it loads */
}
.hero-full__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-full__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* The one gradient on the site — black alpha only, no new hue — so the
     overlaid copy stays legible over any photograph. */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.26) 40%,
    rgba(0, 0, 0, 0) 70%
  );
}
.hero-full__inner {
  width: 100%;
  padding-block: var(--space-8);
}
.hero-full h1 {
  font-size: var(--text-display);
  max-width: 18ch;
  margin-bottom: var(--space-5);
}
/* Over a photo the copy goes light; the CTA flips to a white chip. */
.hero-full:not(.hero-full--empty) h1 {
  color: #fff;
}
.hero-full:not(.hero-full--empty) .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}
.hero-full:not(.hero-full--empty) .eyebrow::after {
  border-top-color: rgba(255, 255, 255, 0.5);
}
.hero-full:not(.hero-full--empty) .hero-full__inner .btn {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
/* No featured photo yet: sit on the page background with normal dark type. */
.hero-full--empty {
  min-height: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-full--empty .hero-full__inner {
  padding-block: var(--space-9) var(--space-7);
}

/* --- Selected work (home mosaic) ---------------------------------------- */
.work__more {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
}
.work__grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
/* Editorial rhythm: the lead mosaic cell reads larger on wider screens. */
@media (min-width: 760px) {
  .work__grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .work__grid > picture:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* --- Approach teaser ----------------------------------------------------- */
.intro .lead {
  margin-bottom: var(--space-4);
}

/* --- Closing CTA band (full-bleed within the wrap) ---------------------- */
.cta-band {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-top: var(--space-9);
  padding-block: var(--space-9);
  background: var(--ink);
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.cta-band h2 {
  color: #fff;
  margin: 0;
  max-width: 20ch;
}
/* Scoped to .cta-band so it OUT-SPECIFIES the base .btn rule rather than
   merely following it. `.btn` and `.cta-band__btn` are both one class — a
   specificity tie, decided only by source order, i.e. by which stylesheet the
   page happens to link last. This makes the win structural. */
.cta-band .cta-band__btn {
  flex-shrink: 0;
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
/* When the page ends in the full-bleed band, drop the content's trailing pad
   so the band isn't stranded in whitespace above the footer. */
.page-content:has(> .cta-band:last-child) {
  padding-bottom: 0;
}

/* --- Image grid ---------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.grid picture,
.grid figure {
  display: block;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
}
.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}
.grid picture:hover img,
.grid figure:hover img {
  transform: scale(1.03);
}
figure figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--ink-2);
  padding-top: var(--space-2);
}

/* --- Page hero (flatpages) ---------------------------------------------- */
.page-hero {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  /* Square corners — the design system keeps images print-true (radius 0). */
  margin-bottom: var(--space-5);
  background: var(--line);
}

/* --- Pricing cards ------------------------------------------------------- */
.cards {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
}
.card h3 {
  margin-top: 0;
}
.card .price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  margin: var(--space-2) 0 var(--space-4);
}
.card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--ink-2);
}
.card li {
  padding-left: var(--space-5);
  position: relative;
  margin-bottom: var(--space-2);
}
.card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-3);
}

/* --- Testimonials -------------------------------------------------------- */
.testimonial {
  border: 0;
  margin: 0 0 var(--space-6);
  padding: 0;
  max-width: var(--measure);
}
.testimonial p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 var(--space-3);
}
.testimonial footer {
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--ink-3);
}

/* --- Forms --------------------------------------------------------------- */
.field {
  margin-bottom: var(--space-4);
  max-width: 34rem;
}
.field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: var(--space-2);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.65em 0.75em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ink);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

/* Honeypot — visually hidden, off-screen. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Alerts -------------------------------------------------------------- */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}
.alert.ok {
  border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
  color: var(--ok);
}
.alert.err {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  color: var(--danger);
}

/* --- Footer -------------------------------------------------------------- */
footer.site {
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: var(--text-sm);
  padding-block: var(--space-6);
  margin-top: var(--space-9);
}
footer.site a {
  color: var(--ink-2);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-copy {
  margin: 0;
  max-width: none;
}
.footer-links {
  display: flex;
  gap: var(--space-4);
}
.footer-links a {
  color: var(--ink-3);
  font-size: var(--text-sm);
  transition: color var(--dur-fast) var(--ease);
}
.footer-links a:hover {
  color: var(--ink);
}
/* Matches .footer-links a exactly, on purpose: the way into the staff area
   should read as footer furniture beside Privacy and Terms, not as a call to
   action. It sits outside that nav because the nav is labelled "Legal". */
.footer-studio {
  color: var(--ink-3);
  font-size: var(--text-sm);
  transition: color var(--dur-fast) var(--ease);
}
.footer-studio:hover {
  color: var(--ink);
}

/* --- Social links -------------------------------------------------------- */
.social {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.social-link {
  display: inline-flex;
  color: var(--ink-3);
  transition: color var(--dur-fast) var(--ease);
}
.social-link:hover {
  color: var(--ink);
}
.social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- Responsive: header reflows on narrow screens ------------------------ */
@media (max-width: 760px) {
  header.site .wrap {
    flex-wrap: wrap;
    min-height: 0;
    gap: var(--space-3);
    padding-block: var(--space-3);
  }
  .brand {
    white-space: nowrap;
  }
  header.site nav {
    flex-wrap: wrap;
    gap: var(--space-4);
    width: 100%;
  }
  header.site nav .cta {
    margin-left: auto; /* push the CTA to the row's end */
  }
  .page-content {
    padding-block: var(--space-7);
  }
  .hero-full {
    min-height: min(64vh, 560px);
  }
  .hero-full__inner {
    padding-block: var(--space-7);
  }
  .cta-band__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
