/* =========================================================
   LYF — shared styles
   Palette taken from the reference site (Henrietta Said)
   ========================================================= */

:root {
  /* Base */
  --paper: #FBFAF7;    /* page background (the logo's own white) */
  --blush: #E3A898;    /* legacy, unused */
  --ink: #2D2A26;
  --bone: #EFECE7;
  /* Accents */
  --mustard: #FFC21A;  /* bright surface yellow */
  --logo-yellow: #E9AA00; /* logo y, exact brand */
  --red: #CB000E;      /* logo l + dot */
  --oxblood: #7E0A10;  /* deep logo red, for text on light */
  --teal: #00CA9D;     /* logo f */

  /* Semantic */
  --bg: var(--paper);
  --fg: var(--ink);
  --surface: var(--bone);
  --focus: var(--ink);

  /* Type */
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat Brush", "Segoe Print", cursive;

  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.95rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.8rem, 2rem + 4vw, 5.5rem);
  --step-5: clamp(3.6rem, 2.2rem + 8vw, 10rem);

  /* Space (spacious, 8pt rhythm) */
  --s1: 0.5rem;  --s2: 1rem;  --s3: 1.5rem; --s4: 2rem;
  --s5: 3rem;    --s6: 4rem;  --s7: 6rem;   --s8: 8rem;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --radius-pill: 999px;
  --radius-card: 22px;
  --radius-bar: 14px;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 64ch; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark { --focus: var(--mustard); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bone); padding: .75rem 1.25rem;
  border-radius: var(--radius-pill); text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.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;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Display type ---------- */
.display {
  font-family: var(--font);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: -0.005em;
}
.hand { font-family: var(--hand); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 12px var(--gutter) 0;
}
.nav-bar {
  max-width: var(--max); margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: var(--s2);
  background: var(--bone);
  border-radius: 16px;
  padding: 8px 8px 8px 20px;
  box-shadow: 0 1px 0 rgba(45, 42, 38, .12);
}
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 10px 0; position: relative; white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.brand {
  justify-self: center; text-decoration: none; display: flex; flex-direction: column;
  align-items: center; line-height: 1;
}
.brand-mark { font-size: 2.1rem; }
.brand-tag { font-family: var(--hand); font-size: .95rem; margin-top: -2px; color: var(--red); }

.nav-end { justify-self: end; display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 1.4rem;
  font: 700 .95rem/1 var(--font);
  text-decoration: none; border: 0; cursor: pointer;
  border-radius: 12px;
  transition: transform .15s var(--ease-out), background-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: var(--bone); }
