/* ============================================================
   Kahyve — site styles (tokens live in tokens.css)

   1. Base
   2. Typography
   3. Layout + utilities
   4. Components   button · media · badge · ornament · drip · reveal
   5. Header + mobile nav
   6. Sections     hero · why · product · pellets · steps · banner
                   aims · journey · about · cta · form · footer · not-found
                   logo ideas (logo-ideas.html)
   7. Reduced motion

   Media queries sit with the block they change.
   Breakpoints: 1024 / 768 / 480.
   ============================================================ */


/* ============ 1. Base ======================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-cream);
  font: 400 var(--fs-body) / var(--lh-body) var(--f-body);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

/* Surface scopes: re-point the role tokens for light/dark areas */
.light {
  background: var(--c-paper);
  color: var(--c-ink);
  --c-accent: var(--c-caramel-deep);
  --c-rule: rgba(36, 23, 16, .18);
}
.dark {
  background: var(--c-bg);
  color: var(--c-cream);
  --c-accent: var(--c-caramel);
  --c-rule: rgba(248, 225, 205, .35);
}

@media (max-width: 1024px) { :root { --section-y: 72px; } }
@media (max-width: 480px)  { :root { --gutter: 20px; --section-y: 56px; } }


/* ============ 2. Typography ================================= */

.d1, .d2, .d3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}
.d1 { font-size: clamp(3rem, 7.2vw, var(--fs-d1)); }
.d2 { font-size: clamp(2.5rem, 4.4vw, var(--fs-d2)); }
.d3 { font-size: clamp(1.5rem, 2.2vw, var(--fs-d3)); line-height: .95; }
/* one italic word per heading */
:is(.d1, .d2, .d3) em { font-style: italic; }

.eyebrow {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-accent);
}
.body { max-width: var(--measure); margin: 0; }
.lead {
  max-width: var(--measure);
  margin: 0;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
}
.caption {
  margin: .5rem 0 0;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--c-accent);
}


/* ============ 3. Layout + utilities ========================= */

.wrap    { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section--flush { padding-top: 0; }
.center  { text-align: center; }
.center .body { margin-inline: auto; }
.stack > * + * { margin-top: 1.25rem; }


.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }


/* ============ 4. Components ================================= */

/* ---- Icon (stroke icons from the inline sprite) ---------- */
.icon {
  flex: none;
  width: 1.5rem; height: 1.5rem;
  fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---- Button ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 14px 26px;
  border: var(--rule) solid var(--c-accent);
  border-radius: var(--pill);
  background: transparent;
  color: var(--c-accent);
  font-size: var(--fs-btn);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn:is(:hover, :focus-visible) { background: var(--c-accent); color: var(--c-bg); }
.light .btn:is(:hover, :focus-visible) { color: var(--c-paper); }
.btn .icon { width: 1.1rem; height: 1.1rem; transition: transform var(--dur) var(--ease); }
.btn:hover .icon { transform: translateX(3px); }

.btn--gold { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-ink); }
.btn--gold:is(:hover, :focus-visible) { background: var(--c-cream); border-color: var(--c-cream); color: var(--c-ink); }
.light .btn--gold:is(:hover, :focus-visible) { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-paper); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-3); }

/* ---- Media (all content photos) -------------------------- */
.media { width: 100%; height: auto; object-fit: cover; border-radius: var(--radius); }

/* ---- Badge: icon in a ringed circle ---------------------- */
.badge {
  display: grid; place-items: center;
  width: 58px; height: 58px;
  border: var(--rule) solid var(--c-accent);
  border-radius: 50%;
  background: var(--c-card);
  color: var(--c-accent);
  box-shadow: 0 0 0 6px var(--c-paper-2);
}

/* ---- Ornament: bean between two rules under a heading ---- */
.ornament {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  margin: var(--space-2) auto 0;
  color: var(--c-accent);
}
.ornament::before, .ornament::after {
  content: "";
  width: 72px; height: var(--rule);
  background: currentColor; opacity: .6;
}
.ornament svg { width: 14px; height: 18px; }

/* ---- Drip edge between surfaces -------------------------- */
/* Placed first in a section; colour = the section above it.
   img/drip.svg is a 1440×40 tile used as a mask: it keeps its proportions
   (centred and cropped on narrow screens, repeated on very wide ones). */
