/* Touché Digital — landing page layout.
   Everything here is page composition. Colour, type and control styling come from
   the design system in styles.css; nothing below invents a new colour or font. */

:root {
  /* One gutter for the whole page. 64px on desktop, tightening on small screens. */
  --gutter: clamp(20px, 5.2vw, 64px);
  --nav-h: 62px;

  /* Widest the content column ever gets. The design canvas was authored at a
     fixed desktop width, so without a cap everything keeps stretching on a
     wide monitor: the work columns outgrow the screenshots and upscale them,
     and the portrait drifts to the far right of an enormous grid column. */
  --page-max: 1160px;

  /* Full-bleed element, centred content. Backgrounds (the nav bar, the band
     image) still span the viewport; only the content inside is capped. */
  --pad-x: max(var(--gutter), (100% - var(--page-max)) / 2);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  /* The page sits on a slightly deeper cream than the design-system surface so the
     content column reads as a card laid on a table. */
  background: #e6d9c2;
  text-wrap: pretty;
}

.page {
  background: var(--color-bg);
  color: var(--color-text);
}

a { color: var(--color-accent-700); text-decoration: none; }
a:hover { color: var(--color-accent-800); text-decoration: underline; }

.skip-link {
  position: absolute; left: var(--gutter); top: 8px; z-index: 20;
  padding: 10px 16px; border-radius: 999px;
  background: var(--color-accent); color: var(--color-bg);
  font-family: var(--font-heading); font-size: 14px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; text-decoration: none; color: var(--color-bg); }

/* Honeypot wrapper. Unlike .visually-hidden this is hidden from assistive tech
   too — nobody should ever be offered the field, only bots that read the DOM. */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── shared section furniture ─────────────────────────────────────────── */

.section { padding-inline: var(--pad-x); scroll-margin-top: calc(var(--nav-h) + 12px); }

.kicker {
  display: block; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 600; color: var(--color-accent-700); margin-bottom: 32px;
}

.prose { color: color-mix(in srgb, var(--color-text) 80%, transparent); }

/* ── navigation ───────────────────────────────────────────────────────── */

.site-nav {
  position: sticky; top: 0; z-index: 10;
  padding-inline: var(--pad-x);
  background: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  flex-wrap: wrap;
  row-gap: var(--space-2);
}
.site-nav.is-stuck {
  border-bottom-color: var(--color-divider);
  box-shadow: 0 6px 20px color-mix(in srgb, #2e2b25 7%, transparent);
}
.site-nav .btn-primary { color: var(--color-bg); }
.site-nav .btn-primary:hover { text-decoration: none; color: var(--color-bg); }
.site-nav a:hover { text-decoration: none; }

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; }
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.6; filter: blur(1px);
}
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--color-bg) 0%, transparent 26%, transparent 72%, var(--color-bg) 100%);
}
.hero-inner {
  position: relative;
  padding: clamp(56px, 8vw, 104px) var(--pad-x) clamp(56px, 7vw, 88px);
}
.hero h1 {
  font-size: clamp(38px, 6.6vw, 82px);
  line-height: 1.06;
  letter-spacing: -0.028em;
  margin: 0;
  max-width: 15ch;
}
.hero-lede {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.65;
  max-width: 52ch;
  margin: 32px 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-actions .btn-primary { color: var(--color-bg); }
.hero-actions .btn:hover { text-decoration: none; }
.hero-actions .btn-ghost { color: var(--color-accent-700); }

/* ── selected work ────────────────────────────────────────────────────── */

.work { padding-top: 24px; padding-bottom: clamp(56px, 7vw, 88px); }
.work .kicker { margin-bottom: 24px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 40px;
}
.work-item { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.work-item h3 { font-size: clamp(21px, 2vw, 24px); margin: 0; }
.work-item p {
  font-size: 15.5px; line-height: 1.65; margin: 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.work-link { font-size: 14px; font-weight: 600; }

/* ── image frames ─────────────────────────────────────────────────────── */

/* A frame is the sized box; the <img> fills it. If the image is missing the frame
   still reads as a deliberate, palette-correct block with its caption — the page
   never shows a broken-image icon. Drop the file in at the wired path and it
   takes over with no markup change. */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--color-accent-100) 0 14px,
      var(--color-accent-200) 14px 28px
    );
}
.frame::after {
  content: attr(data-placeholder);
  position: absolute; inset: 0;
  display: grid; place-content: center; padding: 24px;
  text-align: center; font-size: 13px; letter-spacing: 0.04em;
  color: var(--color-accent-800);
  background: color-mix(in srgb, var(--color-accent-100) 72%, transparent);
}
/* <picture> is transparent to layout so the rules below reach the <img> whether
   it's a direct child or wrapped in a picture with responsive sources. */
.frame > picture { display: contents; }
.frame img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
}
.frame img[hidden] { display: none; }

