/*
  WAIACAN — site styles (dark theme)
  Dark background with light text. The only accent color is the logo yellow (#FFB400):
  buttons (with black text), the rotating word and "AI", small indicators. Never full
  sections. The contact form is a white card so typing stays comfortable.
*/

:root {
  color-scheme: dark;

  --yellow: #FFB400;        /* the logo yellow; the only accent */
  --yellow-hover: #FFC633;  /* brighter on hover, never darker */
  --yellow-glow: 0 0 0 1px rgba(255, 198, 51, 0.35), 0 8px 28px rgba(255, 180, 0, 0.45);

  --bg: #151B23;            /* page background: blue charcoal */
  --surface: #1E2631;       /* alternate sections, cards */
  --glow: #222D3B;          /* faint light behind the hero symbol */
  --text: #F5F5F5;          /* titles, main text */
  --text-muted: #B8B8B8;    /* paragraphs, secondary text */
  --line: #2A3441;          /* borders, dividers */
  --line-strong: #3A4658;

  /* Light surfaces (contact form card) and text on yellow */
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --paper-muted: #6B7280;
  --paper-line: #D1D5DB;

  --font-heading: 'Sofia Sans', system-ui, sans-serif; /* logo lettering and titles, SemiBold (600) */
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-lg: 20px;

  --container-width: 1200px;
  --gutter: 32px;
  --section-spacing: 112px;
  --header-height: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: 1.3rem; letter-spacing: 0; font-weight: 600; margin-bottom: 12px; }

p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Sections ---------- */

.section { padding: var(--section-spacing) 0; }
/* Sections alternate between the page background and a slightly lighter surface. */
.section-alt { background: var(--surface); }

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}
.section-head p { font-size: 1.125rem; }

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--yellow);
  margin-bottom: 20px;
}

.text-accent { color: var(--yellow); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 80px;
  align-items: start;
}

.prose p { font-size: 1.075rem; }