.btn-ink:hover { background: var(--oxblood); }
.btn-mustard { background: var(--mustard); color: var(--ink); }
.btn-mustard:hover { background: var(--bone); }
.btn-outline { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-outline:hover { background: var(--ink); color: var(--bone); box-shadow: none; }
.btn-lg { min-height: 60px; padding: 0 2rem; font-size: 1.05rem; border-radius: 16px; }

.menu-toggle {
  display: none; width: 48px; height: 48px; border-radius: 12px; border: 0;
  background: var(--ink); color: var(--bone); cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 980px) {
  .nav-bar { grid-template-columns: auto 1fr auto; padding-left: 16px; }
  .brand { justify-self: start; grid-column: 1; grid-row: 1; align-items: flex-start; }
  .nav-end { grid-column: 3; grid-row: 1; }
  .nav-end .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none; grid-column: 1 / -1; grid-row: 2; flex-direction: column; gap: 0;
    padding: 8px 0 12px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 4px; font-size: 1.25rem; border-top: 1px solid rgba(45,42,38,.15); }
  .nav-links a::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--red); }
  .nav-links .mobile-cta { display: block; }
}
@media (min-width: 981px) { .nav-links .mobile-cta { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 110px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-title { font-size: var(--step-5); color: var(--ink); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span { display: inline-block; }
.hero-sub {
  margin-top: var(--s4);
  display: grid; grid-template-columns: minmax(0, 34rem) auto; gap: var(--s4);
  align-items: end; justify-content: space-between;
}
.hero-sub p { font-size: var(--step-1); line-height: 1.5; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.stickers { position: absolute; inset: 0; pointer-events: none; }
.sticker {
  position: absolute; display: inline-block;
  padding: .5rem 1.1rem .45rem;
  border-radius: var(--radius-pill);
  font-family: var(--hand); font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem); line-height: 1.1;
  box-shadow: 0 6px 0 rgba(45,42,38,.18);
}
.sticker.s1 { background: var(--mustard); color: var(--ink); top: 12%; right: 6%; transform: rotate(8deg); }
.sticker.s2 { background: var(--teal); color: var(--ink); top: 44%; right: 18%; transform: rotate(-6deg); }
.sticker.s3 { background: #fff; color: var(--ink); top: 30%; right: 2%; transform: rotate(-12deg); }

@media (max-width: 760px) {
  .hero-sub { grid-template-columns: 1fr; }
  .stickers { position: static; display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s4); }
  .sticker { position: static; }
}

/* Hero load sequence is driven by assets/motion.js (GSAP). */

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { font-size: var(--step-5); }
.page-hero .lede { font-size: var(--step-1); margin-top: var(--s3); max-width: 40ch; }
.page-hero .hand-note { font-size: var(--step-2); color: var(--red); margin-top: var(--s2); display: block; }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--ink); color: var(--bone);
  overflow: hidden; position: relative;
  border-block: 0;
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee ul { display: flex; align-items: center; }
.marquee li {
  display: flex; align-items: center; gap: 28px; padding: 22px 0 18px 28px;
  font-size: var(--step-2); white-space: nowrap;
}
.marquee li svg { width: 22px; height: 22px; color: var(--mustard); flex: none; }
.marquee:hover .marquee-track,
.marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee-pause {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--bone); color: var(--ink); display: grid; place-items: center;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; width: auto; }
  .marquee-track > ul[aria-hidden="true"] { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; padding: 12px var(--gutter); }
  .marquee li { padding: 8px 14px; font-size: var(--step-1); }
  .marquee-pause { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 140px) 0; }
.section-head { display: grid; gap: var(--s2); margin-bottom: clamp(32px, 5vw, 64px); }
.section-head h2 { font-size: var(--step-4); }
.section-head p { font-size: var(--step-1); margin: 0; }
.section-head .hand { font-size: var(--step-2); color: var(--red); }

.bg-bone { background: var(--bone); }
.bg-ink { background: var(--ink); color: var(--bone); }
.bg-red { background: var(--red); color: #fff; } /* white keeps small text above 4.5:1 on red */
.bg-oxblood { background: var(--oxblood); color: var(--bone); }
.bg-mustard { background: var(--mustard); color: var(--ink); }
.bg-teal { background: var(--teal); color: var(--ink); }

/* ---------- Proof sentence ---------- */
.proof { padding: clamp(56px, 8vw, 110px) 0; }
.proof-line { font-size: var(--step-4); }
.proof-line span { display: inline; }
.proof-line .n { color: var(--red); }
.proof-note { margin-top: var(--s3); font-size: var(--step-1); }

/* ---------- Pillars ---------- */
.pillar {
  position: relative; overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0;
}
.pillar-ghost {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: clamp(8rem, 26vw, 26rem); white-space: nowrap; pointer-events: none;
  opacity: .14; color: currentColor; user-select: none;
}
.pillar-inner {
  position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s5);
  align-items: start;
}
.pillar h2, .pillar h3.pillar-title { font-size: var(--step-4); }
.pillar .hand { font-size: var(--step-2); display: block; margin-top: var(--s2); }
.pillar-list li {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 16px 0; border-top: 2px solid currentColor;
  font-weight: 700; font-size: var(--step-1);
}
.pillar-list li:last-child { border-bottom: 2px solid currentColor; }
.pillar-list small { font-weight: 600; font-size: var(--step--1); text-align: right; }
.pillar .btn { margin-top: var(--s4); }
@media (max-width: 860px) {
  .pillar-inner { grid-template-columns: 1fr; }
  .pillar-list small { display: none; }
}

/* ---------- Quote ---------- */
.big-quote { font-size: var(--step-3); line-height: 1.02; max-width: 22ch; }
.big-quote-cite { display: block; margin-top: var(--s3); font-family: var(--hand); font-size: var(--step-2); color: var(--red); }