.frame-shot { aspect-ratio: 536 / 280; }
.frame-band { height: clamp(220px, 32vw, 420px); border-radius: 0; }
.frame-portrait {
  width: min(320px, 100%); aspect-ratio: 1; border-radius: 50%;
  /* Centred in its column rather than pinned to the far edge — with the page
     capped the column is a sane width, and centring reads as balanced against
     the text block instead of stranded. */
  justify-self: center;
}

/* ── in with the new ──────────────────────────────────────────────────── */

.pitch { padding-bottom: 40px; }
.pitch h2 {
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; margin: 0; max-width: 20ch;
}
.pitch p {
  font-size: clamp(16px, 1.4vw, 17px); line-height: 1.65;
  margin: 24px 0 0; max-width: 56ch;
}

/* ── what I do ────────────────────────────────────────────────────────── */

.services { padding-top: clamp(48px, 6vw, 72px); padding-bottom: clamp(56px, 7vw, 88px); }
.services-list { display: flex; flex-direction: column; gap: 40px; }
.service {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 32px;
  align-items: baseline;
}
.service h3 {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(22px, 2.2vw, 27px); margin: 0;
}
.service h3::before {
  content: ""; flex: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-accent);
}
.service p {
  font-size: 16px; line-height: 1.65; margin: 0; max-width: 52ch;
}

/* ── how it goes ──────────────────────────────────────────────────────── */

.process { padding-bottom: clamp(56px, 7vw, 88px); }
.process-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  counter-reset: step;
  list-style: none; margin: 0; padding: 0;
}
.step { display: flex; flex-direction: column; gap: 16px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid; place-content: center;
  width: 88px; height: 88px; border-radius: 50%;
  font-family: var(--font-heading); font-size: 32px;
  background: var(--color-accent-100); color: var(--color-accent-700);
}
.step:nth-child(2)::before { background: var(--color-accent-2-100); color: var(--color-accent-2-700); }
.step:nth-child(3)::before { background: var(--color-accent-200); color: var(--color-accent-700); }
.step:nth-child(4)::before { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.step h3 { font-size: 19px; margin: 0; }
.step p {
  font-size: 15px; line-height: 1.6; margin: 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

/* ── about ────────────────────────────────────────────────────────────── */

.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px; align-items: center;
  padding-bottom: clamp(56px, 7vw, 88px);
}
.about .kicker { margin-bottom: 20px; }
.about h2 {
  font-size: clamp(28px, 3.2vw, 38px); line-height: 1.15; margin: 0; max-width: 18ch;
}
.about p {
  font-size: 16px; line-height: 1.7; max-width: 50ch; margin: 24px 0 0;
}
.about p + p { margin-top: 20px; }

/* ── questions ────────────────────────────────────────────────────────── */

.faq { padding-bottom: clamp(56px, 7vw, 88px); }
.faq-list { display: flex; flex-direction: column; gap: 32px; max-width: 820px; }
.faq-item h3 { font-size: clamp(19px, 1.8vw, 21px); margin: 0 0 10px; }
.faq-item p {
  font-size: 15.5px; line-height: 1.65; margin: 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

/* ── contact ──────────────────────────────────────────────────────────── */

.contact { padding-bottom: clamp(48px, 6vw, 72px); }
.contact-panel {
  background: var(--color-accent-2-100);
  border-radius: 32px;
  padding: clamp(28px, 4.4vw, 56px);
}
.contact-panel h2 {
  font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin: 0; max-width: 20ch;
}
.contact-panel > p {
  font-size: 16px; line-height: 1.65; margin: 20px 0 0; max-width: 52ch;
}
.contact-form { margin-top: 32px; max-width: 640px; }
.contact-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.contact-form textarea.input {
  display: block; width: 100%; height: 110px; margin-top: 16px;
  border-radius: 20px; resize: none; font-family: var(--font-body);
}
.contact-actions {
  display: flex; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap;
}
.contact-actions .btn-primary { color: var(--color-bg); }
.contact-note {
  font-size: 15px; color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.form-status {
  margin: 16px 0 0; font-size: 15px; min-height: 1.4em;
  color: var(--color-accent-2-800);
}
.form-status:empty { margin-top: 0; min-height: 0; }
.input[aria-invalid="true"] { border-color: var(--color-accent-600); }

/* ── footer ───────────────────────────────────────────────────────────── */

.site-footer {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 0 var(--pad-x) 56px;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.site-footer a { color: inherit; }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .about { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .frame-portrait { justify-self: start; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .service { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .service p { max-width: 62ch; }
}

@media (max-width: 720px) {
  /* The nav wraps to two rows here — anchor targets need the taller offset. */
  :root { --nav-h: 92px; }
  .site-nav { padding-block: var(--space-2) var(--space-3); }
  .site-nav .nav-brand { flex: 1 0 100%; margin-right: 0; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .contact-row { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 480px) {
  .process-grid { grid-template-columns: minmax(0, 1fr); }
  .step::before { width: 64px; height: 64px; font-size: 26px; }
  .site-footer { flex-direction: column; gap: 8px; }
}