.drip {
  position: absolute; top: -1px; left: 0;
  width: 100%; height: var(--edge-h);
  background: currentColor;
  -webkit-mask: url("../img/drip.svg") 50% 0 / auto 100% repeat-x;
          mask: url("../img/drip.svg") 50% 0 / auto 100% repeat-x;
  pointer-events: none;
}
.drip--dark  { color: var(--c-bg); }
.drip--paper { color: var(--c-paper); }
.section:has(> .drip) { padding-top: calc(var(--section-y) + 2rem); }

/* ---- Bean pile: a few hero beans resting on a drip ------- */
/* Sits next to a drip at a section corner; beans reuse .bean. */
.bean-pile {
  position: absolute; top: clamp(2px, .7vw, 10px); z-index: 1;
  width: 92px; height: 60px;
  pointer-events: none;
}
.bean-pile--right { right: calc(var(--gutter) + 3vw); }
.bean-pile--left  { left: calc(var(--gutter) + 3vw); scale: -1 1; }
.bean-pile .bean {
  height: calc(var(--s) * 4 / 3);       /* svg has no viewBox: give it the bean's ratio */
  filter: drop-shadow(0 4px 4px rgba(23, 16, 12, .3));
  animation: none;
}
.bean-pile .bean:nth-child(1) { left: 0;    top: 12px; --s: 30px; --r: 68deg; }
.bean-pile .bean:nth-child(2) { left: 30px; top: 0;    --s: 25px; --r: -32deg; }
.bean-pile .bean:nth-child(3) { left: 58px; top: 18px; --s: 21px; --r: 14deg; }

@media (max-width: 768px) { .bean-pile { scale: .75; transform-origin: top right; } .bean-pile--left { scale: -.75 .75; } }

/* ---- Scroll reveal (class toggled by js/main.js) --------- */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}


/* ============ 5. Header + mobile nav ======================== */

.header {
  position: absolute; inset: 0 0 auto;
  z-index: 20;
  display: flex; align-items: center;
  height: var(--header-h);
}
.header__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  width: 100%;
}
.header__cta { justify-self: end; padding: 11px 20px; }

.nav { display: flex; gap: 1.75rem; }
.nav a {
  font-size: var(--fs-nav);
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.nav a:hover { color: var(--c-accent); }

.wordmark {
  justify-self: center;
  font-family: var(--f-display);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: var(--ls-display);
}

.nav-toggle { display: none; }

.m-nav {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-content: center; gap: var(--space-2);
  background: var(--c-bg);
  text-align: center;
}
.m-nav[hidden] { display: none; }
.m-nav a { font-family: var(--f-display); font-size: 3rem; line-height: 1; }
.m-nav a:hover { color: var(--c-accent); }
.m-nav__close {
  position: absolute; top: 2.25rem; right: var(--gutter);
  font-size: var(--fs-nav); letter-spacing: var(--ls-meta); text-transform: uppercase;
}

@media (max-width: 1024px) {
  .nav, .header__cta { display: none; }
  .header__inner { grid-template-columns: auto 1fr auto; }
  .wordmark { justify-self: start; }
  .nav-toggle {
    display: block; justify-self: end;
    font-size: var(--fs-nav); letter-spacing: var(--ls-meta); text-transform: uppercase;
  }
}


/* ============ 6. Sections =================================== */

/* ---- Hero ------------------------------------------------ */
/* Copy on espresso, product photo filling the right column. */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 4rem;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + 1rem) max(var(--gutter), (100% - var(--container)) / 2 + var(--gutter)) var(--space-4);
  background:
    radial-gradient(ellipse 45% 55% at 78% 50%, color-mix(in srgb, var(--c-gold) 22%, transparent), transparent 70%),
    linear-gradient(160deg, var(--c-roast) 0%, var(--c-bg) 65%);
}
.hero h1 { margin: 0; font-weight: 400; }
.hero__title {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(3rem, 6.2vw, 6.25rem);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}
.hero__title em { font-style: italic; }
.hero__sub {
  display: block;
  margin-top: 1.25rem;
  color: var(--c-accent);
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-style: italic;
  line-height: 1;
  letter-spacing: var(--ls-display);
}