/* ---------- Case studies ---------- */
.cases { display: grid; gap: clamp(20px, 3vw, 32px); }
.case {
  border-radius: var(--radius-card);
  padding: clamp(24px, 4vw, 56px);
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 56px);
}
.case-sector { font-family: var(--hand); font-size: var(--step-1); }
.case h3 { font-size: var(--step-3); margin: .4rem 0 1rem; }
.case-client { font-weight: 700; margin: 0 0 1rem; }
.case-note { font-size: var(--step--1); opacity: .85; margin-top: 1.25rem; }
.case-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-bottom: 28px; }
.case-metrics dt { font-size: var(--step-3); font-weight: 800; font-stretch: 75%; font-variation-settings: "wdth" 75; line-height: 1; }
.case-metrics dd { margin: .35rem 0 0; font-size: var(--step--1); font-weight: 600; }
.case-metrics div { display: flex; flex-direction: column-reverse; }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; margin: 0; }
.bars li { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; font-size: .8rem; font-weight: 700; }
.bars .bar { width: 100%; border-radius: 8px 8px 3px 3px; background: currentColor; height: var(--h); transform-origin: bottom; }
.bars-caption { font-size: var(--step--1); margin-top: 10px; opacity: .9; }
.js .bars .bar { transform: scaleY(0); }
.js .in-view .bars .bar { transform: scaleY(1); transition: transform .8s var(--ease-out); }
.js .in-view .bars li:nth-child(2) .bar { transition-delay: .05s; }
.js .in-view .bars li:nth-child(3) .bar { transition-delay: .1s; }
.js .in-view .bars li:nth-child(4) .bar { transition-delay: .15s; }
.js .in-view .bars li:nth-child(5) .bar { transition-delay: .2s; }
.js .in-view .bars li:nth-child(6) .bar { transition-delay: .25s; }
.js .in-view .bars li:nth-child(7) .bar { transition-delay: .3s; }
.js .in-view .bars li:nth-child(8) .bar { transition-delay: .35s; }
@media (prefers-reduced-motion: reduce) { .js .bars .bar { transform: none; transition: none; } }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote-card {
  background: var(--bone); border-radius: var(--radius-card); padding: 28px;
  display: flex; flex-direction: column; gap: 20px; margin: 0;
}
.quote-card blockquote { margin: 0; font-size: var(--step-1); line-height: 1.45; }
.quote-card figcaption { display: flex; gap: 14px; align-items: center; margin-top: auto; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 1rem;
}
.quote-card .who { font-weight: 700; line-height: 1.3; }
.quote-card .role { font-size: var(--step--1); }
.footnote { font-size: var(--step--1); margin-top: var(--s3); }
@media (max-width: 960px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- Journal ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post {
  border-radius: var(--radius-card); overflow: hidden; background: var(--bone);
  display: flex; flex-direction: column;
}
.post-cover {
  aspect-ratio: 4 / 3; display: flex; align-items: flex-end; padding: 22px;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-meta { font-size: var(--step--1); font-weight: 600; color: var(--red); }
.post h3 { font-size: var(--step-1); line-height: 1.2; }
.post p { margin: 0; font-size: var(--step--1); }
@media (max-width: 960px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .posts { grid-template-columns: 1fr; } }

/* Journal page: expandable articles */
.article-list { display: grid; gap: 16px; }
.article {
  background: var(--bone); border-radius: var(--radius-card); overflow: hidden;
}
.article summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: center;
  padding: 18px 24px 18px 18px;
}
.article summary::-webkit-details-marker { display: none; }
.article .swatch {
  aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center;
  font-size: 2.4rem;
}
.article h2 { font-size: var(--step-2); line-height: 1.1; font-weight: 800; }
.article .post-meta { margin-bottom: 6px; display: block; }
.article .chev {
  width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--bone);
  display: grid; place-items: center; transition: transform .25s var(--ease-out);
}
.article[open] .chev { transform: rotate(45deg); }
.article-body { padding: 0 24px 32px calc(18px + 120px + 24px); }
.article-body p { font-size: var(--step-0); }
@media (max-width: 700px) {
  .article summary { grid-template-columns: 64px 1fr auto; gap: 14px; }
  .article .swatch { font-size: 1.4rem; border-radius: 10px; }
  .article-body { padding: 0 20px 24px; }
}

