/* =========================================================
   Asha Rountree — Portfolio
   Design tokens come straight from the Figma file.
   ========================================================= */
:root {
  --purple: #3221ba;          /* Purple/Primary */
  --purple-medium: #8c71ec;   /* Purple/Medium */
  --purple-light: #d1b7ef;    /* Purple/Light */
  --purple-wash: #f4eefc;     /* Purple/Lightest */
  --magenta: #ce418d;         /* Accent/Magenta */
  --berry: #a6318b;           /* tagline highlight */
  --bg: #e5dff1;              /* page background */
  --bg-case: #fdfcff;         /* case study background */
  --glow: #cdb3ee;            /* soft blurred ellipses */
  --black: #000;
  --white: #fff;

  --font-display: 'Shrikhand', 'Georgia', serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-tag: 'Plus Jakarta Sans', 'Poppins', system-ui, sans-serif;

  --page-max: 1440px;
  --gutter: clamp(16px, 5vw, 72px);
  --radius-pill: 999px;

  /* the hand-drawn squiggle under nav links on hover: "Vector 250" in the Figma
     "Primary Navigation Link" hover variant, exported as-is and stretched to the label */
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 8' preserveAspectRatio='none'%3E%3Cpath d='M1.5 3.487h.1C4.153 2.611 6.085 1.983 7.395 1.603 8.705 1.223 10.015 1.953 11.325 3.794c1.31 1.841 2.62 2.234 3.93 1.181 1.31-1.053 2.62-2.032 3.93-2.935 1.31-.904 2.62-.484 3.93 1.26 1.31 1.744 2.62 2.709 3.93 2.894 1.31.185 2.62-.277 3.93-1.385 1.31-1.108 2.62-1.553 3.93-1.336 1.31.216 2.62.771 3.93 1.663 1.31.892 2.62.862 3.93-.088 1.31-.95 2.62-1.16 3.93-.63 1.31.53 2.62.263 3.93-.801 1.31-1.064 2.117-1.352 2.42-.863l.355.733h.1' fill='none' stroke='%233221ba' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --squiggle-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 8' preserveAspectRatio='none'%3E%3Cpath d='M1.5 3.487h.1C4.153 2.611 6.085 1.983 7.395 1.603 8.705 1.223 10.015 1.953 11.325 3.794c1.31 1.841 2.62 2.234 3.93 1.181 1.31-1.053 2.62-2.032 3.93-2.935 1.31-.904 2.62-.484 3.93 1.26 1.31 1.744 2.62 2.709 3.93 2.894 1.31.185 2.62-.277 3.93-1.385 1.31-1.108 2.62-1.553 3.93-1.336 1.31.216 2.62.771 3.93 1.663 1.31.892 2.62.862 3.93-.088 1.31-.95 2.62-1.16 3.93-.63 1.31.53 2.62.263 3.93-.801 1.31-1.064 2.117-1.352 2.42-.863l.355.733h.1' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background-color: var(--bg);
  /* the two blurred purple ellipses from the design. The top-left one sits a fixed 96px from the
     top (not a % of the page height), so it stays in the same corner on every page and doesn't
     slide around when the Garden filters change the page's length. */
  background-image:
    radial-gradient(ellipse 620px 300px at 8% 96px, var(--glow) 0%, rgba(205, 179, 238, 0) 70%),
    radial-gradient(ellipse 620px 300px at 96% 100%, var(--glow) 0%, rgba(205, 179, 238, 0) 70%);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--purple); color: #fff; padding: 8px 16px; border-radius: var(--radius-pill); z-index: 100; }
.skip:focus { left: 16px; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--purple);
  line-height: 1.1;
  letter-spacing: 0;
}

/* ---------- header / nav (Figma: Nav Primary + Primary Navigation Link) ---------- */
.site-header { position: relative; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 0; }
.logo { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.logo img { width: 29px; height: 29px; }
.logo-text { font-family: var(--font-display); color: var(--purple); font-size: 28px; line-height: 1; padding-top: 3px; }
.logo-mobile { display: none; }
.nav-links { display: flex; gap: 12px; }
.nav-link {
  display: inline-flex; align-items: center;
  font-size: 20px; font-weight: 500; line-height: 1.5;
  text-decoration: none; padding: 8px 24px; border-radius: 30px;
  color: var(--black);
  transition: color .2s ease;
}
.nav-label { position: relative; display: inline-block; }
.nav-label::after,
.footer-links a::after {
  content: '';
  position: absolute; left: -2px; right: -2px; bottom: -6px; height: 8px;
  background: var(--squiggle) no-repeat left center / 100% 100%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .28s ease;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--purple); }
.nav-link:hover .nav-label::after,
.nav-link:focus-visible .nav-label::after { clip-path: inset(0 0 0 0); }
.menu-btn { display: none; }
.mobile-menu { display: none; }

/* ---------- footer (Figma: Footer) ---------- */
.site-footer { background: var(--magenta); color: var(--white); margin-top: auto; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; gap: 16px; }
.footer-inner p, .footer-links a { font-size: 20px; font-weight: 500; line-height: 1.5; }
.footer-links { display: flex; align-items: center; gap: 40px; }
.footer-links a { position: relative; color: var(--white); text-decoration: none; }
.footer-links a::after { background-image: var(--squiggle-white); }
.footer-links a:hover::after, .footer-links a:focus-visible::after { clip-path: inset(0 0 0 0); }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 13px; list-style: none; margin: 0; padding: 0; }
.tag {
  background: var(--purple-light);
  border: 1.6px solid var(--purple-medium);
  color: var(--purple);
  border-radius: 25px;
  padding: 4px 10px;
  font-size: 13px; font-weight: 500; line-height: 1.5;
  white-space: nowrap;
}