.hero__media { position: relative; margin: 0; align-self: stretch; }
.hero__media .media {
  width: 100%; height: 100%;
  min-height: 520px;
  max-height: calc(100svh - var(--header-h) - var(--space-4) - 1rem);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
}
.hero .seal { left: -64px; right: auto; bottom: 14%; }

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: var(--space-4); min-height: 0; }
  .hero__media .media { min-height: 0; max-height: none; aspect-ratio: 4 / 5; }
  .hero .seal { left: 16px; bottom: 24px; }
}

/* Decorative beans (bean piles); size/rotation/delay come from custom properties */
.bean {
  position: absolute;
  width: var(--s, 28px); height: auto;
  color: var(--c-bean);
  rotate: var(--r, 0deg);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45));
  animation: float 6s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s);
}
@keyframes float { to { transform: translateY(-16px); } }

/* ---- Why: photo + text with linked icon list -------------- */
.why {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem;
  margin-top: 4rem;
}
.why__media { aspect-ratio: 4 / 3.4; }

.icon-list { display: grid; gap: 1.75rem; margin-top: 2.5rem; }
.icon-list li {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.25rem;
}
.icon-list p { margin: 0; }
.icon-list li + li::before {      /* dashed thread between badges */
  content: "";
  position: absolute; top: -1.75rem; left: 28px;
  height: 1.75rem;
  border-left: 2px dashed var(--c-accent);
  opacity: .45;
}

@media (max-width: 1024px) { .why { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---- Product: text + features beside the video, detail strip below */
.product {
  display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: var(--space-4) 4.5rem;
}
.product__media { position: relative; grid-column: 2; grid-row: 1 / span 2; }
.product__media .media { display: block; aspect-ratio: 16 / 10; box-shadow: 0 30px 60px rgba(36, 23, 16, .2); }
.product__kicker { margin: 0 0 1.75rem; }

.seal {
  position: absolute; right: -30px; bottom: 40px;
  display: grid; place-items: center;
  width: 150px; height: 150px;
  padding: 18px;
  border-radius: 50%;
  background: var(--c-gold);
  color: var(--c-ink);
  box-shadow: 0 12px 30px rgba(36, 23, 16, .25);
  font-size: var(--fs-caption);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .3px;
  text-align: center;
  text-transform: uppercase;
  rotate: -10deg;
}
.product__media .seal { right: auto; left: -40px; bottom: -40px; }

.feature-list { display: grid; gap: var(--space-3); }
.feature-list li { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 1.25rem; }
.feature-list .d3 { margin: .35rem 0 .45rem; }
.feature-list p { margin: 0; }

.details {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
  margin-top: var(--space-5);
}
.details .media { aspect-ratio: 4 / 3; }
.details li:nth-child(2) { translate: 0 2rem; }

@media (max-width: 1024px) {
  .product { grid-template-columns: 1fr; }
  .product__media { grid-column: auto; grid-row: auto; }
  .product__media .seal { left: auto; right: 16px; bottom: -40px; scale: .85; }
}
@media (max-width: 768px) {
  .details { grid-template-columns: 1fr 1fr; margin-top: var(--space-4); }
  .details li:nth-child(2) { translate: none; }
  .details li:first-child { grid-column: span 2; }
}

/* ---- Pellets + where-to-use tiles ------------------------- */
.pellets { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; }
.pellets .media { aspect-ratio: 4 / 4.4; }

.tiles__head { margin-top: 6rem; }
.tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(200px, auto);
  gap: var(--space-1);
  margin-top: var(--space-4);
}
.tile {
  display: grid; justify-items: center; align-content: center; gap: var(--space-1);
  padding: var(--space-2) var(--space-1);
  border: var(--rule) solid rgba(248, 225, 205, .12);
  border-radius: var(--radius-sm);
  background: var(--c-brown);
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: var(--ls-meta);
  text-align: center;
  text-transform: uppercase;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.tile .icon { width: 3.25rem; height: 3.25rem; stroke-width: 1.2; }
.tile:hover { transform: translateY(-6px); background: var(--c-brown-hover); }

/* Lead tile: a real photo, label on a gradient at the bottom */
.tile--photo {
  position: relative; isolation: isolate; overflow: hidden;
  grid-column: span 2; grid-row: span 2;
  align-content: end; justify-items: start;
  padding: var(--space-2);
  border: 0;
}
.tile--photo img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: scale 1.2s var(--ease);
}
.tile--photo::after {
  content: ""; position: absolute; inset: 40% 0 0; z-index: -1;
  background: linear-gradient(transparent, color-mix(in srgb, var(--c-bg) 85%, transparent));
}
.tile--photo:hover { transform: none; }
.tile--photo:hover img { scale: 1.04; }

@media (max-width: 1024px) {
  .pellets { grid-template-columns: 1fr; gap: 2.5rem; }
  .tiles__head { margin-top: var(--space-5); }
}
@media (max-width: 768px) {
  .tiles { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(150px, auto); }
  .tile--photo { grid-row: auto; aspect-ratio: 4 / 3; }
}

/* ---- Steps + supply chain --------------------------------- */
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2);
  margin-top: var(--space-5);
}
.step {
  position: relative;
  overflow: hidden;
  padding: 0 1.75rem 2.25rem;
  border: var(--rule) solid var(--c-rule);
  border-radius: var(--radius);
  background: var(--c-card);
  text-align: center;
}
.step__photo {
  width: calc(100% + 3.5rem); max-width: none;
  margin-inline: -1.75rem;
  aspect-ratio: 4 / 3; object-fit: cover;
}
.step .badge { position: relative; width: 64px; height: 64px; margin: -32px auto var(--space-2); }
.step__num {
  display: block;
  color: var(--c-accent);
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}
.step .d3 { margin: .5rem 0 .75rem; }
.step p { margin: 0; color: var(--c-muted); }