/* ---------- Process (genuine sequence) ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.process li {
  padding: 26px 22px 30px; border-top: 2px solid currentColor;
  display: flex; flex-direction: column; gap: 8px;
}
.process li:not(:nth-child(4n)) { border-right: 2px solid currentColor; }
.process .num { font-weight: 800; font-stretch: 75%; font-variation-settings: "wdth" 75; font-size: var(--step-3); line-height: 1; color: var(--mustard); }
.process h3 { font-size: var(--step-1); }
.process p { margin: 0; font-size: var(--step--1); opacity: .9; }
@media (max-width: 960px) {
  .process { grid-template-columns: 1fr 1fr; }
  .process li:not(:nth-child(4n)) { border-right: 0; }
  .process li:nth-child(odd) { border-right: 2px solid currentColor; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .process li:nth-child(odd) { border-right: 0; }
}

/* ---------- Service detail ---------- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0; }
.service {
  padding: 28px 28px 32px 0; border-top: 2px solid currentColor;
}
.service h4 { font-size: var(--step-2); font-weight: 800; }
.service .promise { font-family: var(--hand); font-size: var(--step-1); margin: 4px 0 14px; }
.service ul { display: flex; flex-wrap: wrap; gap: 8px; }
.service li {
  font-size: var(--step--1); font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

/* Industries */
.industries { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.industries li {
  font-size: var(--step-1); font-weight: 700;
  padding: 10px 20px; border-radius: var(--radius-pill); background: var(--bone);
}

/* ---------- Story page ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.vm { display: grid; gap: 20px; }
.vm-card { border-radius: var(--radius-card); padding: 32px; }
.vm-card h3 { font-family: var(--hand); font-weight: 400; font-size: var(--step-2); margin-bottom: 8px; }
.vm-card p { font-size: var(--step-1); line-height: 1.45; margin: 0; }

.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 4vw, 64px); }
.principles li { border-top: 2px solid currentColor; padding: 24px 0 28px; }
.principles h3 { font-size: var(--step-2); margin-bottom: 8px; }
.principles p { margin: 0; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

.disciplines { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.disciplines li { background: var(--bone); color: var(--ink); border-radius: 18px; padding: 22px 22px 24px; }
.disciplines h3 { font-size: var(--step-1); margin-bottom: 6px; }
.disciplines p { margin: 0; font-size: var(--step--1); }

.results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.results div { border-top: 2px solid currentColor; padding: 22px 16px 26px 0; display: flex; flex-direction: column-reverse; gap: 4px; }
.results dt { font-weight: 600; font-size: var(--step--1); }
.results dd { margin: 0; font-size: var(--step-4); font-weight: 800; font-stretch: 75%; font-variation-settings: "wdth" 75; line-height: .95; }
@media (max-width: 860px) { .results { grid-template-columns: 1fr 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.steps { display: grid; gap: 14px; margin: var(--s4) 0; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.steps .num {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bone); font-weight: 800; font-size: 1.2rem;
}
.steps h3 { font-size: var(--step-1); }
.steps p { margin: 2px 0 0; }
.contact-lines { display: grid; gap: 10px; margin-top: var(--s4); }
.contact-lines a {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px;
  font-size: var(--step-1); font-weight: 700; text-decoration: none;
}
.contact-lines a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-lines svg { width: 24px; height: 24px; flex: none; }

.form { background: var(--bone); border-radius: var(--radius-card); padding: clamp(24px, 4vw, 44px); display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.field label, .field legend { font-weight: 700; font-size: .95rem; }
.field .req { color: var(--red); }
.field .hint { font-size: var(--step--1); margin: 0; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--ink); border-radius: 12px;
  min-height: 52px; padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--red); outline-offset: 1px;
}
.field [aria-invalid="true"] { border-color: var(--red); background: #fff6f4; }
.error { color: #A1201A; font-size: var(--step--1); font-weight: 700; margin: 0; display: flex; gap: 6px; align-items: center; }
.error:empty { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.checks label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 2px var(--ink); font-weight: 600; font-size: .95rem;
}
.checks input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.checks label:has(input:checked) { background: var(--ink); color: var(--bone); }
.checks label:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.form-status { border-radius: 14px; padding: 16px 18px; font-weight: 600; }
.form-status:empty { display: none; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form button[type="submit"][aria-busy="true"] { opacity: .7; cursor: progress; }
.form-status.ok { background: var(--mustard); }
.form-status.err { background: var(--red); color: var(--bone); }

/* ---------- CTA + Footer ---------- */
.cta-band { padding: clamp(72px, 10vw, 140px) 0; }
.cta-band h2 { font-size: var(--step-5); }
.cta-band p { font-size: var(--step-1); margin-top: var(--s3); font-weight: 700; }
.bg-teal .btn-outline, .cta-band.bg-red .btn-outline { background: var(--bone); color: var(--ink); box-shadow: none; }
.bg-teal .btn-outline:hover, .cta-band.bg-red .btn-outline:hover { background: var(--mustard); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s4); }