/* ---------- buttons (Figma: Primary Button) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--purple); color: var(--white);
  text-decoration: none; font-size: 20px; font-weight: 500; line-height: 1.5;
  padding: 12px 20px; border-radius: 100px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn img { width: 26px; height: 20px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(50, 33, 186, .25); }

/* =========================================================
   HOME
   ========================================================= */
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-top: 25px; padding-bottom: 45px; }
.hero-text { max-width: 742px; margin-top: 77px; }
.role { color: var(--purple); font-size: 20px; font-weight: 500; line-height: 1.5; }
.hero .display { font-size: clamp(44px, 5.8vw, 83px); padding: 8px 0; margin-top: 8px; }
.tagline { color: var(--purple); font-size: clamp(24px, 2.25vw, 32px); font-weight: 500; line-height: 1.25; }
.tagline mark { background: none; color: var(--berry); }

/* Hero illustration: every piece is placed with % of a 489 × 348 box (see templates.mjs) */
.hero-art {
  position: relative; flex: 0 1 489px; width: 489px; aspect-ratio: 489.11 / 348.29;
  container-type: inline-size;
}
.hero-static, .hero-piece { position: absolute; }
.hero-static { pointer-events: none; }
.hero-static, .hp-default, .hp-hover { width: 100%; height: auto; }
.hero-piece { cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
/* Idle wiggle so visitors can tell the doodles are interactive: a small, gentle wiggle that passes
   from one doodle to the next (strawberry → guitar → skate), each resting while the others move.
   Hovering, tapping or focusing a piece stops it. */
.hero-piece { transform-origin: 50% 60%; animation: doodle-wiggle 4.2s ease-in-out infinite; }
.hero-guitar { animation-delay: 1.4s; }
.hero-skate { animation-delay: 2.8s; }
@keyframes doodle-wiggle {
  0%, 30%, 100% { transform: rotate(0deg); }
  6% { transform: rotate(-1.6deg); }
  13% { transform: rotate(1.4deg); }
  20% { transform: rotate(-.9deg); }
  26% { transform: rotate(.4deg); }
}
.hero-art:not(.has-js) .hero-piece:hover, .hero-piece.is-active, .hero-piece:focus-visible { animation: none; }
.hero-piece:focus { outline: none; }
.hero-piece:focus-visible { outline: 2px dashed var(--purple); outline-offset: 4px; }
.hp-default, .hp-hover { position: absolute; inset: 0; height: 100%; transition: opacity .18s ease; }
.hp-hover { opacity: 0; transform-origin: 0 0; }
.hp-bubble::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--purple-wash); border: 2px solid var(--purple); border-radius: 4.09cqw;
  filter: url(#hand-drawn);
}
.hp-bubble {
  position: absolute; z-index: 2; isolation: isolate;
  padding: 2.45cqw; color: var(--black);
  font-size: max(11px, 2.4535cqw); font-weight: 400; line-height: 1.5;
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: center;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
/* .is-active is set by main.js using pixel hit-testing (the pieces' boxes overlap);
   :hover is the no-JS fallback, :focus-visible covers keyboard users */
.hero-art.has-js .hero-piece { pointer-events: none; }
.hero-art.is-pointing { cursor: pointer; }
.hero-art:not(.has-js) .hero-piece:hover, .hero-piece.is-active, .hero-piece:focus-visible { z-index: 5; }
.hero-art:not(.has-js) .hero-piece:hover .hp-hover, .hero-piece.is-active .hp-hover, .hero-piece:focus-visible .hp-hover { opacity: 1; }
.hero-art:not(.has-js) .hero-piece:hover .hp-default, .hero-piece.is-active .hp-default, .hero-piece:focus-visible .hp-default { opacity: 0; }
.hero-art:not(.has-js) .hero-piece:hover .hp-bubble, .hero-piece.is-active .hp-bubble, .hero-piece:focus-visible .hp-bubble { opacity: 1; transform: none; }

/* Flower strip: Figma spacing (one 801px artwork + 24px gap = 825px tile), scrolling forever */
.flower-line { --tile: 825px; --tile-h: 59.5px; padding-block: 20px; overflow: hidden; }
.flower-line-track {
  height: var(--tile-h); width: calc(100% + var(--tile));
  background: url('/images/site/flower-line.png') repeat-x left center / var(--tile) var(--tile-h);
  animation: flower-scroll 40s linear infinite;
  will-change: transform;
}
@keyframes flower-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-1 * var(--tile))); } }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 23.67px; row-gap: 75px; padding-top: 43px; padding-bottom: 120px; align-items: start; }
.project-card { display: flex; flex-direction: column; gap: 6.53px; text-decoration: none; color: inherit; }
.card-media {
  aspect-ratio: 636.33 / 355.43;
  border-radius: 25.27px;
  border: 2.06px solid var(--purple-medium);
  background: var(--white);
  padding: 8px;
  overflow: hidden;
  transition: box-shadow .25s ease;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
/* Whole-card artwork from Figma (border drawn in the image). The export includes the stroke's
   ~1.8px overhang on every side, so it's nudged out by that much to line up with the other cards. */
.card-media.is-artwork { border: 0; padding: 0; background: none; overflow: visible; }
.card-media.is-artwork img { width: 100.577%; max-width: none; height: auto; margin: -0.281% -0.289%; border-radius: 26px; object-fit: fill; }
/* Thumbnail with a live overlay: the wrapper keeps the image's own proportions (952 × 520) so the
   overlay lines up exactly with what's drawn in it; the card crops the ~1px difference. */
.card-media.has-img { display: grid; place-items: center; }
.card-shot { position: relative; display: block; width: 100%; aspect-ratio: 952.07 / 520.14; border-radius: 18px; overflow: hidden; }
.card-shot img { position: absolute; inset: 0; border-radius: 0; }
/* Customer / Seller toggle (Figma "Group 59"), placed over the one drawn in the thumbnail:
   403 × 69 at (486, 62) in the 952 × 520 mockup, tilted 5.14° clockwise. Sizes are in cqw of the toggle
   (Figma base component 327px wide, so 1px there = 0.3058cqw). */
.mode-toggle {
  position: absolute; left: 51.013%; top: 11.851%; width: 42.339%; aspect-ratio: 403.1 / 68.75;
  transform: rotate(5.14deg); transform-origin: 0 0; container-type: inline-size;
}
/* the bar is drawn by ::before so its cqw sizes resolve against the toggle itself */
.mode-toggle::before { content: ''; position: absolute; inset: 0; background: #383838; border-radius: 4.651cqw; box-shadow: 0 0 0 1.835cqw #fff; }
.mt-knob, .mt-a, .mt-b { position: absolute; top: 1.551cqw; width: 47.676cqw; height: 13.954cqw; border-radius: 4.651cqw; }
.mt-knob { left: 1.551cqw; background: #fff; animation: mt-knob 6s infinite; }
.mt-a, .mt-b { display: grid; place-items: center; font-family: 'Inter', system-ui, sans-serif; font-weight: 500; font-size: 6.202cqw; line-height: 1; }
.mt-a { left: 1.551cqw; color: #000; animation: mt-a 6s infinite; }
.mt-b { left: 50.776cqw; color: #fff; animation: mt-b 6s infinite; }
@keyframes mt-knob {
  0%, 38% { transform: translateX(0); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  50%, 88% { transform: translateX(49.225cqw); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  100% { transform: translateX(0); }
}
@keyframes mt-a { 0%, 41% { color: #000; } 47%, 91% { color: #fff; } 97%, 100% { color: #000; } }
@keyframes mt-b { 0%, 41% { color: #fff; } 47%, 91% { color: #000; } 97%, 100% { color: #fff; } }
a.project-card:hover .card-media, a.project-card:focus-visible .card-media { box-shadow: 0 14px 30px rgba(50, 33, 186, .18); }
a.project-card:hover .card-media.is-artwork, a.project-card:focus-visible .card-media.is-artwork { box-shadow: none; }
a.project-card:hover .card-media.is-artwork img, a.project-card:focus-visible .card-media.is-artwork img { box-shadow: 0 14px 30px rgba(50, 33, 186, .18); }
.is-soon .card-media {
  display: grid; place-items: center;
  background: repeating-linear-gradient(-45deg, var(--purple-wash) 0 14px, #ebe2fa 14px 28px);
  border-style: dashed;
}
.soon { font-family: var(--font-display); color: var(--purple); font-size: clamp(24px, 3vw, 36px); }
.card-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 8.17px; }
.card-title { font-size: clamp(22px, 2.25vw, 32px); font-weight: 500; line-height: 1.25; max-width: 477px; }
.card-date { font-size: clamp(14px, 1.4vw, 19.6px); font-weight: 600; white-space: nowrap; }
/* Home card tags (Figma "Project Tag" at card scale: 13px text, 13px gaps) */
.project-card .tags { gap: 13.07px; }
.project-card .tag { font-size: 13.07px; line-height: 19.6px; padding: 4.9px 9.8px; border-width: 1.63px; border-radius: 24.5px; }

/* =========================================================
   ABOUT
   ========================================================= */
.about { display: grid; grid-template-columns: minmax(0, 628px) minmax(0, 608px); justify-content: space-between; gap: 60px; padding-top: 60px; padding-bottom: 60px; }
.about-photo { position: relative; width: 100%; }
.about-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-reveal { position: absolute; }
.about-illustration, .about-photo-img, .about-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-illustration img { position: absolute; }
.about-illustration .ai-bg { inset: 0; width: 100%; height: 100%; }
/* The illustrated layer gets a solid backing (its artwork is 80% opaque) and is clipped to the
   photo's own outline, so the frame's pink scallops never show through it and nothing peeks
   out past the photo's edges before it's revealed. The mask image is set inline (templates.mjs). */
.about-illustration {
  background: var(--bg);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* cursor doodle on the photo ("Vector 311"), wiggling in place */
.about-mouse { position: absolute; z-index: 3; height: auto; pointer-events: none; transform-origin: 30% 30%; animation: mouse-wiggle 2.4s ease-in-out infinite; }
@keyframes mouse-wiggle {
  0%, 100% { transform: rotate(0deg) translate(0, 0); }
  20% { transform: rotate(-10deg) translate(-1px, -1px); }
  40% { transform: rotate(7deg) translate(1px, 0); }
  60% { transform: rotate(-5deg) translate(0, 1px); }
  80% { transform: rotate(3deg) translate(0, 0); }
}
.ai-flower { animation: wiggle 1.8s ease-in-out infinite; transform-origin: 50% 50%; }
.ai-flower.f2 { animation-delay: -.6s; animation-duration: 2.1s; }
.ai-flower.f3 { animation-delay: -1.1s; animation-duration: 1.6s; }
@keyframes wiggle {
  0%, 100% { transform: rotate(-9deg) scale(1); }
  25% { transform: rotate(4deg) scale(1.04); }
  50% { transform: rotate(9deg) scale(1); }
  75% { transform: rotate(-3deg) scale(1.03); }
}
.about-canvas { touch-action: pan-y pinch-zoom; cursor: none; }
.marker-cursor {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border: 1.5px dashed rgba(60, 60, 70, .55); border-radius: 50%;
  pointer-events: none; opacity: 0; transition: opacity .15s ease;
}
.about-reveal.is-drawing .marker-cursor { opacity: 1; }
/* text column: greeting, school line and two short sections, centred beside the photo (Figma 1007:951) */
.about-text { display: flex; flex-direction: column; justify-content: center; gap: 32px; }
.about-greeting { display: flex; align-items: flex-start; gap: 20px; font-family: var(--font-display); font-weight: 400; color: var(--purple); font-size: clamp(36px, 3.4vw, 48px); line-height: 1.2; }
.about-greeting img { width: 60px; height: auto; transition: transform .3s ease; }
.about-greeting:hover img { transform: rotate(-12deg) scale(1.08); }
.about-edu { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; line-height: 24px; }
.about-edu img { width: 26.87px; height: auto; flex-shrink: 0; }
.about-bio { display: flex; flex-direction: column; gap: 32px; }
.about-block h2 { color: var(--purple); font-size: 20px; font-weight: 500; line-height: 1.5; margin-bottom: 12px; }
.about-block p { font-size: 16px; font-weight: 500; line-height: 24px; }

/* Off the Clock: full-bleed strip of photos, 334px tall, scrolling sideways forever */
.page-about .about { padding-bottom: 60px; }
.off-clock { padding-top: 20px; padding-bottom: 150px; }
.off-clock h2 { color: var(--purple); font-size: 28px; font-weight: 500; line-height: 1.3; margin-bottom: 32px; }
.off-clock-strip { overflow: hidden; }
.off-clock-track { display: flex; width: max-content; animation: off-clock-scroll 70s linear infinite; will-change: transform; }
.off-clock-strip:hover .off-clock-track { animation-play-state: paused; }
.off-clock-set { display: flex; flex: none; }
.off-clock-set img { display: block; height: 334px; width: calc(var(--w) * 1px); max-width: none; object-fit: cover; }
@keyframes off-clock-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .off-clock-strip { overflow-x: auto; } }

/* =========================================================
   GARDEN
   ========================================================= */
.garden-title { display: flex; align-items: center; justify-content: space-between; gap: clamp(16px, 2.8vw, 40px); padding-top: 60px; }
.garden-title .display { flex: none; white-space: nowrap; font-size: clamp(32px, 3.4vw, 48px); text-align: center; padding: 8px; }
.garden-title .deco { flex: 0 1 320px; width: 320px; min-width: 0; }
.garden-title .flip { transform: scaleX(-1); }
/* Filter tags (Figma: Project Tag — Default / Variant3 on hover / Variant2 when selected) */
.filters { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 56px; }
.filter {
  cursor: pointer;
  font-family: var(--font-tag); font-weight: 600; font-size: 20px; line-height: 1.26;
  padding: 8px 20px; border-radius: 30px;
  background: var(--purple-wash); border: 2px solid var(--purple); color: var(--purple);
  transition: background-color .2s ease, color .2s ease;
}
.filter:hover { background: var(--white); }
.filter.is-active:hover { background: var(--purple); }
.filter.is-active { background: var(--purple); color: var(--white); }
.gallery { display: flex; align-items: flex-start; gap: 32px; padding-top: 56px; padding-bottom: 120px; }
.gallery-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.art { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.art[hidden] { display: none; }
.art.is-entering { animation: art-in .35s ease both; }
@keyframes art-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.art-open { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 20px; overflow: hidden; display: block; width: 100%; }
.art-open img { width: 100%; border-radius: 20px; transition: transform .35s ease; }
.art-open:hover img { transform: scale(1.025); }
.art figcaption { display: flex; justify-content: space-between; gap: 12px; color: var(--purple); font-size: 20px; font-weight: 500; line-height: 1.5; }
.art figcaption span:last-child { white-space: nowrap; }
.gallery-empty { color: var(--purple); font-weight: 500; padding-top: 32px; }

/* near full-screen viewer */
.lightbox {
  border: 0; padding: 24px 24px 16px; margin: 0; background: transparent;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lightbox::backdrop { background: rgba(22, 12, 64, .9); }
.lightbox img {
  /* scale every piece up to fill the screen: as tall as the viewport allows, unless that's too wide */
  --hw: 1.33;
  height: min(calc(100dvh - 96px), calc((100vw - 48px) * var(--hw)));
  width: auto; max-width: 100%; aspect-ratio: 1 / var(--hw);
  object-fit: contain; border-radius: 16px; cursor: zoom-out;
  animation: lightbox-in .25s ease both;
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lightbox-caption { color: #fff; text-align: center; font-weight: 500; font-size: 18px; flex-shrink: 0; }
.lightbox-close { position: fixed; top: 20px; right: 24px; z-index: 1; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--purple-light); color: var(--purple); font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: var(--white); }

/* =========================================================
   CASE STUDY
   ========================================================= */
body.page-case { background-color: var(--bg-case); background-image: none; }
.cs-layout {
  display: grid; grid-template-columns: 1fr minmax(0, 768px) 1fr; column-gap: 24px;
  padding-top: 60px; padding-bottom: 120px; padding-inline: 16px;
}
.cs-top { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: 100%; max-width: 996px; margin-bottom: 60px; }
/* Sticky sidebar starts level with "Project Overview" and stays pinned from there */
.cs-side { grid-column: 1; grid-row: 2; position: sticky; top: 48px; align-self: start; justify-self: center; width: 216px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.cs { grid-column: 2; grid-row: 2; min-width: 0; }
.side-nav { display: flex; flex-direction: column; width: 100%; }
.side-link { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-left: 2px solid var(--purple-light); text-decoration: none; font-size: 16px; line-height: 1.6; color: var(--black); transition: color .2s, border-color .2s; }
.side-link img { width: 24px; height: 24px; }
.side-link:hover, .side-link.is-active { color: var(--purple); border-left-color: var(--purple); }
.cs-header { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; }
.cs-header h1 { font-size: 32px; font-weight: 500; line-height: 1.25; }
.cs-header .tag { font-size: 16px; padding: 6px 12px; border-width: 2px; border-radius: 30px; }
/* Hero media (Figma "Hero Media" 996 × 563): white card with the hand-drawn purple outline
   exported from Figma (its "dynamic" stroke can't be drawn in CSS), mockup inset 22px, radius 37px */
.cs-hero { position: relative; container-type: inline-size; aspect-ratio: 996.17 / 562.94; }
.cs-hero::before {
  content: ''; position: absolute; left: -0.2072%; top: -0.3674%; width: 100.4138%; height: 100.7322%;
  background: url('/images/site/hero-frame.png') 0 0 / 100% 100% no-repeat;
}
.cs-hero img {
  position: absolute; left: 2.2136%; top: 3.9171%; width: 95.573%; height: 92.397%;
  object-fit: cover; border-radius: 3.712cqw;
}
.cs-meta { display: flex; justify-content: space-between; gap: 8px; padding: 39px 0 7px; }
.meta-item { flex: 0 0 auto; width: 152px; }
.meta-item:last-child { width: 132px; }
.meta-label { display: flex; align-items: center; gap: 7px; color: var(--purple); font-size: 17px; font-weight: 500; line-height: 1.5; }
.meta-label img { width: 20px; height: 20px; }
.cs-meta p { margin: 0; }
.meta-value { font-size: 17px; font-weight: 500; line-height: 1.6; padding-top: 7px; }

/* Vertical rhythm: every gap below is the auto-layout spacing from the Figma case-study frame.
   Blocks carry no margins of their own; the space comes from what precedes them. */
.cs-section { padding-top: 96px; }
.cs-section:first-child { padding-top: 0; }
#problem-discovery { padding-top: 64px; }           /* after the overview doodle's own 16px padding */
.cs .cs-question + .cs-section { padding-top: 54px; }   /* "How might we" band → Design Iteration */
.cs .cs-section > * { margin-top: 0; margin-bottom: 0; }
.cs .cs-section > * + * { margin-top: 48px; }
.cs .cs-section > * + h2 { margin-top: 96px; }          /* next challenge */
.cs .cs-section > .cs-label + * { margin-top: 16px; }
.cs .cs-section > h2 + * { margin-top: 16px; }
.cs .cs-section > h3 + p { margin-top: 20px; }
.cs .cs-section > h4 + * { margin-top: 12px; }
.cs .cs-section > h4 + .cs-metrics, .cs .cs-section > h4 + h3,
.cs .cs-section > h4 + .cs-insight, .cs .cs-section > h4 + .cs-demo { margin-top: 16px; }
.cs .cs-section > .cs-lead + p, .cs .cs-section > p + p { margin-top: 16px; }
.cs .cs-section > .figure + .figure { margin-top: 20px; }
.cs .cs-section > .figure + p { margin-top: 12px; }
.cs .cs-section > p + .cs-illustration { margin-top: 40px; }
.cs .cs-section > .cs-metrics + .cs-split { margin-top: 56px; }
.cs .cs-section > .cs-split + h4 { margin-top: 96px; }
.cs .cs-section > .cs-insight + .cs-insight { margin-top: 32px; }
#reflection > .cs-insight + .cs-insight { margin-top: 48px; }
.cs .cs-section > h3 + .cs-compare { margin-top: 32px; }
#design-iteration > .cs-label + h2 + p { margin-top: 8px; }
#solution > h2 + h4, #reflection > h2 + .cs-insight { margin-top: 48px; }
#solution > .cs-label { font-size: 24px; }
.cs .cs-section > .cs-insight + .cs-prompt { margin-top: 96px; }
.cs-label { display: flex; align-items: center; gap: 12px; color: var(--purple); font-size: 20px; font-weight: 500; line-height: 1.5; }
.cs-label img { width: 24px; height: 24px; }
.cs p { margin: 0; }
.cs mark { background: none; color: var(--purple); }
.cs h2 { font-size: 32px; font-weight: 500; line-height: 1.25; }
#solution h2 { font-size: 36px; line-height: 1.5; }
.cs h3 { font-size: 28px; font-weight: 500; line-height: 1.3; margin: 0; }
.cs h4 { font-size: 20px; font-weight: 500; line-height: 1.5; margin: 0; }
.cs .figure { margin-inline: 0; }
.cs .figure img { width: 100%; border-radius: 12px; }
.cs .figure figcaption { font-size: 14px; color: #555; padding-top: 8px; }
.cs-lead p { font-size: 32px; font-weight: 500; line-height: 1.25; }
.cs-illustration { display: flex; justify-content: center; margin: 0; padding: 16px 0; }
.cs-illustration img { max-width: 100%; margin: -2.5px 0; } /* the doodle's stroke overhangs its box by 2.5px */
/* "Taking all user needs into consideration…" — centred, 96px above, 108px to the band */
.cs-prompt { text-align: center; }
/* research findings (405px) beside the screenshot collage (340px; the image includes its shadows) */
.cs-split { display: grid; grid-template-columns: minmax(0, 405fr) minmax(0, 340fr); column-gap: 23px; align-items: center; }
.cs-split-img { width: 111.765%; max-width: none; margin: -31px 0 -10px -2.94%; } /* shadow overhang: 31px above, 10px below */
.cs-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px 0 3px; }
.cs-metric { display: flex; flex-direction: column; border-left: 4px solid var(--purple-light); padding-left: 12px; }
.cs-metric strong { font-size: 32px; font-weight: 500; line-height: 1.4; color: var(--purple); }
.cs-quote { margin: 40px 0 0; }
.cs-quote p { font-size: 28px; font-weight: 500; line-height: 1.3; margin: 0; }
.cs-quote .q { color: var(--purple); }
.cs-quote cite { display: block; font-style: normal; font-size: 28px; line-height: 1.3; font-weight: 500; color: var(--purple); }

.cs-insight { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
#reflection > .cs-insight:first-of-type { justify-content: flex-start; gap: 60px; }
.cs-insight.is-reverse { flex-direction: row-reverse; }
.cs-card { position: relative; background: var(--purple-wash); border: 2px solid var(--purple-medium); border-radius: 40px; padding: 24px; max-width: 507px; flex: 1; }
.cs-card h3 { display: flex; align-items: center; gap: 16px; margin: 0 0 12px; color: var(--purple); font-size: 28px; padding-left: 47px; min-height: 36px; }
.cs-num { position: absolute; left: 24px; top: 26px; width: 36px; height: 36px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 500; }
.cs-card p { margin: 0 0 12px; }
.cs-card > :last-child { margin-bottom: 0; }
.cs-opp { display: flex; align-items: flex-start; gap: 12px; }
.cs-opp img { margin-top: 5px; flex-shrink: 0; }
.cs-opp strong { font-weight: 400; color: var(--purple); }
.cs-insight-img { width: var(--w, 190px); max-width: 26%; flex-shrink: 0; }

.cs-question { background: var(--purple-light); margin: 108px calc(50% - 50vw) 0; padding: 64px var(--gutter); }
.cs-question p { max-width: 768px; margin: 0 auto; text-align: center; font-size: 32px; font-weight: 500; line-height: 1.25; }

.cs-decision { display: flex; gap: 20px; align-items: flex-start; }
.cs-decision > img { margin-top: 12px; flex-shrink: 0; }
.cs-decision h3 + p { margin-top: 20px; }

/* purple panel: image left, copy right (Figma: Chat Feature) */
.cs-panel { display: flex; align-items: center; gap: 37px; background: var(--purple-light); padding: 40px; }
/* the chat image includes its pop-up's shadow, which hangs past the 395 × 429 screenshot */
.cs-panel-img { width: 404px; max-width: 60%; flex-shrink: 0; margin: -28px 0 -27px -6px; }
.cs-panel-text p { margin-bottom: 0; }
.cs-panel-text p + p { margin-top: 16px; }

/* Solution demos: purple band, still image, recordings playing inside each phone screen */
.cs-demo { background: var(--purple-light); padding: 0 24px; }
.cs-demo-stage { position: relative; }
.cs-demo-stage > img { width: 100%; height: 100%; }
.cs-screen { position: absolute; overflow: hidden; border-radius: 13.5% / 6.2%; background: #fff; }
.cs-screen video, .cs-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cs-screen::after { content: ''; position: absolute; top: 1.5%; left: 50%; width: 32%; height: 4.2%; transform: translateX(-50%); background: #0b0b0b; border-radius: 999px; }

.cs-compare { position: relative; margin: 0; }
.cs-compare > img:first-child { width: 100%; }
.cs-compare-arrow { position: absolute; left: 50.6%; top: 57%; width: 26px; transform: translate(-50%, -50%); }

/* "Back to Projects" at the end of a case study: same pill as "View Solution", arrow flipped */
.cs-back { grid-column: 2; grid-row: 3; padding-top: 96px; display: flex; justify-content: center; }
.btn-arrow-back { transform: scaleX(-1); }

/* "What Changed?" card, centred (Figma: Logo Changes Card) */
.cs-callout { background: var(--purple-wash); border: 2px solid var(--purple-medium); border-radius: 40px; padding: 24px; margin-inline: auto; max-width: 453px; }
.cs-callout h3 { margin: 0 0 20px; text-align: center; color: var(--purple); }
.cs-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cs-checklist li { position: relative; padding-left: 36px; font-size: 16px; }
.cs-checklist li::before { content: ''; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--purple-light) url('/icons/check.svg') center / 14px no-repeat; }
.cs-eyebrow { color: var(--purple); font-size: 20px; font-weight: 500; margin: 32px 0 8px !important; }
.cs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* =========================================================
   COMING SOON (Figma "Coming Soon")
   ========================================================= */
.soon-page { display: grid; place-items: center; min-height: max(520px, calc(100svh - 156px)); padding-block: 80px; --k: 1; }
.soon-art { position: relative; text-align: center; color: var(--purple); }
.soon-art .display { font-size: 48px; line-height: normal; }
.soon-art p { font-size: 24px; font-weight: 500; line-height: 1.25; margin-top: 20px; }
/* doodles: offsets from the title block's centre, measured in Figma, scaled by --k on small screens */
.soon-doodle { position: absolute; left: 50%; top: 50%; height: auto; pointer-events: none; animation: soon-wiggle 2.2s ease-in-out infinite; }
.soon-flower { width: calc(104.3px * var(--k)); transform-origin: 50% 50%; margin: calc(-162px * var(--k)) 0 0 calc(-351px * var(--k)); }
.soon-ball-sm { width: calc(57.2px * var(--k)); margin: calc(-176px * var(--k)) 0 0 calc(-211px * var(--k)); animation-delay: -.7s; animation-duration: 1.9s; }
.soon-ball-lg { width: calc(100.4px * var(--k)); margin: calc(47px * var(--k)) 0 0 calc(199px * var(--k)); animation-delay: -1.3s; animation-duration: 2.5s; }
@keyframes soon-wiggle {
  0%, 100% { transform: rotate(-8deg); }
  25% { transform: rotate(5deg) scale(1.04); }
  50% { transform: rotate(9deg); }
  75% { transform: rotate(-4deg) scale(1.03); }
}

/* =========================================================
   CURSOR: a small Purple/Light dot that grows into "view case study" over a project card.
   Only for mouse/trackpad users (main.js adds .has-dot-cursor); touch keeps the normal behaviour.
   ========================================================= */
.cursor-dot { display: none; }
.has-dot-cursor, .has-dot-cursor * { cursor: none !important; }
.has-dot-cursor .cursor-dot {
  display: grid; place-items: center;
  position: fixed; left: 0; top: 0; z-index: 1000;
  width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 999px;
  background: #d1b7ef; color: var(--purple);
  pointer-events: none; opacity: 0;
  transition: width .28s cubic-bezier(.2, .8, .2, 1), height .28s cubic-bezier(.2, .8, .2, 1), margin .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
  will-change: transform;
}
.has-dot-cursor .cursor-dot.is-visible { opacity: 1; }
.has-dot-cursor .cursor-dot.is-down { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.cursor-label { font-size: 15px; font-weight: 500; line-height: 1.2; white-space: nowrap; opacity: 0; transform: scale(.6); transition: opacity .18s ease, transform .28s cubic-bezier(.2, .8, .2, 1); }
.has-dot-cursor .cursor-dot.is-case { width: 148px; height: 48px; margin: -24px 0 0 -74px; }
.has-dot-cursor .cursor-dot.is-case .cursor-label { opacity: 1; transform: none; transition-delay: .06s; }
/* the About photo has its own marker cursor while drawing */
.has-dot-cursor .cursor-dot.is-hidden { opacity: 0; }

/* =========================================================
   404
   ========================================================= */
.notfound { padding-block: 120px; text-align: center; }
.notfound .display { font-size: 72px; margin-bottom: 16px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
/* Sidebar links: land each section so its label lines up with the top of the sticky sidebar
   (top: 48px). The page already scrolls anchors 24px short (scroll-padding-top), so each section
   is pulled up by its own top padding minus that 24px of slack. */
@media (min-width: 1280px) {
  .cs-section { scroll-margin-top: -72px; }           /* 48 − 24 − 96px padding */
  .cs-section:first-child { scroll-margin-top: 24px; }
  #problem-discovery { scroll-margin-top: -40px; }    /* 64px padding */
  .cs-question + .cs-section { scroll-margin-top: -30px; } /* 54px padding */
}
/* the sidebar needs a 216px gutter beside the 768px column, so it hides below ~1280px */
@media (max-width: 1279px) {
  .cs-layout { grid-template-columns: minmax(0, 768px); justify-content: center; padding-inline: var(--gutter); }
  .cs-top { grid-column: 1; max-width: none; }
  .cs-side { display: none; }
  .cs { grid-column: 1; }
  .cs-back { grid-column: 1; }
}
@media (max-width: 1100px) {
  .hero-art { flex-basis: 420px; }
}

@media (max-width: 900px) {
  .about-photo { justify-self: center; }
  .soon-page { --k: .75; }
  .hero { flex-direction: column; align-items: stretch; padding-top: 48px; }
  .hero-text { margin-top: 0; }
  .hero-art { flex-basis: auto; width: min(100%, 460px); align-self: center; margin-top: 16px; }
  .projects { grid-template-columns: 1fr; row-gap: 56px; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 520px; }
  .about-text { padding-top: 0; }
  .cs-meta { display: grid; grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .meta-item, .meta-item:last-child { width: auto; max-width: none; }
  .gallery { gap: 20px; }
  .gallery-col { gap: 28px; }
  .art figcaption { font-size: 16px; }
}

@media (max-width: 640px) {
  /* nav becomes the mobile header from the design */
  .nav { padding-top: 16px; padding-bottom: 0; min-height: 56px; }
  .logo { display: none; }
  .logo-mobile { display: block; position: absolute; left: 0; top: 0; width: 72px; height: 56px; overflow: hidden; }
  .logo-mobile-flower { position: absolute; width: 60px; left: -26px; top: -18px; }
  .logo-mobile-ball { position: absolute; width: 40px; left: 30px; top: 14px; }
  .nav-links { display: none; }
  .menu-btn {
    display: grid; place-items: center; margin-left: auto;
    width: 52px; height: 40px; border: 0; border-radius: 20px;
    background: var(--purple-light); cursor: pointer;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 22px; height: 2px; background: #000; border-radius: 2px; position: relative; transition: transform .2s ease, background-color .2s; }
  .menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
  .menu-icon::before { top: -7px; }
  .menu-icon::after { top: 7px; }
  .menu-open .menu-icon { background: transparent; }
  .menu-open .menu-icon::before { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }
  .mobile-menu {
    position: fixed; inset: 56px 0 0 0; z-index: 30;
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    padding: 40px 16px; background: var(--bg);
    background-image: radial-gradient(ellipse 400px 260px at 100% 100%, var(--glow) 0%, rgba(205, 179, 238, 0) 70%);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
  .mobile-menu .nav-link { font-size: 24px; font-weight: 400; padding: 7px 24px; }
  body.menu-open { overflow: hidden; }

  .hero { padding-top: 32px; padding-bottom: 16px; gap: 12px; }
  .role { font-size: 16px; }
  .hero .display { font-size: clamp(36px, 11.5vw, 48px); padding: 0; margin-top: 4px; }
  .tagline { font-size: 22px; }
  .hero-art { width: 100%; margin-top: 24px; }
  .flower-line { --tile: 610px; --tile-h: 44px; padding-block: 16px; }
  .projects { padding-top: 24px; padding-bottom: 56px; gap: 48px; }
  .card-media { border-radius: 16px; padding: 5px; }
  .card-media img, .card-shot { border-radius: 12px; }
  .card-shot img { border-radius: 0; }
  .card-meta { padding: 8px 0; }
  .card-title { font-size: 22px; }
  .card-date { font-size: 14px; }
  .tags { gap: 10px; }
  .tag { font-size: 14px; padding: 4px 10px; }

  .footer-inner { padding-block: 20px; }
  .footer-inner p, .footer-links a { font-size: 15px; }
  .footer-links { gap: 20px; }

  .about { padding-top: 32px; gap: 32px; }
  .about-text { gap: 24px; }
  .about-bio { gap: 24px; }
  .off-clock { padding-bottom: 72px; }
  .off-clock h2 { font-size: 20px; margin-bottom: 20px; }
  .off-clock-set img { height: 220px; width: calc(var(--w) * 220px / 334); }
  .soon-page { --k: .55; min-height: 70svh; }
  .soon-flower { margin: -150px 0 0 -170px; }
  .soon-ball-sm { margin: -150px 0 0 -90px; }
  .soon-ball-lg { margin: 62px 0 0 96px; }
  .soon-art .display { font-size: 32px; }
  .soon-art p { font-size: 20px; }
  .cs-back { padding-top: 64px; }

  .garden-title { padding-top: 32px; gap: 8px; }
  .garden-title .deco { width: 56px; height: 56px; object-fit: cover; object-position: left; }
  .filters { padding-top: 24px; gap: 10px; }
  .filter { font-size: 16px; padding: 6px 14px; }
  .gallery { flex-direction: column; gap: 32px; padding-top: 32px; }
  .gallery-col { width: 100%; gap: 32px; }

  .cs-layout { padding-top: 40px; }
  .cs-top { margin-bottom: 64px; }
  .cs-header { gap: 16px; }
  .cs-header h1 { font-size: 24px; }
  .cs-meta { gap: 16px; }
  .meta-label, .meta-value { font-size: 16px; }
  .cs .cs-section { padding-top: 72px; }
  .cs-lead p, .cs h2, .cs-question p { font-size: 24px; }
  .cs h3, .cs-quote p, .cs-quote cite { font-size: 20px; }
  .cs h4 { font-size: 16px; }
  .cs-split { grid-template-columns: 1fr; }
  .cs-split { row-gap: 24px; }
  .cs-split-img { width: 100%; max-width: 380px; margin: 0 auto; }
  .cs .cs-section > * + h2 { margin-top: 72px; }
  .cs .cs-section > .cs-insight + .cs-prompt { margin-top: 64px; }
  #solution h2 { font-size: 24px; }
  .cs-insight-img { max-width: 60%; }
  #reflection > .cs-insight:first-of-type { gap: 32px; }
  .cs-metrics { gap: 16px; }
  .cs-insight, .cs-insight.is-reverse { flex-direction: column-reverse; align-items: center; }
  .cs-card { border-radius: 28px; padding: 20px 20px 8px; }
  .cs-card h3 { font-size: 20px; padding-left: 48px; }
  .cs-num { left: 20px; top: 20px; }
  .cs-question { margin-top: 72px; padding-block: 40px; }
  .cs-decision { gap: 12px; }
  .cs-decision > img { width: 26px; margin-top: 4px; }
  .cs-panel { flex-direction: column; padding: 24px; gap: 24px; }
  .cs-panel-img { max-width: 100%; width: 100%; margin: 0; }
  .cs-demo { padding: 0 8px; }
  .cs-callout { border-radius: 28px; }
  .cs-row { grid-template-columns: 1fr; }
  .btn { font-size: 16px; }
}