.chain {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem;
  margin-top: 3.5rem;
}
.chain li {
  display: flex; align-items: center; gap: .75rem;
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
}
.chain span { padding: .6rem 1.1rem; border-radius: var(--pill); background: var(--c-paper-2); }
.chain li:last-child span { background: var(--c-gold); }
.chain .icon { width: 1.1rem; height: 1.1rem; color: var(--c-accent); }

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
/* Phone: photo across the top, badge left of the text */
@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; row-gap: var(--space-2); margin-top: var(--space-4); }
  .step {
    display: grid; grid-template-columns: auto 1fr; column-gap: 1.25rem; align-items: start;
    padding: 0 1.25rem 1.5rem;
    text-align: left;
  }
  .step__photo { grid-column: 1 / -1; width: calc(100% + 2.5rem); margin: 0 -1.25rem 1.25rem; aspect-ratio: 16 / 9; }
  .step .badge { grid-row: span 3; width: 56px; height: 56px; margin: 0; }
  .step .d3 { margin: .35rem 0 .5rem; }
  .chain { flex-direction: column; gap: .5rem; margin-top: var(--space-4); }
  .chain li { flex-direction: column; gap: .5rem; }
  .chain .icon { rotate: 90deg; }
}

/* ---- Banner: full-bleed photo, fixed background ----------- */
.banner {
  position: relative;
  display: grid; place-items: center;
  min-height: 560px;
  padding: calc(var(--section-y) + 2.5rem) var(--gutter) var(--section-y);
  background:
    linear-gradient(color-mix(in srgb, var(--c-bg) 78%, transparent),
                    color-mix(in srgb, var(--c-bg) 86%, transparent)),
    url("../img/beans-closeup.jpg") center / cover no-repeat fixed;
  text-align: center;
}
/* The photo itself ends in the bump edge (a solid edge on the next
   section would show as a dark strip): mask = everything above the last
   --edge-h + the drip tile along the bottom, overlapping the next section. */
.banner {
  z-index: 1;
  margin-bottom: calc(-1 * var(--edge-h));
  padding-bottom: calc(var(--section-y) + var(--edge-h));
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--edge-h)) no-repeat,
                url("../img/drip.svg") 50% 100% / auto var(--edge-h) repeat-x;
          mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--edge-h)) no-repeat,
                url("../img/drip.svg") 50% 100% / auto var(--edge-h) repeat-x;
}
.banner + .section { padding-top: calc(var(--section-y) + 2rem); }
.banner .body { margin-inline: auto; }
.banner__question {
  max-width: 22ch;
  margin: var(--space-3) auto 0;
  color: var(--c-accent);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

@media (max-width: 1024px) {
  .banner { background-attachment: scroll; }   /* fixed backgrounds judder on touch */
}

/* ---- Circular story: the principle, then four aims as photo cards */
.principle { display: grid; gap: 1rem; margin: var(--space-4) 0 var(--space-3); }
.principle > span:first-child { color: var(--c-muted); }
.principle em { color: var(--c-accent); }

.aims {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-1);
  margin-top: var(--space-4);
  counter-reset: aim;
}
.aim {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-content: end;
  aspect-ratio: 3 / 4.2;
  padding: var(--space-2);
  border-radius: var(--radius);
  color: var(--c-cream);
  counter-increment: aim;
}
.aim img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: scale 1.2s var(--ease);
}
.aim::before {                  /* scrim so the text reads on any photo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, color-mix(in srgb, var(--c-bg) 92%, transparent) 15%, transparent 70%);
}
.aim:hover img { scale: 1.05; }
.aim__body::before {            /* 01 … 04 */
  content: counter(aim, decimal-leading-zero);
  display: block;
  color: var(--c-caramel);
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
}
.aim .d3 { margin: .4rem 0 .5rem; }
.aim p { margin: 0; opacity: .85; }