.callout {
  font-family: var(--font-heading);
  font-size: 1.35rem !important;
  font-weight: 600;
  color: var(--text) !important;
  padding-left: 20px;
  border-left: 3px solid var(--yellow);
  margin: 32px 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--yellow);
}
/* Hover lights the button up (brighter yellow + soft glow) instead of darkening it. */
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--yellow-hover);
  border-color: var(--yellow-hover);
  box-shadow: var(--yellow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--text);
  background: var(--surface);
}

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-lg { padding: 18px 34px; font-size: 1.05rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 27, 35, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-height);
}
.brand { margin-right: auto; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* EN/ES switch: shows the *other* language; picking it is remembered by lang.js. */
.lang-switch {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.lang-switch:hover { border-color: var(--text); background: var(--surface); }

/* Logo: icon image + "WAIACAN" as live text. The icon stands ~1.5× the letter height,
   matching the proportions of the drawn wordmark. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  height: 40px;
  width: auto;
}
.brand-word {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
}
.brand-ai { color: var(--yellow); }
.brand-footer .brand-icon { height: 32px; }
.brand-footer .brand-word { font-size: 1.45rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a { white-space: nowrap; }
.site-nav a:not(.btn) {
  position: relative;
  padding: 4px 0;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, top 0.2s ease;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding: 112px 0 128px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: center;
}

.hero-content { max-width: none; } /* the title sizes itself to fit; see .hero-title */

.hero-lead {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

/*
  Hero word rotator (built by main.js). The window is one line tall with a little extra
  room below so descenders (the "p" in Optimize) aren't clipped; the negative margin
  gives that room back so the line height doesn't change.
*/
.rotator.is-ready {
  display: inline-block;
  vertical-align: top;
  height: 1.2em;
  margin-bottom: -0.1em;
  overflow: hidden;
  transition: width 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.rotator-track {
  display: block;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.rotator-track > span {
  display: block;
  width: max-content;
  height: 1.2em;
}

/*
  Hero title, in the wordmark's font. Always exactly two lines, on every screen:
  line 1 is fixed ("Discover What You Can"), line 2 is "<word> with AI.". The font size is
  derived from the width available for line 1, so it never wraps and the rotating word
  never changes the heading's height.
*/
.hero-title {
  font-weight: 600;
  /* Line 1 is ~10.2em wide in English; the calc keeps the widest line on one line next to
     the hero icon (viewport − gutters − icon − gap, ÷ --h1-em) down to the 900px breakpoint.
     --h1-em is set per language in _src/content/*.json, since line widths differ. */
  font-size: clamp(2rem, calc((100vw - 390px) / var(--h1-em, 10.65)), 4.5rem);
  letter-spacing: 0.01em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero-description {
  max-width: 600px;
  font-size: 1.125rem;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-note {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

/* A very faint glow behind the symbol gives the hero some depth; keep it subtle. */
.hero-visual {
  position: relative;
  z-index: 0;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -140px;
  z-index: -1;
  background: radial-gradient(closest-side, var(--glow), rgba(34, 45, 59, 0));
  pointer-events: none;
}
.hero-visual img {
  width: 260px;
}
/* The glow can extend past the viewport edge; never let it cause sideways scrolling. */
.hero { overflow-x: clip; }

/* Hero animation layer (js/hero-flow.js): behind the content on desktop. */
.hero { position: relative; }
.hero-grid { position: relative; z-index: 1; }
.hero-flow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-flow canvas { display: block; width: 100%; height: 100%; }
.hero-flow-icon { display: none; }

/* ---------- Services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
}
.card p { margin-bottom: 0; }
.section-alt .card { background: var(--bg); }

.card-num {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 28px;
}

/* The one yellow card: a call to action at the end of the services grid. */
.card-cta,
.section-alt .card-cta {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  justify-content: flex-end;
}
.card-cta:hover { border-color: var(--yellow-hover); background: var(--yellow-hover); box-shadow: var(--yellow-glow); }
.card-cta p { font-size: 1.1rem; color: var(--ink); }
.card-link {
  margin-top: 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Improve / Expand ---------- */

/*
  Three numbered steps read left to right: yellow arrows sit in the gaps between cards, and
  the number badges "fill up" along the way (outline → half → solid) to show progression.
*/
.value-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
}
.value-step { position: relative; }
.value-step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.value-step-head .card-label { margin-bottom: 0; }
.value-step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--yellow);
}
.value-step:nth-child(2) .value-step-num { background: rgba(255, 180, 0, 0.2); }
.value-step:nth-child(3) .value-step-num { background: var(--yellow); color: var(--ink); }
/* Arrow in the gap after each step, level with the number badge. */
.value-step:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  top: 44px;
  right: -44px;
  width: 32px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--yellow);
}

.card-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--yellow);
  margin-bottom: 20px;
}

/* Under the steps: the condensed "where to start" text, then the loop as a highlighted line. */
.value-note {
  max-width: 820px;
  margin-top: 56px;
}
.value-note p { font-size: 1.1rem; }
.value-cycle {
  margin: 0;
  padding-left: 20px;
  border-left: 3px solid var(--yellow);
  color: var(--text);
}

/* ---------- Approach ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.section-cta { margin-top: 56px; }

.step {
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
  position: relative;
}
.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--yellow);
}

.step-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 16px;
}

.step h3 { font-size: 1.4rem; }

/* ---------- Why ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
}
.values li {
  padding-left: 20px;
  border-left: 2px solid var(--yellow);
}
.values p { margin: 0; }
/* An odd last item (5 values) spans the full row instead of leaving a gap. */
.values li:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Projects (home teaser + projects page) ---------- */

.byline {
  font-size: 0.95rem !important;
  color: var(--text-muted);
}

/* Image slots. An empty slot shows a faint grid and the bulb, so it reads as intentional
   until a real image (images/projects/<slug>.webp) is added and the site rebuilt. */
.project-media,
.teaser-media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}
.project-media img,
.project-media video,
.teaser-media img,
.teaser-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Looping videos (videos/<slug>.mp4 + poster) are 16:9, so the slot matches and nothing is cropped.
   main.js plays each one only while it's on screen; the poster shows before that. */
.project-media.has-video,
.teaser-media.has-video { aspect-ratio: 16 / 9; }
.project-media.is-empty,
.teaser-media.is-empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--glow) 0, rgba(34, 45, 59, 0) 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg);
}
.project-media.is-empty img,
.teaser-media.is-empty img {
  width: 64px;
  height: auto;
  opacity: 0.55;
}

/* Home teaser: three linked cards. */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.section .teaser-card { background: var(--surface); }
.teaser-card { padding: 0 0 28px; overflow: hidden; }
.teaser-card .teaser-media {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 24px;
}
.teaser-card h3,
.teaser-card p { padding: 0 28px; }
.teaser-card p { margin-bottom: 16px; }
.teaser-card .teaser-meta {
  margin: auto 0 0;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--yellow);
}

