/* Final site. White + heavy noise, black ink, no purple, rounded (pill) buttons,
   pixel motion everywhere. Built section by section. */

/* ---------- Theme overrides (final only) ---------- */
.final {
  --bg: #e5e5e5;
  --ink: #000000;
  --ink-2: #4a4a4f;      /* secondary text, 9:1 on white */
  --accent: #330466;     /* Aneetta's dark purple: the one accent colour */
  --accent-soft: #9177ac;
  --line: #000000;
  --yellow: #ffe066;
  --pink: #ffb3d1;
  --blue: #a9dcff;
  /* Background matched to her reference screenshot (reference/bg-ref.png):
     #E5E5E5 with soft speckled grain (mean 229, sd ~4.7, measured). */
  background: #e5e5e5 repeat; /* the grain tile is generated in page.js (section 0) */
  color: var(--ink);
}
.final::before { display: none; }
.final .logo-tile, .final .topbar__tile { background: var(--accent); }
.final ::selection { background: var(--accent); color: #fff; }
.final .accent { color: var(--accent); }
.final .eyebrow { color: var(--ink); }
.final .section-label { color: var(--ink); }
.final .topbar { background: rgba(255,255,255,.88); box-shadow: 0 0 0 2px var(--ink); border-radius: 999px; padding: 5px 18px 5px 5px; }
.final .topbar__tile { border-radius: 50%; }
.final .footer__sign { color: var(--ink); }
.final .footer__links a:hover { color: var(--ink-2); }
.final .footer__meta { color: var(--ink-2); }
/* Footer: two columns aligned to the top. Left: name, then Book a call. Right: links, then the site. */
.final .footer { align-items: flex-start; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer__col--right { align-items: flex-end; }
.final .footer__meta { width: auto; display: block; line-height: 22px; }
.final .bubble { color: var(--accent); border-color: var(--ink); box-shadow: 4px 5px 0 var(--ink); background: #fff; }
.final .bubble::after { background: #fff; border-color: var(--ink); }
/* One avatar for the whole page (see page.js). The face art spans roughly x 280–845,
   y 300–850 of the 1080 stage, so a 190px stage shows the head in a ~100px box.
   page.js scales it up to hero size, down onto case studies, and up again in the footer. */
.final .avatar--hero { visibility: hidden; }
.final .dock { transform: none !important; scale: none !important; transition: none; z-index: 30; pointer-events: none; }
.final .dock .avatar--dock { --stage: 190px; width: 100px; height: 100px; overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; transform-origin: 0 0; }
.final .dock.on-tile .avatar--dock { filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }
.final .dock.in-hero { z-index: 2; }
.final .dock .avatar__stage { left: -49px; top: -56px; }
.final .dock .bubble { right: calc(100% + 14px); bottom: auto; top: 6px; max-width: min(240px, 60vw); width: max-content; white-space: normal; }
.final .dock .bubble::after { right: -9px; bottom: auto; top: 16px; transform: rotate(-45deg); }
.final .dock.in-hero .bubble { display: none; }
.final .dock.is-home .bubble { top: 40px; }

/* ---------- Buttons: rounded pills ---------- */
.final .btn { border-radius: 999px; padding: 10px 24px; min-width: 0; border-width: 2px; box-shadow: none; }
.final .btn--lg { height: 72px; padding: 10px 40px; font-size: 20px; border-width: 2px; }
.final .btn--black { background: var(--accent); color: #fff; border-color: var(--accent); }
.final .btn--light { background: #fff; color: var(--ink); border-color: var(--ink); }
.final .btn:hover, .final .btn:focus-visible { transform: translate(-2px, -3px); box-shadow: 4px 5px 0 var(--ink); border-width: 2px; }
.final .btn--black:hover, .final .btn--black:focus-visible { box-shadow: 4px 5px 0 var(--ink); border-color: var(--accent); }
.final .btn:active { transform: none; box-shadow: none; }
.final :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-round {
  display: inline-grid; place-items: center; width: 47px; height: 47px; flex: none;
  border-radius: 50%; background: var(--accent); color: #fff; text-decoration: none;
  font: 900 20px/1 var(--font-body); border: 2px solid var(--accent);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
}
.btn-round--lg { width: 72px; height: 72px; font-size: 28px; }
.btn-round:hover, .btn-round:focus-visible { transform: translate(-2px, -3px) rotate(45deg); box-shadow: 4px 5px 0 var(--ink); }

/* ---------- Layout ---------- */
main { position: relative; z-index: 1; }
.sec { position: relative; max-width: 1280px; margin: 0 auto; padding: 120px 32px 60px; }
.sec__head { position: relative; margin-bottom: 56px; max-width: 900px; }
.sec h2 { margin: 0 0 14px; font: 900 clamp(38px, 4.6vw, 66px)/.95 var(--font-body); letter-spacing: -.015em; }
.sec__sub { max-width: 560px; margin: 0; color: var(--ink-2); }
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-spring); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Hero: pixel reveal canvas over the wordmark ---------- */
.final .wordmark__layer--reveal { display: none; }
.final .wordmark.is-pixel .wordmark__layer--base { visibility: hidden; }
.wordmark__pixels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }

/* ---------- Pixel world (falling pixels + whirl) ---------- */
#pixel-drops { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 25; pointer-events: none; }
#pixel-world { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; image-rendering: pixelated; }

/* ---------- 01 Work: simple, elegant case studies ---------- */
/* Work: one horizontal row of case study cards, pinned while it slides (see page.js) */
.work { position: relative; }
.work__pin { position: relative; }
/* The row's sideways slide is driven by the browser from the scroll position (scroll-driven
   animation), so it moves on the same fast path as scrolling and can't lag or shudder.
   page.js sets --dist (how far the row slides) and adds .css-scroll when supported. */
@keyframes work-slide { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(calc(var(--dist, 0) * -1px), 0, 0); } }
@keyframes work-hold { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, calc(var(--dist, 0) * 1px), 0); } }
@supports (animation-timeline: view()) {
  .work__pin { view-timeline: --work-pin block; }
  .cases.css-scroll { animation: work-slide linear both; animation-timeline: --work-pin; animation-range: contain 0% contain 100%; }
  /* Safari (html.pin-anim): pin with the same scroll animation instead of sticky. */
  .pin-anim .work__pin.css-scroll .work__sticky { position: relative; animation: work-hold linear both; animation-timeline: --work-pin; animation-range: contain 0% contain 100%; }
}
/* Safari without scroll animations: page.js moves both the frame and the row in one go. */
.pin-anim .work__sticky { position: relative; }
.work__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.work__head { max-width: 1280px; width: 100%; margin: 0 auto 36px; padding: 0 32px; }
.work__head h2 { margin: 0 0 10px; font: 900 clamp(38px, 4.4vw, 64px)/.95 var(--font-body); letter-spacing: -.015em; }
.cases {
  /* The card in focus sits in the middle of the screen with the previous and next case
     studies peeking in on both sides. Equal padding on both ends lets the first and last
     cards come to rest in the middle too. Width is capped by screen height so cards fit. */
  --gap: 28px;
  --w: min(60vw, 980px, calc((100vh - 360px) * 1.6));
  display: flex; gap: var(--gap); width: max-content; padding: 0 calc((100vw - var(--w)) / 2); will-change: transform; }
.cases .case { flex: none; width: var(--w); }
/* The card in front stays bright; the others sit back, faded and a touch smaller. */
.cases.has-front .case { opacity: .38; transform: scale(.965); transform-origin: 50% 40%; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.cases.has-front .case.is-front { opacity: 1; transform: none; }
/* When a case study comes into focus: its picture eases in from a soft zoom and the card
   lifts off the page with a gentle shadow. */
.cases .case__media { transition: box-shadow .8s var(--ease-out); }
.cases.has-front .case.is-front .case__media { box-shadow: 0 34px 60px -26px rgba(20, 10, 40, .38), 0 14px 26px -14px rgba(0, 0, 0, .22); }
.cases.has-front .case.is-front .case__media img { animation: focus-zoom 1.3s var(--ease-out) backwards; }
@keyframes focus-zoom { from { transform: scale(1.07); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .cases.has-front .case.is-front .case__media img { animation: none; } }
/* Soft shadows at the screen edges: there's more to scroll to on that side. */
.work__sticky::before, .work__sticky::after { content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease-out); }
.work__sticky::before { left: 0; background: linear-gradient(90deg, rgba(0,0,0,.16), rgba(0,0,0,.05) 45%, transparent); }
.work__sticky::after { right: 0; background: linear-gradient(270deg, rgba(0,0,0,.16), rgba(0,0,0,.05) 45%, transparent); }
.work__sticky.more-left::before, .work__sticky.more-right::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cases.has-front .case { transition: none; transform: none; } }
.cases .case__media { aspect-ratio: 16 / 10; }
.cases .case__media img { object-position: center; }
.cases .case__top { margin: 16px 0 6px; }
.cases .case__headline { margin: 0 0 10px; font-size: clamp(22px, 2vw, 30px); max-width: 40ch; }
.case { position: relative; }
.case__link { display: block; text-decoration: none; color: inherit; }
.case__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; font: 700 22px/1 var(--font-body); }
.case__name { font-weight: 800; }
.case__kind { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot--live { background: #1fae00; box-shadow: 0 0 0 4px rgba(31,174,0,.15); }
.case__media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border: 2px solid var(--ink); border-radius: 22px; background: #f2f2f4; }
.case__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* Hover: the thumbnail breaks into pixels and dissolves back into the image (page.js 2c). */
/* Pixelfall version (html.thumb-zoom): thumbnails zoom in gently on hover instead. */
.thumb-zoom .case__media img { transition: transform .7s var(--ease-out); }
/* .is-zoom is added by page.js only on real mouse movement, so cards sliding under a resting
   cursor while you scroll don't zoom in and out (that looked like the cards shuddering). */
.thumb-zoom .case__link.is-zoom .case__media img, .thumb-zoom .case__link:focus-visible .case__media img { transform: scale(1.07); }
@media (prefers-reduced-motion: reduce) { .thumb-zoom .case__media img { transition: none; } }
.case__dissolve { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.case__headline { margin: 18px 0 10px; font: 500 clamp(22px, 2vw, 30px)/1.12 var(--font-body); letter-spacing: -.02em; max-width: 22ch; }
.case__line { margin: 0; max-width: 48ch; font: 600 20px/1.4 var(--font-body); color: var(--ink-2); }
.case__links { display: flex; gap: 22px; margin: 16px 0 0; font: 800 17px var(--font-body); }
.case__links a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.case__links a:hover { color: var(--accent); }
.case__link:hover .case__headline { color: var(--accent); }
.case__headline { transition: color var(--dur-base); }
.case__links a:hover { text-decoration-color: transparent; }

/* ---------- Play column: stuff I made for fun ---------- */
.play__grid { columns: 4 240px; column-gap: 16px; }
/* No hover effects on these tiles: they just play. page.js deals them into columns that all
   end on the same line (.is-balanced); without the script they fall back to CSS columns. */
.tile { position: relative; margin: 0 0 16px; break-inside: avoid; overflow: hidden; border-radius: 16px; background: #111; border: 2px solid var(--ink); }
.tile video, .tile img { display: block; width: 100%; height: auto; }
.play__grid.is-balanced { columns: auto; display: flex; align-items: flex-start; gap: var(--play-gap, 16px); }
.play__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--play-gap, 16px); }
.play__grid.is-balanced .tile { margin: 0; }
.play__grid.is-balanced .tile video, .play__grid.is-balanced .tile img { height: 100%; object-fit: cover; }
.tile figcaption {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: #fff; border: 2px solid var(--ink); font: 800 12px var(--font-body); text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- Testimonials ---------- */
/* Testimonials: one row that drifts sideways forever; hovering (or focusing) pauses it. */
.marquee { overflow: hidden; margin: 0 calc(50% - 50vw); padding: 10px 0 18px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.quotes { display: flex; align-items: stretch; gap: 20px; width: max-content; padding: 0 20px; animation: quotes-drift var(--dur, 70s) linear infinite; }
.marquee.is-paused .quotes, .marquee:focus-within .quotes { animation-play-state: paused; }
.marquee.js-drift .quotes { animation: none; will-change: transform; }
.quotes__nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.quotes__btn { width: 52px; height: 52px; display: grid; place-items: center; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink); font: 800 22px/1 var(--font-body); cursor: pointer; box-shadow: 3px 4px 0 var(--ink); transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast); }
.quotes__btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.quotes__btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.quotes__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes quotes-drift { to { transform: translateX(calc(-50% - 10px)); } }
@media (prefers-reduced-motion: reduce) { .marquee { overflow-x: auto; } .quotes { animation: none; } }
.testi { flex: none; display: flex; flex-direction: column; justify-content: space-between; width: min(420px, 80vw); margin: 0; padding: 28px; background: #fff; border: 2px solid var(--ink); border-radius: 22px; transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base); }
.testi:hover { transform: translate(-3px, -3px) rotate(-.5deg); box-shadow: 6px 7px 0 var(--ink); }
.testi blockquote { margin: 0 0 22px; font: 600 20px/1.45 var(--font-body); }
.testi figcaption { display: flex; flex-direction: column; gap: 2px; font: 600 16px var(--font-body); color: var(--ink-2); }
.testi figcaption b { font: 900 17px var(--font-body); color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- 02 FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; padding-top: 160px; }
.faq__title { position: sticky; top: 110px; margin: 0; font: 400 clamp(44px, 4.8vw, 76px)/.95 var(--font-display) !important; letter-spacing: .02em !important; }
.faq__dots { font: 900 1em/0 var(--font-body); letter-spacing: -.05em; }
.faq__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px 56px; }
.qa__n { display: block; margin-bottom: 10px; font: 600 16px ui-monospace, Menlo, monospace; color: var(--accent); }
.qa h3 { margin: 0 0 14px; font: 900 clamp(24px, 2.2vw, 32px)/1 var(--font-body); text-transform: uppercase; letter-spacing: -.01em; }
.qa p { margin: 0; font: 600 21px/1.4 var(--font-body); color: #1d1d20; }

/* ---------- 03 Contact + whirl ---------- */
.contact { padding-top: 180px; text-align: center; display: grid; justify-items: center; }
.contact .eyebrow { margin-bottom: 18px; }
.contact__title { font-size: clamp(38px, 4.6vw, 66px) !important; }
.contact .sec__sub { margin: 0 auto 36px; }
.contact__ctas { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.contact__ctas .btn--light { margin-left: 14px; }
.whirl { position: relative; width: min(100%, 900px); height: 560px; margin-top: 40px; }
.whirl__count { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); margin: 0; font: 700 15px ui-monospace, Menlo, monospace; white-space: nowrap; }
.whirl__count b { padding: 2px 8px; border: 2px solid var(--ink); border-radius: 6px; background: var(--yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .play__grid { columns: 3; }
  .faq { grid-template-columns: 1fr; gap: 40px; }
  .faq__title { position: static; }
}
@media (max-height: 560px) {
  .work__pin { height: auto !important; }
  .work__sticky { position: static; height: auto; overflow: visible; padding: 90px 0 30px; }
  .cases { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 16px; transform: none !important; }
  .cases .case { scroll-snap-align: start; width: 82vw; }
}
@media (max-width: 700px) {
  .sec { padding: 90px 20px 40px; }
  .play__grid { columns: 2; }
  .faq__grid { grid-template-columns: 1fr; gap: 40px; }
  .whirl { height: 420px; }
  .contact__ctas .btn--light { margin-left: 0; }
  /* Phones only. Hero: a smaller face, with room kept under the text so it never covers the tagline. */
  .final .avatar--hero { --w: 60vw; }
  .theme-light .hero { gap: 22px; padding-bottom: calc(60vw * .66); }
  .final .hero__row { gap: 22px; }
  .final .hero__right { gap: 16px; }
  /* Footer: stacked, links on one wrapping row, and room at the bottom for the big face. */
  .final .footer { flex-direction: column; align-items: flex-start; padding: 50px 20px 230px; gap: 22px; }
  .final .footer__col, .final .footer__col--right { align-items: flex-start; width: 100%; }
  .final .footer__links { flex-wrap: wrap; gap: 14px 22px; font-size: 16px; }
  .final .footer__links a { white-space: nowrap; }
  /* No "See work" button on phones: the work is one scroll away. */
  .final .hero__right .btn--lg { display: none; }
  /* Case row on phones: same pinned slide as desktop, with wider cards. */
  .cases { --gap: 16px; --w: min(84vw, calc((100svh - 330px) * 1.6)); }
  .work__head { padding: 0 20px; margin-bottom: 22px; }
  .play__grid { --play-gap: 12px; }
  /* Speech bubbles a touch smaller next to the smaller face. */
  .final .dock .bubble { max-width: min(200px, 52vw); font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* Pixel reveal on headings (page.js 2b): purple pixels under the cursor, like the hero name. */
.px-head { position: relative; }
.px-head__canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