@media (max-width: 1024px) { .aims { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .aims { grid-template-columns: 1fr; } .aim { aspect-ratio: 4 / 3.6; } }

/* ---- Journey: sticky text + staggered photo collage -------- */
.journey { display: grid; grid-template-columns: 1fr 1.2fr; align-items: start; gap: 5rem; }
.journey__text { position: sticky; top: var(--space-4); }

.collage {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
  padding-bottom: 4rem;
}
.collage figure { margin: 0; }
.collage .media { aspect-ratio: 4 / 5; }
/* 01 and 04 are landscape photos: keep them uncropped (4:3) and pull 03 up under 01,
   so both columns end level (4:5 − 4:3 = 50% of the column width) */
.collage > :is(:nth-child(1), :nth-child(4)) .media { aspect-ratio: 4 / 3; }
.collage > :nth-child(3) { margin-top: -50%; }
.collage .caption b { margin-right: .4rem; color: var(--c-cream); font-family: var(--f-display); font-size: 1.5rem; font-weight: 400; }
.collage > :nth-child(even) { translate: 0 4rem; }

@media (max-width: 1024px) {
  .journey { grid-template-columns: 1fr; gap: 2.5rem; }
  .journey__text { position: static; }
}
@media (max-width: 480px) { .collage > :nth-child(even) { translate: 0 2rem; } }

/* ---- About: the name as an equation ------------------------ */
.equation {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center;
  gap: 1rem 2.5rem;
  margin: 3.5rem 0 4rem;
}
.equation__term { text-align: center; }
.equation__term .d1 { display: block; }
.equation__term .caption { display: block; margin-top: .75rem; }
.equation__term--result .d1 { color: var(--c-accent); }
.equation__op {
  color: var(--c-accent);
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
}

.about-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2) 4rem;
  max-width: 1100px; margin-inline: auto;
}
.about-cols .body { max-width: none; }

.support {
  display: flex; align-items: center; gap: 1.25rem;
  max-width: 1100px;
  margin: var(--space-4) auto 0;
  padding: 1.25rem var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--c-paper-2);
}
.support p { margin: 0; }

@media (max-width: 768px) { .about-cols { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .equation { gap: .5rem 1.25rem; } }

/* ---- CTA card: photo + pitch on the left, contact form on the right */
.cta {
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
}
.cta__intro { display: grid; grid-template-rows: auto 1fr; background: var(--c-roast); }
.cta__intro .media { aspect-ratio: 4 / 3; border-radius: 0; }
.cta__intro > div { padding: clamp(2rem, 4vw, 3.5rem); }
.cta__body { align-self: center; padding: clamp(2rem, 4vw, 3.5rem); }

@media (max-width: 1024px) { .cta { grid-template-columns: 1fr; } }

/* ---- Contact form (dark surface) --------------------------- */
.form { display: grid; gap: var(--space-2); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }

.field { display: grid; gap: .5rem; }
.field > span, .form__topics legend {
  font-size: var(--fs-caption); font-weight: 600;
  letter-spacing: var(--ls-meta); text-transform: uppercase;
  color: var(--c-accent);
}
.field input, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: var(--rule) solid var(--c-rule);
  border-radius: var(--radius-sm);
  background: rgba(248, 225, 205, .06);
  color: var(--c-cream);
  font: inherit;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field :is(input, textarea):focus { outline: none; border-color: var(--c-gold); background: rgba(248, 225, 205, .1); }

.form__topics { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; border: 0; }
.form__topics legend { margin-bottom: .75rem; padding: 0; }
.form__topics label { position: relative; cursor: pointer; }
.form__topics input { position: absolute; opacity: 0; pointer-events: none; }
.form__topics span {
  display: inline-block;
  padding: .6rem 1.1rem;
  border: var(--rule) solid var(--c-rule);
  border-radius: var(--pill);
  font-weight: 600;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.form__topics input:checked + span { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-ink); }
.form__topics input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 3px; }

