/* The People Factor — sample homepage. Tokens come from ../brand-guidelines.html */
:root {
  --bg: #F2F2EF;        /* paper */
  --surface: #FFFFFF;
  --ink: #111111;
  --muted: #4A4A45;     /* slate */
  --accent: #C1D841;    /* lime: actions only */
  --accent-ink: #111111;
  --blue: #44596C;      /* the "Practical" piece in her values graphic */
  --piece-grey: #D4D4D4; /* the "Purposeful" piece */
  --tint-1: #EEF3D0;    /* lime tints for the soundbite cards */
  --tint-2: #E4ECB5;
  --tint-3: #D9E59A;
  --stone: #6E6E6E;
  --mist: #DEDEDE;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Montserrat", system-ui, sans-serif;

  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.125rem, 1.4rem + 3vw, 3.75rem);
  --step-display: clamp(2rem, 7.4vw, 7rem);

  --margin: clamp(1.25rem, 3.3vw, 3rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(5rem, 11vw, 10rem);
  --radius: 1.25rem;     /* pictures, tiles and cards */
  --pill: 999px;         /* every button */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, blockquote, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.field-white :focus-visible, #about :focus-visible, .cta-band :focus-visible { outline-color: var(--ink); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
.display { font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.035em; }
.head { font-size: var(--step-head); line-height: 1.04; letter-spacing: -0.03em; }
.lead { font-size: var(--step-lead); line-height: 1.4; max-width: 40ch; }
p { max-width: 62ch; text-wrap: pretty; }
p + p { margin-top: 0.9em; }

/* ---------- layout: one 12-column grid, one axis at column 6 ---------- */
.wrap { padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.section { padding-block: var(--section); }
.field-white { background: var(--surface); }
.side { grid-column: 1 / 6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.5rem; background: var(--accent); color: var(--accent-ink); font-weight: 600; border-radius: var(--pill); text-decoration: none; white-space: nowrap; transition: transform 140ms var(--ease-out), background-color 180ms ease; }
.button:active { transform: scale(0.97); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 2px; transition: text-decoration-color 180ms ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 2px; transition: text-decoration-color 180ms ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: #D3E66A; }
  .link:hover { text-decoration-color: currentColor; }
  .link-plain:hover { text-decoration-color: var(--accent); }
}

/* ---------- header ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 3; color: #fff; padding-top: 1.5rem; }
.top-row { display: flex; align-items: center; gap: 2.5rem; }
.brand { width: 160px; margin-right: auto; }
.links { display: flex; gap: 2.5rem; font-weight: 500; }
.links a { text-decoration-line: underline; }
.menu { display: none; }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: #fff; min-height: 100svh; display: flex; flex-direction: column; padding-bottom: clamp(2rem, 5svh, 3.5rem); }
.hero-band { position: relative; height: 50svh; min-height: 320px; overflow: hidden; }
.hero-puzzle { position: absolute; right: var(--margin); bottom: 6%; width: clamp(200px, 21vw, 320px); overflow: visible; }
.pz-mist { fill: var(--piece-grey); background: var(--piece-grey); } .pz-blue { fill: var(--blue); background: var(--blue); }
.pz-stone { fill: var(--stone); background: var(--stone); } .pz-lime { fill: var(--accent); background: var(--accent); }
.pz { transform-box: fill-box; transform-origin: center; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.hero-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; mix-blend-mode: lighten; }
.hero h1 { margin-top: clamp(1rem, 3svh, 2rem); }
.hero h1 [data-line] { white-space: nowrap; }
.hero-foot { margin-top: clamp(1.5rem, 4svh, 2.5rem); align-items: start; }
.hero-lead { grid-column: 6 / 13; grid-row: 1; max-width: 44ch; }
.hero-actions { grid-column: 1 / 6; grid-row: 1; display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }

/* ---------- clients: one strip of small logos, always moving ---------- */
.clients { background: var(--ink); color: #fff; padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem); }
.clients-head { align-items: baseline; row-gap: 0.75rem; }
.clients-head h2 { grid-column: 1 / 6; font-size: var(--step-lead); line-height: 1.2; }
.clients-head p { grid-column: 6 / 13; max-width: 46ch; color: #C8C8C2; }
.logo-marquee { margin-top: clamp(2rem, 4vw, 3rem); display: flex; overflow: hidden; }
.logo-track { flex: none; display: flex; align-items: center; gap: clamp(1.25rem, 2.8vw, 2.5rem); padding-right: clamp(1.25rem, 2.8vw, 2.5rem); }
.logo-track img { width: clamp(5.5rem, 8.4vw, 7.5rem); }

/* ---------- services: pinned heading, passing rows ---------- */
.svc-side { grid-column: 1 / 6; align-self: start; position: sticky; top: 2rem; }
.svc-side .lead { margin-top: 1.5rem; max-width: 26ch; }
.picker-bar { margin-top: 2rem; }
.picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.picker button { min-height: 3rem; padding: 0 1.25rem; background: var(--bg); border-radius: var(--pill); font-weight: 500; transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.picker button:active { transform: scale(0.97); }
.picker button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .picker button[aria-pressed="false"]:hover { background: var(--mist); } }
.fit { margin-top: 1rem; font-size: var(--step-small); color: var(--muted); }

.svc-rows { grid-column: 6 / 13; display: grid; row-gap: clamp(4rem, 8vw, 7.5rem); }
.svc h3 { font-size: var(--step-lead); font-weight: 600; line-height: 1.2; }
.svc-row { margin-top: 1.5rem; display: grid; grid-template-columns: clamp(120px, 14vw, 200px) 1fr; column-gap: var(--gutter); align-items: start; }
.svc.flip .svc-row { grid-template-columns: 1fr clamp(120px, 14vw, 200px); }
.svc.flip .piece { order: 2; }
.piece { width: 100%; fill: var(--accent); }
.svc-row p { color: var(--muted); max-width: 40ch; }
.svc-list { margin-top: 1rem; }
.svc-list li { padding-block: 0.4rem; font-weight: 500; transition: opacity 300ms ease; }
.svc-rows.is-picked .svc-list li:not(.fits) { opacity: 0.4; }
.piece { transition: opacity 300ms ease; }
.svc-rows.is-picked .svc:not(.has-fit) .piece { opacity: 0.4; }


/* ---------- about ---------- */
.about-head { grid-column: 6 / 13; grid-row: 1; }
.about-head .lead { margin-top: 1.5rem; max-width: 44ch; }
.about-photo { grid-column: 1 / 6; grid-row: 1 / span 2; align-self: start; }
.about-photo img { width: 100%; border-radius: var(--radius); }
.about-right { grid-column: 6 / 13; grid-row: 2; margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.values-card { margin-top: 2.5rem; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--ink); color: #fff; border-radius: var(--radius); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem var(--gutter); align-items: center; }
.values-card h3 { grid-column: 1 / -1; font-size: var(--step-lead); line-height: 1.2; }
.values-puzzle { width: 100%; max-width: 28rem; justify-self: center; overflow: visible; }
.vz { cursor: pointer; transition: transform 500ms var(--ease-out); }
.vz text { font: 700 12.5px var(--font-text); text-anchor: middle; dominant-baseline: middle; fill: #fff; stroke: none; pointer-events: none; }
.vz.pz-mist text { fill: var(--muted); } .vz.pz-lime text { fill: var(--ink); }
.vz.is-on { transform: translate(calc(var(--x) * 0.09), calc(var(--y) * 0.09)); }
.values-list { display: grid; gap: 0.25rem; }
.values-list li { display: grid; grid-template-columns: 0.875rem 1fr; gap: 0.15rem 0.75rem; align-items: center; padding: 0.7rem 0.9rem; border-radius: var(--radius); transition: background-color 300ms ease; }
.values-list li.is-on { background: #262626; }
.values-list i { width: 0.875rem; height: 0.875rem; border-radius: 3px; }
.values-list strong { font-weight: 600; }
.values-list span { grid-column: 2; font-size: var(--step-small); line-height: 1.45; color: #C8C8C2; }
.facts { margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem var(--gutter); font-size: var(--step-small); }
.facts dt { color: var(--stone); }
.facts dd { font-weight: 500; }

/* ---------- testimonial: one long letter ---------- */
.voices { display: none; }
.is-live .voices { display: grid; gap: 0.5rem; margin-top: 2.5rem; max-width: 22rem; }
.voices button { display: grid; text-align: left; padding: 0.85rem 1.25rem; background: var(--bg); border-radius: var(--radius); transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.voices button span:first-child { font-weight: 600; }
.voices button span:last-child { font-size: var(--step-small); color: var(--muted); transition: color 180ms ease; }
.voices button:active { transform: scale(0.98); }
.voices button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.voices button[aria-pressed="true"] span:last-child { color: #C8C8C2; }
@media (hover: hover) and (pointer: fine) { .voices button[aria-pressed="false"]:hover { background: var(--mist); } }
.letters { grid-column: 6 / 13; }
.letter { max-width: 40ch; }
.letter + .letter { margin-top: 4rem; }
.is-live .letter:not(.is-on) { display: none; }
.letters > a { display: inline-block; margin-top: 2rem; }
.letter p { max-width: none; }
.letter-open { font-family: var(--font-display); font-size: var(--step-lead); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.letter p + p { margin-top: 1.25rem; }
.letter footer { margin-top: 2.5rem; display: grid; }
.letter footer span:first-child { font-weight: 600; }

/* ---------- soundbites: cards that fold into spines ---------- */
.deck-wrap { padding-block: var(--section); }
.deck { margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 0.75rem; }
.card { overflow: hidden; position: relative; border-radius: var(--radius); }
.spine { display: none; }
.card.t1 { background: var(--tint-1); }
.card.t2 { background: var(--tint-2); }
.card.t3 { background: var(--tint-3); }
.card-in { padding: 2rem; display: flex; flex-direction: column; gap: 1rem; height: 100%; }
.card h3 { font-size: var(--step-lead); line-height: 1.12; }
.card p { color: var(--muted); }
.card a { margin-top: auto; align-self: flex-start; }
.deck-foot { margin-top: 2.5rem; max-width: 58ch; }

@media (min-width: 62.5em) and (min-height: 43em) and (prefers-reduced-motion: no-preference) {
  .js .deck-wrap { height: 240svh; padding-block: 0; }
  .js .deck-stage { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
  .js .deck { display: flex; gap: 0; height: 22.5rem; overflow: hidden; border-radius: var(--radius); }
  .js .card { border-radius: 0; flex: 0 0 min(38.75rem, 46vw); transition: flex-basis 700ms var(--ease-in-out); cursor: default; }
  .js .card-in { width: min(38.75rem, 46vw); }
  .js .card:last-child { flex-grow: 1; }
  .js .card.is-spine { flex-basis: 7.5rem; cursor: pointer; }
  .js .card.is-spine .card-in { visibility: hidden; }
  .js .card.is-spine .spine { display: block; position: absolute; inset: 0; padding: 1.5rem 1.25rem; writing-mode: vertical-rl; font-family: var(--font-display); font-weight: 600; font-size: var(--step-body); line-height: 1.25; }
}

/* ---------- cta: one lime field ---------- */
.cta-band { background: var(--accent); color: var(--accent-ink); padding-block: clamp(3.5rem, 7vw, 6rem); }
.cta-band .grid { align-items: end; }
.cta-text { grid-column: 1 / 9; }
.cta-say { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: var(--step-lead); line-height: 1.25; max-width: 30ch; }
.cta-say a { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.cta-small { margin-top: 1.5rem; max-width: 44ch; }
.cta-small + .cta-small { margin-top: 0.5rem; font-weight: 600; }
.cta-face { grid-column: 11 / 13; justify-self: end; width: 150px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: var(--radius); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #fff; padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem; }
.foot-cols { display: grid; grid-template-columns: max-content 1fr 1fr max-content; gap: 2rem var(--gutter); }
.foot-cols li { padding-block: 0.25rem; color: #C8C8C2; }
.foot-cols li:first-child { color: #fff; font-weight: 600; }
.foot-mark { margin-top: clamp(3rem, 8vw, 6rem); width: 100%; }
.legal { margin-top: 1.25rem; font-size: var(--step-small); color: #9A9A94; max-width: none; }

/* ---------- motion (content stays visible without JavaScript) ---------- */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.lines [data-line] { display: block; }
.shutter { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
  .js .lines [data-line] { transform: translateY(110%); animation: line 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .js .hero-band img { animation: settle 2400ms var(--ease-soft) both; translate: 0 calc(var(--sy, 0) * 1px); }
  .js .pz { animation: pz-in 1000ms var(--ease-expo) backwards; animation-delay: calc(var(--i) * 150ms + 500ms); transition: transform 400ms var(--ease-out); }
  .hero-puzzle:hover .pz { transform: translate(calc(var(--x) * 0.1), calc(var(--y) * 0.1)); }
  .js .values-card[data-reveal]:not(.is-in) .vz { opacity: 0; animation: none; }
  .js .values-card.is-in .vz { animation-delay: calc(var(--i) * 150ms + 250ms); }
  .logo-track { animation: marquee 55s linear infinite; }
  .logo-marquee:hover .logo-track, .logo-marquee.is-off .logo-track { animation-play-state: paused; }
  .js .svc[data-reveal] .piece { transform: translateX(-18px) rotate(-14deg); transition: transform 900ms var(--ease-out) 150ms, opacity 300ms ease; }
  .js .svc.flip[data-reveal] .piece { transform: translateX(18px) rotate(14deg); }
  .js .svc[data-reveal].is-in .piece { transform: none; }
  .is-live .letter.is-on { animation: swap 600ms var(--ease-out) backwards; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter[data-reveal] img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .shutter[data-reveal].is-in { clip-path: inset(0); }
  .js .shutter[data-reveal].is-in img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-marquee { padding-inline: var(--margin); }
  .logo-track { flex: 1; flex-wrap: wrap; justify-content: center; padding-right: 0; }
  .logo-track[aria-hidden] { display: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes line { to { transform: none; } }
@keyframes pz-in { from { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); } }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes swap { from { opacity: 0; transform: translateY(16px); } }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }

@media (min-width: 62.5em) {
  .top { position: fixed; padding-block: 1.5rem; transition: transform 320ms var(--ease-out), background-color 200ms ease, padding 240ms var(--ease-out); }
  .top.is-solid { background: var(--ink); padding-block: 0.75rem; }
  .top.is-hidden { transform: translateY(-100%); }
  .top.is-hidden:focus-within { transform: none; }
  .svc-side { top: 7.5rem; }
}

/* ---------- tablet and phone: the axis collapses to the left margin ---------- */
@media (max-width: 62.49em) {
  .clients-head h2, .clients-head p, .side, .svc-rows, .about-head, .about-photo, .about-right, .letters, .cta-text { grid-column: 1 / -1; }
  .hero-puzzle { display: none; }
  .svc-side { display: contents; }
  .svc-side > * { grid-column: 1 / -1; }
  .picker-bar { position: sticky; top: 0; z-index: 2; background: var(--surface); margin-inline: calc(var(--margin) * -1); padding: 0.75rem var(--margin); margin-top: 1.5rem; }
  .fit { margin-top: 0.5rem; }
  .svc-rows { margin-top: 3rem; }
  .about-head, .about-photo, .about-right { grid-row: auto; }
  .about-photo { margin-top: 2.5rem; }
  .links { display: none; }
  .hero-band { height: 40svh; margin-top: 6.5rem; }
  .menu { display: block; position: static; }
  .menu summary { list-style: none; min-height: 3rem; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu-list { position: absolute; left: 0; right: 0; top: 100%; background: #1B1B1B; padding: 0.75rem var(--margin) 1.25rem; }
  .menu-list a { display: flex; align-items: center; min-height: 3rem; text-decoration: none; font-weight: 500; }
  .letters { margin-top: 2.5rem; }
  .cta-face { grid-column: 1 / -1; width: 96px; margin-top: 2rem; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols ul:first-child { grid-column: 1 / -1; }
}
@media (max-width: 47.99em) {
  .top-action { display: none; }
  .hero-lead { font-size: var(--step-body); }
  .picker { flex-wrap: nowrap; }
  .picker button { padding: 0 0.75rem; font-size: var(--step-small); font-weight: 600; }
  #services .display { font-size: var(--step-head); }
  .hero-band img { object-position: 43% 30%; }
  .hero-lead, .hero-actions { grid-column: 1 / -1; grid-row: auto; }
  .hero-actions { margin-top: 1.5rem; }
  .svc-row, .svc.flip .svc-row { grid-template-columns: 88px 1fr; }
  .svc.flip .piece { order: 0; }
  .values-card { grid-template-columns: minmax(0, 1fr); }
  .values-puzzle { max-width: 22rem; }
  .vz text { font-size: 13.5px; }
}