.site-footer { background: var(--ink); color: var(--bone); padding: var(--s6) 0 var(--s4); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s5); }
.footer-grid h2 { font-family: var(--hand); font-weight: 400; font-size: var(--step-1); margin-bottom: 12px; color: var(--mustard); }
.footer-grid a { text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-brand .brand-mark { font-size: 4.5rem; line-height: .9; }
.footer-brand p { margin-top: 12px; max-width: 32ch; }
.footer-base {
  margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid rgba(234,230,227,.25);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: var(--step--1);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s4); } }

/* ---------- Reveal on scroll (subtle, once) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in-view { opacity: 1; transform: none; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* Utilities */
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.center { text-align: center; }

/* =========================================================
   MOTION LAYER
   Everything below is progressive: the site reads fine
   without JS/GSAP and with prefers-reduced-motion.
   ========================================================= */

/* Grain texture over everything */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9990;
  opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Hero ---------- */
.hero { min-height: min(100svh, 980px); display: flex; flex-direction: column; justify-content: center; }
.hero .wrap { position: relative; z-index: 2; }
.hero-title .line { overflow: clip; padding-bottom: .06em; }
.hero-title .line:last-of-type { padding-bottom: .2em; }
.rotator { position: relative; display: inline-block; }
.rot-word { display: inline-block; color: var(--red); will-change: transform; }
.scribble {
  position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .2em;
  color: var(--mustard); overflow: visible; pointer-events: none;
}
.hero-blob {
  position: absolute; z-index: 0; right: -6vw; top: 6%;
  width: clamp(280px, 46vw, 700px); aspect-ratio: 1; color: var(--red);
  pointer-events: none;
}
.hero-blob svg { width: 100%; height: 100%; }
.stickers { z-index: 3; }
.sticker.s4 { background: var(--bone); color: var(--ink); top: 62%; right: 34%; transform: rotate(4deg); }
.sticker.s5 { background: var(--ink); color: var(--bone); top: 20%; right: 30%; transform: rotate(-4deg); }
@media (pointer: fine) and (min-width: 761px) {
  .sticker { pointer-events: auto; cursor: grab; touch-action: none; user-select: none; }
  .sticker.is-dragging { cursor: grabbing; z-index: 5; box-shadow: 0 16px 0 rgba(45,42,38,.2); }
}
.badge {
  position: absolute; z-index: 4; right: clamp(16px, 6vw, 96px); bottom: clamp(24px, 6vh, 64px);
  width: clamp(120px, 12vw, 168px); aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); color: var(--bone); display: grid; place-items: center;
  text-decoration: none; transition: background-color .3s;
}
.badge:hover { background: var(--oxblood); }
.badge-ring { position: absolute; inset: 6%; width: 88%; height: 88%; animation: spin 16s linear infinite; }
.badge-ring text { font: 800 15.5px/1 var(--font); letter-spacing: .12em; fill: currentColor; }
.badge-arrow { width: 30%; height: 30%; transition: transform .35s var(--ease-out); }
.badge:hover .badge-arrow { transform: rotate(45deg) scale(1.1); }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; z-index: 2; font-size: 1.15rem; color: var(--red); }
@media (max-width: 760px) {
  .hero { min-height: 0; }
  .hero-blob { width: 62vw; right: -26vw; top: -30px; }
  .badge { position: relative; right: auto; bottom: auto; margin: var(--s4) 0 0 var(--gutter); width: 120px; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .badge-ring { animation: none; } }

/* ---------- Crossed tapes ---------- */
.tapes {
  position: relative; height: clamp(190px, 22vw, 280px);
  overflow: clip; display: grid; place-items: center;
}
.tape { position: absolute; left: -6%; width: 112%; box-shadow: 0 10px 0 rgba(45,42,38,.15); }
.tape-a { background: var(--ink); color: var(--bone); transform: rotate(-3.5deg); z-index: 2; }
.tape-b { background: var(--mustard); color: var(--ink); transform: rotate(3deg); z-index: 1; }
.tape-track { display: flex; width: max-content; will-change: transform; }
.tape ul { display: flex; align-items: center; }
.tape li {
  display: flex; align-items: center; gap: 28px; padding: 20px 0 16px 28px;
  font-size: var(--step-2); font-weight: 800; white-space: nowrap;
  font-stretch: 75%; font-variation-settings: "wdth" 75; text-transform: uppercase; letter-spacing: .01em;
}
.tape li svg { width: 22px; height: 22px; flex: none; }
.tape-a li svg { color: var(--mustard); }
.tape-b li svg { color: var(--ink); }
.tape-a .tape-track { animation: marquee 46s linear infinite; }
.tape-b .tape-track { animation: marquee-rev 40s linear infinite; }
@keyframes marquee-rev { from { transform: translateX(-33.333%); } to { transform: translateX(0); } }
.tapes.is-paused .tape-track { animation-play-state: paused; }
.tapes .marquee-pause { top: auto; bottom: 10px; transform: none; z-index: 3; background: var(--ink); color: var(--bone); }
.motion .tape-track { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .tapes { height: auto; padding: 24px 0; }
  .tape { position: relative; left: 0; width: 100%; transform: none; }
  .tape-b { display: none; }
  .tape-track { animation: none !important; width: auto; }
  .tape-track > ul[aria-hidden="true"] { display: none; }
  .tape ul { flex-wrap: wrap; justify-content: center; padding: 8px var(--gutter); }
  .tape li { padding: 8px 14px; font-size: var(--step-1); }
  .tapes .marquee-pause { display: none; }
}

/* ---------- Stacking pillars (home) ---------- */
@media (min-width: 900px) and (min-height: 640px) {
  .stack .stack-card {
    position: sticky; top: 0; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    border-radius: 32px 32px 0 0; transform-origin: 50% 0;
  }
  .stack .stack-card:first-child { border-radius: 0; }
}
.pillar-list li { transition: padding-left .3s var(--ease-out); }
.pillar-list li:hover { padding-left: 14px; }

/* ---------- Horizontal case studies ---------- */
.work.h-scroll { overflow-x: clip; }
.work.h-scroll .cases { display: flex; width: max-content; gap: 32px; }
.work.h-scroll .case { width: min(82vw, 1080px); flex: none; }

.motion .pillar-ghost { transform: none; }

/* ---------- LYF logo (inline SVG, brand colours from the logo file) ---------- */
.lyf-logo { display: block; overflow: visible; }
.lyf-logo .lg-l, .lyf-logo .lg-dot { fill: var(--red); }
.lyf-logo .lg-y { fill: var(--logo-yellow); }
.lyf-logo .lg-f { fill: var(--teal); }
.footer-logo { height: 76px; width: auto; }

/* Header logo: big at the top of the page, tucks smaller once you scroll */
.brand { gap: 0; padding: 4px 0; }
.brand-logo { height: 68px; width: auto; transition: height .45s var(--ease-out); }
.brand-tag { transition: opacity .3s, max-height .35s var(--ease-out), margin .35s; max-height: 1.6em; }
.nav-bar { transition: padding .35s var(--ease-out); }
.site-header.is-scrolled .brand-logo { height: 46px; }
.site-header.is-scrolled .brand-tag { opacity: 0; max-height: 0; margin-top: -4px; }
@media (max-width: 980px) {
  .brand-logo { height: 52px; }
  .site-header.is-scrolled .brand-logo { height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .brand-logo, .brand-tag, .nav-bar { transition: none; } }

/* No-GSAP fallback: letters hop on hover with CSS (GSAP takes over when it loads) */
html:not(.motion) .brand-logo path, html:not(.motion) .brand-logo circle { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14%); } }
html:not(.motion) .brand:hover .brand-logo .lg-l { animation: hop .45s ease-out; }
html:not(.motion) .brand:hover .brand-logo .lg-y { animation: hop .45s .06s ease-out; }
html:not(.motion) .brand:hover .brand-logo .lg-f { animation: hop .45s .12s ease-out; }
html:not(.motion) .brand:hover .brand-logo .lg-dot { animation: hop .45s .18s ease-out; }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-logo * { animation: none !important; } }