/* Turnstile (interaction-only): out of the grid flow (no empty row or gap) until it needs a click */
.form { position: relative; }
.form__captcha:not(.is-open) { position: absolute; width: 0; height: 0; overflow: hidden; }
.form .btn { justify-self: start; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.form__status { margin: 0; color: var(--c-caramel); }
.form__done { display: grid; gap: .75rem; margin: 0; }
:is(.form, .form__status, .form__done)[hidden] { display: none; }

@media (max-width: 480px) { .form__row { grid-template-columns: 1fr; } }

/* ---- Footer ------------------------------------------------ */
.footer { position: relative; overflow: hidden; padding-top: calc(var(--section-y) + 2rem); }
.footer__cols {
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: var(--space-3);
}
.footer__cols > :nth-child(2) { text-align: center; }
.footer__cols > :nth-child(3) { text-align: right; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.footer__brand .wordmark { margin: 0; }
.footer__logo { width: 5.5rem; }
.footer h2 {
  margin: 0 0 var(--space-1);
  font-family: var(--f-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}
.footer li + li { margin-top: .5rem; }
.footer a:hover { color: var(--c-accent); }

.socials { display: flex; gap: 1.25rem; margin-top: var(--space-2); }
.socials a { font-size: var(--fs-meta); letter-spacing: var(--ls-meta); text-transform: uppercase; }

.footer__bar {
  display: grid; margin-top: var(--space-4); grid-template-columns: repeat(3, 1fr);
  padding-block: var(--space-2);
  font-size: var(--fs-meta);
}
.footer__bar > :nth-child(2) { text-align: center; }
.footer__bar > :nth-child(3) { text-align: right; }

@media (max-width: 768px) {
  .footer__cols, .footer__bar { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer__bar { gap: .5rem; }
  :is(.footer__cols, .footer__bar) > :is(:nth-child(2), :nth-child(3)) { text-align: left; }
}

/* ---- Logo ideas (logo-ideas.html, for the client) ---------- */
.ideas { display: grid; gap: var(--space-4); }
.idea__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: var(--space-2); }
.idea__head b { font-family: var(--f-display); font-size: 2.5rem; font-weight: 400; color: var(--c-accent); }
.idea__head .d3 { margin: 0 0 .4rem; }
.idea__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.idea__tile {
  --tile-bg: var(--c-bg);
  display: grid; place-items: center; align-content: center; gap: 1rem;
  min-height: 22rem; padding: var(--space-3);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--c-rule);
}
.idea__tile.light { --tile-bg: var(--c-paper); }
.idea__tile svg { width: 11rem; height: auto; color: var(--c-accent); }
.idea__tile .wordmark { margin: 0; }
.idea__cut { fill: none; stroke: var(--tile-bg); stroke-linecap: round; stroke-linejoin: round; }
.idea__word { margin: 0; font-family: var(--f-display); font-size: clamp(4rem, 9vw, 6.5rem); line-height: 1; }
.idea__word em { color: var(--c-accent); }

@media (max-width: 768px) {
  .idea__tiles { grid-template-columns: 1fr; }
  .idea__tile { min-height: 16rem; }
}

/* ---- Not found (404) --------------------------------------- */
.not-found {
  position: relative;
  display: grid; align-content: end;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--c-bg) 95%, transparent),
                            color-mix(in srgb, var(--c-bg) 40%, transparent) 65%),
    url("../img/grounds-wide.jpg") center / cover no-repeat;
}
.not-found__body {            /* centred on the viewport; the title sits at the bottom */
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0 var(--gutter);
}
.not-found__body > div { max-width: 380px; text-align: center; }
.not-found__body .actions { justify-content: center; margin-top: 1.25rem; }
.not-found__title {
  margin: 0 0 -.1em;
  padding-inline: var(--gutter);
  font-size: 17vw;
  white-space: nowrap;
}


/* ============ 7. Reduced motion ============================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