/* Projects page */
.page-hero { padding: 104px 0 88px; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.page-hero .hero-lead { max-width: 720px; }
.page-hero .byline { max-width: 680px; margin-bottom: 36px; }

.projects-list {
  display: grid;
  gap: 112px;
}
.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 64px;
  align-items: start;
  scroll-margin-top: calc(var(--header-height) + 24px);
}
/* Alternate image left / right so the list doesn't feel repetitive. */
.project:nth-child(even) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.project:nth-child(even) .project-media { order: 2; }
.project-media { position: sticky; top: calc(var(--header-height) + 32px); }

.project-meta {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--yellow);
  margin-bottom: 14px;
}
.project h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); margin-bottom: 28px; }
.project-block { margin-top: 24px; }
.project-block p { margin-bottom: 12px; }
/* Lists inside a block (the four SWEAT440 systems, the results): yellow dots, optional bold lead-in. */
.project-block ul { margin: 0 0 14px; }
.project-block li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.project-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
}
.project-block li strong { color: var(--text); font-weight: 600; }
.project-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text);
  margin-bottom: 10px;
}
/* The result is what matters: set off with the yellow rule, list items with yellow dots. */
.project-result {
  padding: 20px 0 4px 22px;
  border-left: 3px solid var(--yellow);
}
.project-result p { color: var(--text); }
.project-result li {
  margin-bottom: 8px;
  color: var(--text);
}

.cta-block {
  max-width: 760px;
  text-align: center;
}
.cta-block p { font-size: 1.1rem; }
.cta-block .hero-actions { justify-content: center; margin-top: 32px; }
.cta-block .contact-email { margin-top: 20px; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 80px;
  align-items: start;
}

.contact-intro p:not(.eyebrow) { font-size: 1.1rem; }

.contact-email {
  margin-top: 32px;
  font-size: 0.95rem !important;
}
.contact-email a {
  color: var(--text);
  border-bottom: 1px solid var(--yellow);
}

.contact-form {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  gap: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.field .optional {
  font-weight: 400;
  color: var(--paper-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.45);
}
.field textarea::placeholder { color: #9CA3AF; }

.contact-form .btn { width: 100%; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* Text inside the white form card uses the light-surface colors. */
.contact-form .form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--paper-muted);
}
.contact-form .form-status:empty { display: none; }
.contact-form .form-status.is-error { color: #B42318; }
.contact-form .form-status a { color: var(--ink); text-decoration: underline; }

.form-success h3 { font-size: 1.6rem; }
.form-success p { color: var(--paper-muted); margin: 0; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--line);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}


.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-tagline { font-family: var(--font-heading); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-meta a:hover { color: var(--yellow); }

/* ---------- Responsive ---------- */

/* The menu collapses at 1024px: the Spanish labels are longer and need the room. */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 20px; }
}

@media (max-width: 900px) {
  .teaser-grid { grid-template-columns: 1fr; }
  .project,
  .project:nth-child(even) { grid-template-columns: 1fr; gap: 28px; }
  .project:nth-child(even) .project-media { order: 0; }
  .project-media { position: static; }
  .projects-list { gap: 80px; }
  .page-hero { padding: 72px 0 64px; }

  :root { --section-spacing: 80px; }

  /* Single column: line 1 gets the full content width (viewport − both gutters). */
  .hero-title { font-size: clamp(1.6rem, calc((100vw - 2 * var(--gutter)) / var(--h1-em, 10.65)), 3.6rem); }

  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  /* Phones/tablets: the animation becomes a band under the call to action, with its own symbol. */
  .hero-flow {
    position: relative;
    inset: auto;
    height: 200px;
    margin-top: 40px;
  }
  .hero-flow-icon {
    display: block;
    position: absolute;
    left: 58%;
    top: 50%;
    width: 104px;
    height: auto;
    transform: translate(-50%, -50%);
  }

  .split,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-steps,
  .steps { grid-template-columns: 1fr; }
  /* Stacked steps: the arrow points down, centered in the gap below each card. */
  .value-step:not(:last-child)::after {
    content: "\2193";
    top: auto;
    bottom: -44px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 600px) {
  :root {
    --section-spacing: 64px;
    --gutter: 20px;
    --header-height: 68px;
  }

  .brand-icon { height: 34px; }
  .brand-word { font-size: 1.55rem; }

  .hero { padding: 56px 0 72px; }
  .hero-actions .btn,
  .section-cta .btn { width: 100%; }

  .section-head { margin-bottom: 40px; }

  .service-grid,
  .values { grid-template-columns: 1fr; }

  .card { padding: 28px 24px; }

  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 20px; }

  .btn-lg { width: 100%; padding: 16px 20px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .card,
  .site-nav a::after,
  .nav-toggle span { transition: none; }
}