/* ---------- Split text ---------- */
.w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- Playful hovers ---------- */
.quote-card { transition: transform .4s var(--ease-out), rotate .4s var(--ease-out); }
.motion .quote-card:nth-child(1) { rotate: -2deg; }
.motion .quote-card:nth-child(2) { rotate: 1.5deg; translate: 0 18px; }
.motion .quote-card:nth-child(3) { rotate: -1deg; }
.motion .quote-card:hover { rotate: 0deg; transform: scale(1.03); }
.post-cover { transition: font-size .5s var(--ease-out); }
.post:hover .post-cover { font-size: clamp(2.6rem, 2rem + 3vw, 4.4rem); }
.industries li { transition: background-color .25s, color .25s, transform .3s var(--ease-out); cursor: default; }
.industries li:nth-child(4n+1):hover { background: var(--red); color: #fff; }
.industries li:nth-child(4n+2):hover { background: var(--mustard); }
.industries li:nth-child(4n+3):hover { background: var(--teal); }
.industries li:nth-child(4n):hover { background: var(--ink); color: var(--bone); }
.industries li:hover { transform: rotate(-4deg) scale(1.08); }
.disciplines li { transition: transform .3s var(--ease-out), background-color .3s; }
.disciplines li:hover { transform: translateY(-6px) rotate(-1deg); background: var(--mustard); }
@media (prefers-reduced-motion: reduce) {
  .industries li:hover, .disciplines li:hover, .motion .quote-card:hover { transform: none; }
}

/* ---------- Footer wordmark ---------- */
.footer-giant { overflow: clip; margin-top: var(--s5); padding: 2vw 0 1vw; }
.giant-logo { width: 100%; height: auto; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9995; pointer-events: none;
  width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: var(--bone); mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), opacity .2s, background-color .2s;
}
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.cursor.has-label { width: 84px; height: 84px; margin: -42px 0 0 -42px; mix-blend-mode: normal; background: var(--ink); }
.cursor.is-hidden { opacity: 0; }
.cursor-label { font: 700 .8rem/1 var(--font); color: var(--bone); opacity: 0; transition: opacity .2s; }
.cursor.has-label .cursor-label { opacity: 1; }

/* ---------- Page wipe + preloader + progress ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 10000; background: var(--ink);
  display: grid; place-items: center; pointer-events: none;
}
.wipe .lyf-logo { width: min(48vw, 420px); height: auto; }
.preloader {
  position: fixed; inset: 0; z-index: 10001; background: var(--ink); color: var(--bone);
  display: grid; place-items: center; overflow: clip;
}
.pre-logo { width: min(70vw, 620px); height: auto; }
.pre-count { position: absolute; right: var(--gutter); bottom: 20px; font-size: clamp(3rem, 8vw, 7rem); line-height: 1; }
.pre-tag { position: absolute; left: var(--gutter); bottom: 28px; font-size: var(--step-2); color: var(--mustard); }
.progress {
  position: fixed; left: 0; top: 0; height: 4px; width: 100%; z-index: 9996;
  background: var(--red); transform-origin: 0 50%; pointer-events: none;
}
