/* ==========================================================================
   MANOJ UI/UX DESIGNER PORTFOLIO - STYLESHEET
   Playful scrapbook layout: scene hero, marker highlights, torn sections,
   bottom dock navigation, day / night themes
   ========================================================================== */

:root {
  --bg: #1d1d1d;
  --bg-2: #222222;
  --card: #2a2a2a;
  --ink: #f6f3ec;
  --muted: #a8a6a0;
  --faint: #6e6c68;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);

  --sun: rgba(245, 196, 64, 0.85);
  --sky: rgba(96, 132, 180, 0.75);
  --lilac: rgba(150, 124, 230, 0.7);
  --coral: #f0735a;
  --mint: rgba(84, 196, 140, 0.7);
  --yellow: #ffd65c;

  --sky-top: #141c30;
  --sky-bottom: #2b2e3f;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Gaegu", "Comic Sans MS", cursive;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(18px, 5vw, 80px);
}

:root[data-theme="light"] {
  --bg: #f3eee4;
  --bg-2: #ebe4d6;
  --card: #fffaf1;
  --ink: #1d1c1a;
  --muted: #625e57;
  --faint: #9a958c;
  --line: rgba(0, 0, 0, 0.1);
  --shadow: 0 18px 40px rgba(60, 45, 20, 0.16);

  --sun: rgba(255, 205, 70, 0.85);
  --sky: rgba(140, 180, 230, 0.75);
  --lilac: rgba(190, 170, 250, 0.8);
  --mint: rgba(140, 222, 180, 0.85);

  --sky-top: #8fb0d8;
  --sky-bottom: #f1e3cf;
}

/* ==========================================================================
   BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

ol,
ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

h2 {
  font-size: clamp(40px, 5.4vw, 80px);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

:root[data-theme="light"] h2 {
  text-shadow: none;
}

.kicker {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px;
}

.sec-head {
  max-width: 1120px;
  margin: 0 auto;
}

.sec-head.center {
  text-align: center;
}

.sec-sub {
  margin-top: 18px;
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--muted);
}

/* --- Marker highlight: swipes in when .on is added --- */
.hl {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.hl::before {
  content: "";
  position: absolute;
  inset: 0.12em -0.12em 0.02em -0.14em;
  z-index: -1;
  background: var(--c, var(--sun));
  border-radius: 0.35em 0.6em 0.4em 0.7em / 0.7em 0.4em 0.7em 0.4em;
  transform: rotate(-1.2deg);
  transition: clip-path 0.9s var(--ease);
}

.js .hl:not(.on)::before {
  clip-path: inset(0 100% 0 0);
}

.circled::before {
  display: none;
}

.circle-draw {
  position: absolute;
  inset: -0.28em -0.5em -0.22em -0.45em;
  width: calc(100% + 0.95em);
  height: calc(100% + 0.5em);
  overflow: visible;
  pointer-events: none;
}

.circle-draw path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.2s var(--ease);
}

.circled.on .circle-draw path {
  stroke-dashoffset: 0;
}

/* --- "rage quit" style strike: yellow swipe + coral scribble --- */
.rq {
  position: relative;
  z-index: 0;
  display: inline-block;
  white-space: nowrap;
}

.rq::before {
  content: "";
  position: absolute;
  inset: 0.18em -0.18em 0.04em -0.2em;
  z-index: -1;
  background: var(--yellow);
  border-radius: 50% 40% 45% 50% / 60% 50% 55% 45%;
  transform: rotate(-2deg);
}

.rq::after {
  content: "";
  position: absolute;
  left: -0.12em;
  right: -0.08em;
  top: 52%;
  height: 0.09em;
  background: var(--coral);
  border-radius: 1em;
  transform: rotate(-3deg) scaleX(0);
  transform-origin: left;
  animation: strike 0.7s 1.2s var(--ease) forwards;
}

@keyframes strike {
  to {
    transform: rotate(-3deg) scaleX(1);
  }
}

.hello .rq::after {
  display: none;
}

/* --- Hand-written hint with arrow --- */
.hint {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hand);
  font-size: 22px;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  transform: translate(-100%, -50%);
}

.hint svg {
  width: 46px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Torn paper top edge --- */
.torn {
  position: relative;
}

.torn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -19px;
  height: 20px;
  z-index: 2;
  background: var(--sec-bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M0 20V11l7-5 8 6 9-8 8 6 9-7 9 6 8-4 9 8 8-6 9 4 8-8 9 7 9-4 8 7 9-8 8 6 9-4 8 7 9-7 9 5 8-7 9 6 8-3 5 4v8z'/%3E%3C/svg%3E") 0 0 / 220px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M0 20V11l7-5 8 6 9-8 8 6 9-7 9 6 8-4 9 8 8-6 9 4 8-8 9 7 9-4 8 7 9-8 8 6 9-4 8 7 9-7 9 5 8-7 9 6 8-3 5 4v8z'/%3E%3C/svg%3E") 0 0 / 220px 100% repeat-x;
}

/* ==========================================================================
   FLOATING CONTROLS: TOP PILLS, SOUND BUTTON, DOCK
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 40px;
  background: rgba(28, 28, 28, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #f6f3ec;
  font-size: 15px;
  font-weight: 600;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, background 0.2s;
}

.pill:hover {
  transform: translateY(-2px);
}

.pill-yellow {
  background: var(--yellow);
  color: #1b1b1b;
  border-color: transparent;
}

.top-pills {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 60;
  display: flex;
  gap: 12px;
}

.dot-live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3ed07a;
  box-shadow: 0 0 0 0 rgba(62, 208, 122, 0.6);
  animation: live 2s infinite;
}

@keyframes live {
  70% {
    box-shadow: 0 0 0 8px rgba(62, 208, 122, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(62, 208, 122, 0);
  }
}

.ico-sun {
  color: var(--yellow);
}

.ico-moon {
  display: none;
  color: #b9c6ff;
}

:root[data-theme="light"] .ico-sun {
  display: none;
}

:root[data-theme="light"] .ico-moon {
  display: block;
}

.sound-btn {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(28, 28, 28, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--yellow);
  transition: transform 0.2s;
}

.sound-btn:hover {
  transform: scale(1.06);
}

.sound-btn .wave {
  display: none;
}

.sound-btn[aria-pressed="true"] .wave {
  display: block;
}

.sound-btn[aria-pressed="true"] .mute {
  display: none;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 60%),
    rgba(30, 30, 30, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14), 0 16px 40px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  color: #f6f3ec;
}

.dock-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 26px;
  font-size: 15.5px;
  font-weight: 600;
  color: rgba(246, 243, 236, 0.72);
  transition: background 0.25s, color 0.25s;
}

.dock-link .ico,
.dock-avatar {
  display: none;
}

.dock-link:hover {
  color: #fff;
}

.dock-link.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.dock-link.active .ico {
  display: block;
}

.dock-link.active .dock-avatar {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: #f1ece2;
}

.dock-link.active[data-section="top"] .ico {
  display: none;
}

.dock-cta {
  display: inline-flex;
  align-items: center;
  height: 48px;
  margin-left: 4px;
  padding: 0 20px;
  border-radius: 26px;
  background: var(--yellow);
  color: #1b1b1b;
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 -3px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s;
}

.dock-cta:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   HERO / VALLEY
   ========================================================================== */

.valley {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: #130c12;
  color: #fff;
}

/* Banner photo: dark empty space on the left for the text, Manoj on the right */
.valley-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 20%;
  animation: bgIn 1.6s var(--ease) both;
}

@keyframes bgIn {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
}

.valley-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 8, 12, 0.55) 0%, rgba(10, 8, 12, 0.15) 40%, rgba(10, 8, 12, 0) 60%),
    linear-gradient(180deg, rgba(10, 8, 12, 0.25) 0%, rgba(10, 8, 12, 0) 20%, rgba(10, 8, 12, 0) 72%, rgba(10, 8, 12, 0.55) 100%);
}

.valley-copy {
  position: absolute;
  left: var(--gutter);
  top: clamp(90px, 13vh, 130px);
  max-width: 760px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.hey {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
}

.wave-hand {
  width: 30px;
  height: 30px;
  stroke-width: 1.6;
  transform-origin: 70% 80%;
  animation: waveHand 2.4s 0.8s ease-in-out 2;
}

@keyframes waveHand {

  0%,
  60%,
  100% {
    transform: rotate(0);
  }

  10%,
  30% {
    transform: rotate(14deg);
  }

  20%,
  40% {
    transform: rotate(-8deg);
  }
}

.valley h1 {
  margin-top: 14px;
  font-size: clamp(46px, 5.6vw, 84px);
  letter-spacing: -0.06em;
  line-height: 1.02;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.valley h1 > span {
  display: block;
  animation: rise 0.9s var(--ease) both;
}

.valley h1 > span:nth-child(2) {
  animation-delay: 0.12s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.valley .sub {
  max-width: 600px;
  margin-top: 24px;
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 500;
  animation: rise 0.9s 0.25s var(--ease) both;
}

/* Map-style pins on the scene */
.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: rgba(30, 30, 34, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  animation: bob 4s ease-in-out infinite;
  transition: background 0.2s, transform 0.2s;
}

.pin:nth-of-type(2) { animation-delay: -1s; }
.pin:nth-of-type(3) { animation-delay: -2s; }
.pin:nth-of-type(4) { animation-delay: -3s; }

.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--coral);
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(240, 115, 90, 0.25);
}

.pin::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 11px;
  background: rgba(255, 255, 255, 0.6);
}

.pin:hover {
  background: rgba(50, 50, 56, 0.9);
}

.pin small {
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 600;
}

.pin-logo {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.scroll-pill {
  position: absolute;
  left: 50%;
  bottom: 112px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  background: rgba(40, 32, 26, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 17px;
  font-weight: 500;
  transform: translateX(-50%);
}

.mouse {
  position: relative;
  width: 18px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 10px;
}

.mouse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #fff;
  transform: translateX(-50%);
  animation: wheel 1.6s ease-in-out infinite;
}

@keyframes wheel {
  0% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 9px);
  }
}

/* ==========================================================================
   STORY / ABOUT
   ========================================================================== */

.story {
  --sec-bg: var(--bg);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px;
  padding: 120px var(--gutter) 160px calc(var(--gutter) + 4vw);
  background: var(--sec-bg);
}

.tell {
  font-size: clamp(32px, 3.9vw, 58px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.32;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}

:root[data-theme="light"] .tell {
  text-shadow: none;
}

.tell .w {
  color: var(--faint);
  transition: color 0.35s;
}

.tell .w.lit {
  color: var(--ink);
}

.desk {
  position: relative;
  min-height: 640px;
}

.note {
  position: absolute;
  width: 230px;
  padding: 26px 22px 18px;
  border-radius: 4px 4px 14px 4px;
  background: var(--bgc, #ffe58a);
  color: #2a2620;
  font-family: var(--hand);
  font-size: 23px;
  line-height: 1.2;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: box-shadow 0.2s;
}

.note.dragging {
  cursor: grabbing;
  z-index: 10;
  box-shadow: 0 26px 44px rgba(0, 0, 0, 0.42);
}

.note small {
  display: block;
  margin-top: 10px;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

.desk .note:nth-child(1) { top: 0; left: 8%; }
.desk .note:nth-child(2) { top: 40px; right: 0; }
.desk .note:nth-child(3) { top: 300px; right: 6%; }
.desk .note:nth-child(4) { top: 410px; left: 0; }

.tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 72px;
  height: 22px;
  background: rgba(220, 215, 200, 0.55);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.polaroid {
  width: 220px;
  padding: 12px 12px 10px;
  background: #fbf8f2;
  border-radius: 3px;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 20%;
  pointer-events: none;
}

.polaroid figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 21px;
}

.move-hint {
  position: absolute;
  left: 12%;
  bottom: 30px;
  font-family: var(--hand);
  font-size: 22px;
  color: var(--muted);
  transform: rotate(-4deg);
}

/* ==========================================================================
   SELECTED WORK / CARD BOX
   A 3D box built from a floor (.box) and four walls. Cards stand inside it,
   lift and flip on hover, and pop out toward the viewer when clicked.
   ========================================================================== */

.work {
  --sec-bg: var(--bg-2);
  padding: 110px var(--gutter) 120px;
  background: var(--sec-bg);
  overflow-x: clip;
}

/* the box pins mid-screen while the lid opens and the cards rise */
.box-pin {
  position: relative;
  height: calc(760px + 110vh);
}

.box-pin .box-scene {
  position: sticky;
  top: max(10px, calc(50vh - 400px));
}

.box-scene:not(.in) .hint-static {
  opacity: 0;
}

.box-scene {
  --s: 0.9;
  --wall: 120px;
  position: relative;
  display: flex;
  justify-content: center;
  height: 760px;
  margin-top: 10px;
  perspective: 2400px;
  perspective-origin: 50% 30%;
}

.box-scene::before {
  content: "";
  position: absolute;
  inset: 25% 18% 5%;
  background: radial-gradient(ellipse, rgba(255, 190, 90, 0.2), transparent 65%);
  filter: blur(24px);
  pointer-events: none;
}

/* The floor; everything else is positioned relative to it */
.box {
  position: relative;
  flex-shrink: 0;
  width: 900px;
  height: 330px;
  margin-top: 330px;
  transform-style: preserve-3d;
  transform: scale(var(--s)) rotateX(56deg) rotateZ(22deg);
}

.box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, #e6c98f, #d3ae6c);
  box-shadow: 0 0 0 1px rgba(150, 110, 50, 0.25), 30px 40px 90px rgba(0, 0, 0, 0.45);
}

.box-wall {
  position: absolute;
  transform-style: preserve-3d;
  background: linear-gradient(180deg, #f1dcac, #e0c181);
  box-shadow: inset 0 2px rgba(255, 255, 255, 0.55);
}

/* front wall: hinged on the floor's near edge */
.box-front {
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--wall);
  display: grid;
  place-items: center;
  border-radius: 4px;
  transform-origin: bottom;
  transform: rotateX(-90deg);
}

.box-front span {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(120, 86, 36, 0.36);
  text-shadow: 0 1px rgba(255, 255, 255, 0.55), 0 -1px rgba(100, 70, 30, 0.15);
}

/* back wall: hinged on the far edge, carries the open lid */
.box-back {
  left: 0;
  top: 0;
  width: 100%;
  height: var(--wall);
  transform-origin: top;
  transform: rotateX(90deg);
  background: linear-gradient(0deg, #d8b878, #caa45f);
}

.box-lid {
  position: absolute;
  left: -6px;
  right: -6px;
  top: 100%;
  height: 336px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f2e1b6, #e3c78e);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(150, 110, 50, 0.2);
  transform-origin: top;
  /* -90deg = shut over the box, 30deg = open; scrubbed by scroll */
  transform: rotateX(var(--lid, 30deg));
}

.lid-tag {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--hand);
  font-size: 54px;
  color: rgba(120, 86, 36, 0.55);
  opacity: var(--tag, 0);
}

.box-lid::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1.5px dashed rgba(140, 100, 45, 0.35);
  border-radius: 4px;
}

.box-left,
.box-right {
  top: 0;
  width: var(--wall);
  height: 100%;
  background: linear-gradient(90deg, #dcbd80, #cfa964);
}

.box-left {
  left: 0;
  transform-origin: left;
  transform: rotateY(-90deg);
}

.box-right {
  right: 0;
  transform-origin: right;
  transform: rotateY(90deg);
  background: linear-gradient(270deg, #e7cd95, #d8b676);
}

.box-cards {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* --- Cards --- */
.pcard {
  --lift: 0px;
  --flip: 0deg;
  --turn: -38deg;
  position: absolute;
  bottom: 115px;
  left: calc(110px + var(--n) * 122px);
  width: 200px;
  height: 320px;
  padding: 0;
  transform-origin: bottom center;
  transform-style: preserve-3d;
  /* --sink pushes a card down through the floor while the box is shut */
  transform: rotateX(-84deg) translateY(calc(var(--lift) + var(--sink, 0px))) rotateY(calc(var(--turn) + var(--flip)));
  transition: transform 0.75s var(--ease);
  cursor: none;
}

/* while sinking, follow the scroll closely instead of easing for 0.75s */
.js .box-scene:not(.in) .pcard {
  pointer-events: none;
  transition-duration: 0.25s, 0.25s;
  transition-property: transform, clip-path;
  /* hide the part of the card that is still below the floor */
  clip-path: inset(0 0 var(--sink, 0px) 0);
}

.box-scene.in .pcard.active,
.box-scene.in .pcard:focus-visible {
  --lift: -120px;
  --flip: 180deg;
  transition-delay: 0s;
}

.box-scene.in.has-active .pcard:not(.active) {
  transition-delay: 0s;
}

.pcard.popped {
  visibility: hidden;
}

.pc-face,
.pc-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 18px;
  color: #fff;
  text-align: left;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
}

.pc-face {
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.pc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.pc-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #fff;
  color: var(--c2);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.pc-no {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 700;
}

.pc-name {
  margin-top: auto;
  font-family: var(--hand);
  font-size: 22px;
  line-height: 1;
}

.pc-line {
  margin-top: 8px;
  font-size: 25px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.pc-sub {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}

.pc-back {
  gap: 10px;
  background:
    radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--c1) 45%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--c2) 55%, #1a1410), #16110e);
  transform: rotateY(180deg);
  transition: box-shadow 0.6s;
}

.pcard.active .pc-back {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 46px color-mix(in srgb, var(--c1) 80%, transparent);
}

.pc-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c1);
  filter: brightness(1.3);
}

.pc-feat {
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
}

.pc-open {
  margin-top: auto;
  font-family: var(--hand);
  font-size: 19px;
  color: var(--yellow);
}

/* --- "View" bubble that follows the pointer --- */
.view-bubble {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 0;
  height: 0;
  pointer-events: none;
}

.view-bubble span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  border-radius: 50%;
  background: #1b2233;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0);
  transition: transform 0.35s var(--ease);
}

:root[data-theme="dark"] .view-bubble span {
  background: var(--yellow);
  color: #1b1b1b;
}

.view-bubble.show span {
  transform: scale(1);
}

.hint-static {
  position: absolute;
  left: auto;
  right: 6%;
  top: 34%;
  color: var(--muted);
  transform: rotate(-6deg);
  transition: opacity 0.3s;
}

.box-scene.has-active .hint-static {
  opacity: 0;
}

/* --- Card → page zoom: the clicked card grows to fill the screen --- */
.case-zoom {
  position: fixed;
  z-index: 95;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  will-change: left, top, width, height, border-radius;
}

.cz-face {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  width: var(--w);
  height: var(--h);
  padding: 24px;
  transform-origin: 50% 50%;
}

.cz-face .pc-mark { width: 58px; height: 58px; border-radius: 16px; font-size: 18px; }
.cz-face .pc-no { width: 34px; height: 34px; font-size: 13px; }
.cz-face .pc-name { font-size: 30px; }
.cz-face .pc-line { font-size: 40px; }
.cz-face .pc-sub { font-size: 14px; }

/* the page colour washes in as the card reaches full screen */
.cz-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(70% 45% at 15% 0%, color-mix(in srgb, var(--g1) 26%, transparent), transparent 70%),
    radial-gradient(60% 40% at 90% 8%, color-mix(in srgb, var(--g2) 18%, transparent), transparent 70%),
    var(--bg);
}

/* --- List under the box --- */
.work-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 34px;
  max-width: 1240px;
  margin: 0 auto;
}

.work-list button {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 4px 2px 10px;
  text-align: left;
  opacity: 0.85;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.work-list button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--c1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.work-list .n {
  padding-top: 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c1);
}

.work-list b {
  display: block;
  font-size: 18px;
  transition: color 0.25s;
}

.work-list small {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.work-list:has(li.active) button {
  opacity: 0.45;
}

.work-list li.active button {
  opacity: 1;
  transform: translateY(-3px);
}

.work-list li.active button::after {
  transform: scaleX(1);
}

.work-list li.active b {
  color: var(--c1);
  filter: brightness(1.1);
}

@media (max-width: 1100px) {
  .box-scene {
    --s: 0.78;
    height: 590px;
  }

  .box {
    margin-top: 290px;
  }
}

@media (max-width: 800px) {
  .work {
    padding-bottom: 100px;
  }

  .box-scene {
    --s: 0.36;
    height: 420px;
    margin-top: 10px;
  }

  .box-pin {
    height: calc(420px + 90vh);
  }

  .box-pin .box-scene {
    top: calc(50vh - 240px);
  }

  .box {
    margin-top: 150px;
    margin-left: -24px;
  }

  .pcard {
    cursor: pointer;
  }

  .box-scene.in .pcard.active {
    --lift: -150px;
  }

  .hint-static {
    display: none;
  }

  .work-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px;
    max-width: 420px;
  }

  .work-list b {
    font-size: 16px;
  }

  .work-list small {
    font-size: 12.5px;
  }
}

/* ==========================================================================
   STACK / GIFT
   ========================================================================== */

.stack {
  --sec-bg: var(--bg-2);
  padding: 110px var(--gutter) 150px;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.04), transparent 60%), var(--sec-bg);
}

.gift-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 460px;
  margin-top: 60px;
}

.gift {
  position: relative;
  width: 220px;
  height: 230px;
  margin-top: 40px;
  transition: transform 0.25s;
}

.gift:hover {
  transform: rotate(-3deg) scale(1.03);
}

.gift-body {
  position: absolute;
  left: 14px;
  bottom: 0;
  width: 192px;
  height: 160px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 43%, #d9b45a 43%, #f0d07e 50%, #c79d3f 57%, transparent 57%),
    linear-gradient(90deg, #1d2b52, #24365f 70%, #16213f 70%);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.6s var(--ease), opacity 0.5s;
}

.gift-tag {
  position: absolute;
  right: -10px;
  top: 34px;
  padding: 4px 10px;
  border-radius: 3px;
  background: #f3ead7;
  color: #3a3125;
  font-family: var(--hand);
  font-size: 15px;
  transform: rotate(18deg);
}

.gift-lid {
  position: absolute;
  left: 4px;
  top: 30px;
  z-index: 1;
  width: 212px;
  height: 44px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 43%, #d9b45a 43%, #f0d07e 50%, #c79d3f 57%, transparent 57%),
    linear-gradient(180deg, #2c4174, #22345e);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.8s var(--ease), opacity 0.6s;
}

.bow {
  position: absolute;
  left: 50%;
  top: -30px;
  width: 0;
  height: 0;
}

.bow i {
  position: absolute;
  top: 0;
  width: 54px;
  height: 32px;
  border: 7px solid #e3bd62;
  border-radius: 50%;
  background: rgba(240, 208, 126, 0.25);
}

.bow i:nth-child(1) {
  right: 2px;
  transform: rotate(-18deg);
}

.bow i:nth-child(2) {
  left: 2px;
  transform: rotate(18deg);
}

.bow b {
  position: absolute;
  left: -11px;
  top: 10px;
  width: 22px;
  height: 18px;
  border-radius: 6px;
  background: #f0d07e;
}

.pill-action {
  margin-top: 34px;
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

:root[data-theme="dark"] .pill-action {
  border-color: rgba(255, 255, 255, 0.2);
}

.tools {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  justify-content: center;
  align-content: center;
  gap: 18px;
  pointer-events: none;
}

.tools li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(60px) scale(0.6) rotate(calc((var(--i) - 2.5) * 6deg));
}

.tools b {
  font-size: 17px;
  align-self: end;
}

.tools small {
  grid-column: 2;
  font-size: 13px;
  color: var(--muted);
  align-self: start;
}

.tool-ico {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
}

.tool-ico svg {
  height: 26px;
}

.gift-stage.open .gift,
.gift-stage.open .pill-action {
  pointer-events: none;
}

.gift-stage.open .gift-lid {
  transform: translateY(-160px) rotate(-28deg);
  opacity: 0;
}

.gift-stage.open .gift-body,
.gift-stage.open .pill-action {
  transform: scale(0.7);
  opacity: 0;
  transition: transform 0.6s 0.25s var(--ease), opacity 0.4s 0.25s;
}

.gift-stage.open .tools {
  pointer-events: auto;
}

.gift-stage.open .tools li {
  animation: popTool 0.7s calc(0.4s + var(--i) * 0.08s) var(--ease) forwards;
}

@keyframes popTool {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   PROCESS / WAVE
   ========================================================================== */

.process {
  --sec-bg: var(--bg);
  padding: 110px var(--gutter) 170px;
  background: var(--sec-bg);
}

.process .sec-head {
  max-width: none;
  padding-left: 4vw;
}

/* --- One screen, five stages: pinned while you scroll --- */
.forge {
  position: relative;
  height: 520vh;
  margin-top: 30px;
}

.forge-stick {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
  height: 100vh;
  height: 100svh;
  padding: 96px 4vw 120px;
}

/* stage list */
.forge-rail {
  position: relative;
  display: grid;
  gap: 6px;
}

.forge-rail li {
  position: relative;
  padding-left: 24px;
}

.forge-rail li::before,
.fr-bar {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--line);
}

.fr-bar {
  bottom: auto;
  height: calc((100% - 16px) * var(--p, 0));
  background: var(--c);
}

.forge-rail button {
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  text-align: left;
  opacity: 0.38;
  transition: opacity 0.4s;
}

.forge-rail li.on button,
.forge-rail button:hover {
  opacity: 1;
}

.fr-n {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.4s, border-color 0.4s, color 0.4s;
}

.forge-rail li.on .fr-n,
.forge-rail li.done .fr-n {
  border-color: transparent;
  background: var(--c);
  color: #1d1c1a;
}

.fr-t b {
  display: block;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 34px;
  letter-spacing: -0.03em;
}

.fr-t small {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-size: 15px;
  color: var(--muted);
  opacity: 0;
  transition: max-height 0.5s var(--ease), opacity 0.4s;
}

.forge-rail li.on .fr-t small {
  max-height: 3em;
  opacity: 1;
}

.forge-cap {
  display: none;
}

.forge-count {
  position: absolute;
  right: 4vw;
  bottom: 118px;
  font-family: var(--hand);
  font-size: 22px;
  color: var(--muted);
}

.forge-count b {
  font-size: 40px;
  color: var(--ink);
}

/* the canvas: dotted paper, scaled to fit */
.forge-stage {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle, var(--line) 1.3px, transparent 1.5px) 0 0 / 22px 22px,
    var(--bg-2);
}

/* out of layout flow, so its 600px never stretches the grid before scaling */
.forge-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 600px;
  height: 600px;
  margin: -300px 0 0 -300px;
  transform: scale(var(--k, 1));
}

.fx {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.45s, visibility 0s 0.45s;
}

[data-stage="0"] .fx-ux,
[data-stage="1"] .fx-flow,
[data-stage="2"] .fx-phone,
[data-stage="3"] .fx-phone,
[data-stage="4"] .fx-phone {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.45s;
}

/* handwritten bits */
.fx-hand,
.fx-tag {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--hand);
  font-size: 22px;
  line-height: 1.05;
  color: var(--coral);
}

.fx-hand {
  transform: rotate(-4deg);
  text-align: center;
}

/* 01 UX */
.fx-problem {
  position: absolute;
  left: 140px;
  top: 215px;
  width: 320px;
  padding: 24px 26px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  transform: scale(0.9);
  transition: transform 0.7s var(--ease);
}

.fx-problem small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--hand);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.fx-problem u {
  text-decoration: underline wavy var(--coral);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.fx-note {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 175px;
  height: 140px;
  padding: 18px;
  background: var(--nc);
  color: #1d1c1a;
  font-family: var(--hand);
  font-size: 26px;
  line-height: 1.02;
  text-align: center;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(50px) rotate(0deg) scale(0.7);
  transition: transform 0.7s var(--ease), opacity 0.4s;
}

[data-stage="0"] .fx-problem {
  transform: none;
}

[data-stage="0"] .fx-note {
  opacity: 1;
  transform: rotate(var(--r));
  transition-delay: var(--d);
}

/* 02 Flow */
.fx-flow svg {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.fx-flow-line,
.fx-flow-head {
  fill: none;
  stroke: #7fb2ff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fx-flow-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.2s 0.2s ease-in-out;
}

.fx-flow-head {
  opacity: 0;
  transition: opacity 0.3s 1.2s;
}

[data-stage="1"] .fx-flow-line {
  stroke-dashoffset: 0;
}

[data-stage="1"] .fx-flow-head {
  opacity: 1;
}

.fx-mini {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 130px;
  height: 160px;
  padding: 16px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: var(--card);
  opacity: 0;
  transform: scale(0.6);
  transition: transform 0.6s var(--ease), opacity 0.4s;
}

.fx-mini i {
  height: 9px;
  border-radius: 5px;
  background: var(--line);
}

.fx-mini i:first-child {
  height: 34px;
  border-radius: 9px;
}

.fx-mini i:nth-child(3) {
  width: 60%;
}

.fx-mini b {
  margin-top: auto;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.fx-mini.done {
  border-color: #3fbf7f;
}

[data-stage="1"] .fx-mini {
  opacity: 1;
  transform: none;
  transition-delay: var(--d);
}

/* 03–05 the phone */
.fp {
  position: absolute;
  left: 175px;
  top: 40px;
  width: 250px;
  height: 520px;
  padding: 9px;
  border-radius: 42px;
  background: #121212;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), inset 0 0 0 1.5px #333;
}

.fp-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 34px;
  background: #fff;
  color: #1d1c1a;
  transition: background 0.6s;
}

.fp-a {
  display: flex;
  flex-direction: column;
  gap: 11px;
  height: 100%;
  padding: 14px 14px 16px;
}

.fp .t {
  display: inline-block;
  border-radius: 4px;
  color: transparent;
  background: #e6e2db;
  line-height: 1.15;
  transition: color 0.6s, background 0.6s;
}

.fp-status {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
}

.fp-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fp-head > span:last-child {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.fp-head b { font-size: 16px; }
.fp-head small { font-size: 11px; }

.fp-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6e2db;
  transition: background 0.6s;
}

.fp-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 5px;
  height: 128px;
  padding: 14px;
  border-radius: 20px;
  border: 2px solid #e6e2db;
  background:
    linear-gradient(to top right, transparent calc(50% - 1px), #e6e2db calc(50% - 1px), #e6e2db calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to bottom right, transparent calc(50% - 1px), #e6e2db calc(50% - 1px), #e6e2db calc(50% + 1px), transparent calc(50% + 1px));
  transition: background 0.6s, border-color 0.6s, color 0.6s;
}

.fp-hero small { font-size: 10px; font-weight: 700; }
.fp-hero b { font-size: 19px; letter-spacing: -0.03em; }
.fp-hero span { font-size: 11px; }

.fp-label {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
}

.fp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fp-row > i {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #e6e2db;
  transition: background 0.6s;
}

.fp-row > span {
  display: grid;
  gap: 3px;
  justify-items: start;
}

.fp-row b { font-size: 13px; }
.fp-row small { font-size: 10.5px; }

.fp-btn {
  position: relative;
  display: grid;
  place-items: center;
  height: 44px;
  margin-top: auto;
  border: 2px dashed #c9c4bb;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.6s, border-color 0.6s;
}

/* layout grid overlay, only while wireframing */
.fp-grid {
  position: absolute;
  inset: 0 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

.fp-grid i {
  background: rgba(240, 90, 90, 0.08);
}

[data-stage="2"] .fp-grid {
  opacity: 1;
}

/* UI: same structure, now with colour and words */
:is([data-stage="3"], [data-stage="4"]) .fp-screen {
  background: #fbf7f0;
}

:is([data-stage="3"], [data-stage="4"]) .fp .t {
  color: inherit;
  background: transparent;
}

:is([data-stage="3"], [data-stage="4"]) .fp-av {
  background: linear-gradient(135deg, #ffb86b, #ff7a45);
}

:is([data-stage="3"], [data-stage="4"]) .fp-head small,
:is([data-stage="3"], [data-stage="4"]) .fp-row small {
  color: #8a857c;
}

:is([data-stage="3"], [data-stage="4"]) .fp-hero {
  border-color: transparent;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
    linear-gradient(135deg, #ff7a45, #7b5cff);
  color: #fff;
}

:is([data-stage="3"], [data-stage="4"]) .fp-row > i {
  background: var(--ic);
}

:is([data-stage="3"], [data-stage="4"]) .fp-btn {
  border-color: #1d1c1a;
  background: #1d1c1a;
  color: #fff;
}

/* notes around the phone, per stage */
.fx-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.fx-tag.right {
  transform: translateX(12px);
}

.fx-tag i {
  flex: none;
  width: 44px;
  border-top: 2px dashed var(--coral);
}

[data-stage="2"] .fx-tag {
  opacity: 1;
  transform: none;
}

[data-stage="2"] .fx-tag:nth-of-type(2) { transition-delay: 0.1s; }
[data-stage="2"] .fx-tag:nth-of-type(3) { transition-delay: 0.2s; }
[data-stage="2"] .fx-tag:nth-of-type(4) { transition-delay: 0.3s; }

.fx-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  transform: translateY(24px) rotate(var(--r)) scale(0.85);
  transition: opacity 0.4s, transform 0.6s var(--ease);
}

.fx-card > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fx-card.sw i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--s);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.fx-card.ty em {
  font-size: 46px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.fx-card.ty small {
  color: var(--muted);
  line-height: 1.3;
}

.fx-card.sp i {
  width: var(--w);
  height: 26px;
  border-radius: 3px;
  background: rgba(240, 115, 90, 0.35);
  border: 1.5px solid var(--coral);
}

[data-stage="3"] .fx-card {
  opacity: 1;
  transform: rotate(var(--r));
}

[data-stage="3"] .fx-card.ty { transition-delay: 0.1s; }
[data-stage="3"] .fx-card.sp { transition-delay: 0.2s; }

/* 05 Prototype: hotspot, cursor, tap, next screen, on a loop */
.fx-hot {
  position: absolute;
  left: 191px;
  top: 498px;
  width: 218px;
  height: 52px;
  border: 2px solid #4f7fd8;
  border-radius: 26px;
  background: rgba(79, 127, 216, 0.12);
  opacity: 0;
}

.fx-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  opacity: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.fx-cursor path {
  fill: #1d1c1a;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.fx-hand.pr {
  opacity: 0;
  transition: opacity 0.4s 0.3s;
}

.fp-b {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(160deg, #7b5cff, #ff7a45);
  color: #fff;
  text-align: center;
  transform: translateX(100%);
}

.fp-b b {
  font-size: 26px;
  letter-spacing: -0.04em;
}

.fp-b small {
  font-size: 13px;
  opacity: 0.9;
}

.fp-check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: #fff;
  color: #7b5cff;
  font-size: 30px;
  font-weight: 800;
}

[data-stage="4"] .fx-hot { animation: protoHot 4.8s infinite; }
[data-stage="4"] .fx-cursor { animation: protoCursor 4.8s infinite var(--ease); }
[data-stage="4"] .fp-btn { animation: protoTap 4.8s infinite; }
[data-stage="4"] .fp-b { animation: protoNext 4.8s infinite cubic-bezier(0.65, 0, 0.35, 1); }
[data-stage="4"] .fp-a { animation: protoBack 4.8s infinite cubic-bezier(0.65, 0, 0.35, 1); }
[data-stage="4"] .fx-hand.pr { opacity: 1; }

@keyframes protoHot {
  0%, 8% { opacity: 0; }
  14%, 40% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

@keyframes protoCursor {
  0% { opacity: 0; transform: translate(500px, 600px); }
  10% { opacity: 1; }
  34% { transform: translate(296px, 516px); }
  38% { transform: translate(296px, 516px) scale(0.8); }
  42% { transform: translate(296px, 516px); }
  58% { opacity: 1; transform: translate(296px, 516px); }
  70%, 100% { opacity: 0; transform: translate(520px, 560px); }
}

@keyframes protoTap {
  0%, 36% { transform: none; }
  39% { transform: scale(0.94); }
  44%, 100% { transform: none; }
}

@keyframes protoNext {
  0%, 42% { transform: translateX(100%); }
  52%, 84% { transform: translateX(0); }
  94%, 100% { transform: translateX(100%); }
}

@keyframes protoBack {
  0%, 42% { transform: none; }
  52%, 84% { transform: translateX(-30%); }
  94%, 100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  [data-stage="4"] :is(.fx-hot, .fx-cursor, .fp-btn, .fp-b, .fp-a) {
    animation: none;
  }
}

/* ==========================================================================
   CONTACT / HELLO
   ========================================================================== */

.hello {
  position: relative;
  overflow: hidden;
  padding: 140px var(--gutter) 120px;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  color: #fff;
}

:root[data-theme="light"] .hello {
  color: #1d1c1a;
}

.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sky::before {
  content: "";
  position: absolute;
  inset: 0 0 50%;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 25% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 30%, #fff, transparent),
    radial-gradient(1px 1px at 62% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 26%, #fff, transparent),
    radial-gradient(1px 1px at 90% 6%, #fff, transparent);
  opacity: 0.7;
}

:root[data-theme="light"] .sky::before {
  display: none;
}

.cloud {
  position: absolute;
  width: 520px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.16), transparent 68%);
  filter: blur(8px);
  animation: drift 40s linear infinite alternate;
}

:root[data-theme="light"] .cloud {
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.85), transparent 68%);
}

.c1 { left: -120px; top: 16%; }
.c2 { right: -140px; top: 8%; animation-duration: 55s; }
.c3 { left: 8%; bottom: 8%; width: 760px; height: 320px; animation-duration: 48s; }
.c4 { right: 4%; bottom: 22%; width: 640px; animation-duration: 60s; }

@keyframes drift {
  to {
    transform: translateX(80px);
  }
}

.hello > *:not(.sky) {
  position: relative;
}

.hello-head {
  text-align: center;
}

.hello h2 {
  font-size: clamp(48px, 7.4vw, 112px);
  line-height: 0.98;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] .hello h2 {
  text-shadow: none;
}

.hello-head p {
  margin-top: 26px;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.5;
}

.keys-panel {
  max-width: 1060px;
  margin: 60px auto 0;
  padding: 30px 30px 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 24px 24px,
    rgba(32, 32, 32, 0.92);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  color: #f6f3ec;
}

.keys-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #c9c6bf;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: #3a3a3a;
  font: 700 11px var(--font);
  color: #eee;
}

.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 26px;
}

/* Keys share one row; notes sit above (.up) or below (.dn) them */
.key-col {
  display: grid;
  grid-template-rows: 96px auto 96px;
  justify-items: center;
  row-gap: 14px;
  text-align: center;
}

.key-col .key {
  grid-row: 2;
}

.knote.up {
  grid-row: 1;
  align-self: end;
}

.knote.dn {
  grid-row: 3;
  align-self: start;
}

.key {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--k1), var(--k2));
  box-shadow:
    inset 0 2px rgba(255, 255, 255, 0.35),
    inset 0 -12px rgba(0, 0, 0, 0.16),
    0 0 0 7px #1c1c1c,
    0 16px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s, box-shadow 0.12s;
}

.key:hover {
  transform: translateY(-3px);
}

.key:active,
.key.pressed {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px rgba(255, 255, 255, 0.3),
    inset 0 -4px rgba(0, 0, 0, 0.16),
    0 0 0 7px #1c1c1c,
    0 6px 12px rgba(0, 0, 0, 0.45);
}

.key i {
  position: absolute;
  top: 8px;
  left: 11px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.key-dark i {
  color: rgba(0, 0, 0, 0.5);
}

.key svg {
  width: 52px;
  height: 52px;
}

.key-txt {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.knote {
  max-width: 190px;
  font-size: 16.5px;
  line-height: 1.35;
}

.arr {
  display: block;
  font-family: var(--hand);
  font-size: 24px;
  line-height: 1;
  color: var(--coral);
}

.knote.up .arr {
  margin-top: 4px;
}

.knote.dn .arr {
  margin-bottom: 4px;
}

.mail-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

.mail-copy .ico {
  width: 15px;
  height: 15px;
}

.mail-copy:hover {
  color: var(--yellow);
}

/* --- Leave a note (contact form) --- */
.note-wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  max-width: 1060px;
  margin: 120px auto 0;
}

.note-wall .kicker {
  color: inherit;
  opacity: 0.75;
}

.note-wall h3 {
  font-size: clamp(36px, 4vw, 56px);
}

.note-wall-head > p:last-child {
  margin-top: 18px;
  font-size: 18px;
  opacity: 0.85;
}

.note-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px 30px 30px;
  border-radius: 4px 4px 18px 4px;
  background: #fff3b8;
  color: #2a2620;
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.35);
  transform: rotate(1.5deg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-family: var(--hand);
  font-size: 21px;
  line-height: 1;
}

.form-control {
  width: 100%;
  padding: 8px 2px;
  border: 0;
  border-bottom: 2px dashed rgba(42, 38, 32, 0.25);
  background: transparent;
  color: #2a2620;
  font: 500 17px var(--font);
}

.form-control::placeholder {
  color: rgba(42, 38, 32, 0.4);
}

.form-control:focus {
  outline: none;
  border-bottom-color: var(--coral);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-control.is-invalid {
  border-bottom-color: #d8432f;
}

.field-error-msg {
  font-size: 13px;
  font-weight: 600;
  color: #c2321f;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
  height: 50px;
  margin-top: 6px;
  padding: 0 24px;
  border-radius: 26px;
  background: #1d1d1d;
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s;
}

.form-submit:hover {
  transform: translateY(-2px);
}

.form-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.form-submit.submit-success {
  background: #23935f;
}

.wa-ico {
  width: 20px;
  height: 20px;
  flex: none;
}

.form-submit:hover .wa-ico {
  color: #25d366;
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1060px;
  margin: 110px auto 0;
  padding: 22px 0 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
  opacity: 0.8;
}

:root[data-theme="light"] .footer {
  border-top-color: rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   JOURNEY / HEART MAP
   ========================================================================== */

:root {
  --map-bg: #1c1c1c;
  --map-block: #262626;
  --map-road: #2e2e2e;
  --map-water: #1c2d44;
  --map-water-ink: rgba(150, 190, 240, 0.45);
  --map-park: #1f2f25;
  --map-hwy: #5b4b22;
  --map-label: rgba(255, 255, 255, 0.28);
  --trail: #4f7fd8;
}

:root[data-theme="light"] {
  --map-bg: #faf7f0;
  --map-block: #ece6da;
  --map-road: #ffffff;
  --map-water: #bcd6f0;
  --map-water-ink: rgba(60, 100, 150, 0.55);
  --map-park: #d7e9c9;
  --map-hwy: #f3d98a;
  --map-label: rgba(70, 60, 50, 0.45);
}

.journey {
  --sec-bg: var(--map-bg);
  height: 1000vh;
  background: var(--sec-bg);
}

.j-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.j-map {
  position: absolute;
  inset: 0;
}

/* Fades the map edges into the page while showing the whole heart */
.j-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse var(--fw, 520px) var(--fh, 440px) at var(--fx, 50%) var(--fy, 62%), transparent 62%, var(--map-bg) 100%);
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.6s;
}

.journey.zoomed .j-map::after {
  opacity: 0;
}

.j-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1600px;
  height: 1200px;
  transform-origin: 0 0;
  will-change: transform;
}

.j-world svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.m-bg { fill: var(--map-bg); }
.m-block { fill: var(--map-block); }
.m-road { fill: none; stroke: var(--map-road); stroke-width: 9; }
.m-avenue { fill: none; stroke: var(--map-road); stroke-width: 16; stroke-linecap: round; }
.m-water { fill: var(--map-water); }
.m-river { fill: none; stroke: var(--map-water); stroke-width: 30; stroke-linecap: round; }
.m-park { fill: var(--map-park); }
.m-hwy { fill: none; stroke: var(--map-hwy); stroke-width: 18; stroke-linecap: round; }

.m-label {
  fill: var(--map-label);
  font: 800 20px var(--font);
  letter-spacing: 0.3em;
}

.m-small {
  fill: var(--map-water-ink);
  font: 600 13px var(--font);
}

.m-hwy-tag rect { fill: var(--map-bg); stroke: var(--map-hwy); stroke-width: 2; }
.m-hwy-tag text { fill: var(--map-label); font: 700 11px var(--font); }

.j-trail-layer {
  pointer-events: none;
}

.j-trail-glow {
  fill: none;
  stroke: var(--trail);
  stroke-width: 14;
  stroke-linecap: round;
  opacity: 0.12;
  vector-effect: non-scaling-stroke;
}

.j-trail-base {
  fill: none;
  stroke: rgba(160, 185, 230, 0.55);
  stroke-width: 3;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

:root[data-theme="light"] .j-trail-base {
  stroke: #9fb3d6;
}

.j-trail-fill {
  fill: none;
  stroke: var(--trail);
  stroke-width: 4.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(79, 127, 216, 0.55));
}

:root[data-theme="dark"] .j-trail-fill {
  stroke: #6b9bff;
}

/* --- Pins (screen-space, positioned by script.js) --- */
.j-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.jpin {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  transform-origin: 50% 100%;
  transition: opacity 0.4s;
}

.jpin-inner {
  display: block;
  position: relative;
  width: 62px;
  height: 80px;
  transform-origin: 50% 100%;
  transition: transform 0.4s var(--ease);
}

.jpin-head {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 4px solid var(--c);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 10px 22px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.jpin-head > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.jpin-head img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  background: #f4efe6;
}

.jpin-head svg {
  width: 26px;
  height: 26px;
}

.jpin-inner::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50px;
  border: 15px solid transparent;
  border-top: 26px solid var(--c);
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.18));
}

.jpin-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 18px;
  padding: 5px 11px;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s, transform 0.4s var(--ease);
}

.label-left .jpin-label {
  left: auto;
  right: calc(100% + 10px);
  transform: translateX(6px);
}

.journey.labels .jpin-label {
  opacity: 1;
  transform: none;
}

.journey.zoomed .jpin:not(.current) {
  opacity: 0.6;
}

.jpin.current .jpin-inner {
  transform: scale(1.14);
}

.journey:not(.zoomed) .jpin-inner {
  transform: scale(0.8);
}

.jpin:hover .jpin-inner {
  transform: scale(1.1) translateY(-4px);
}

/* --- Navigation arrow on the trail --- */
.j-marker {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  border: 1px solid rgba(79, 127, 216, 0.35);
  border-radius: 50%;
  background: rgba(79, 127, 216, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.journey.zoomed .j-marker {
  opacity: 1;
}

.j-marker span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transform: rotate(var(--hd, 0deg));
}

.j-marker span::after {
  content: "";
  width: 18px;
  height: 20px;
  background: var(--trail);
  clip-path: polygon(50% 0, 100% 100%, 50% 74%, 0 100%);
}

/* --- Title (overview only) --- */
.j-head {
  position: absolute;
  left: 50%;
  top: clamp(70px, 9vh, 100px);
  width: min(1000px, calc(100% - 32px));
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 0.5s, transform 0.6s var(--ease);
}

.j-head .kicker {
  margin-bottom: 12px;
}

.j-head h2 {
  font-size: clamp(36px, 4.6vw, 70px);
}

.j-head .sec-sub {
  margin-top: 14px;
}

.journey.zoomed .j-head {
  opacity: 0;
  transform: translate(-50%, -30px);
  pointer-events: none;
}

/* --- Story card --- */
.j-card {
  --c: #f0735a;
  position: absolute;
  left: clamp(20px, 3.5vw, 56px);
  top: 50%;
  width: min(480px, 36vw);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translate(-30px, -50%);
  pointer-events: none;
  transition: opacity 0.5s, transform 0.6s var(--ease);
}

.journey.zoomed .j-card {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

.j-card.swap .j-card-body,
.j-card.swap .j-card-head > * {
  animation: cardSwap 0.55s var(--ease);
}

@keyframes cardSwap {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.j-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  background: color-mix(in srgb, var(--c) 16%, var(--card));
  border-bottom: 1px solid var(--line);
}

.j-card-head b {
  display: block;
  font-size: 18px;
  color: var(--c);
  filter: brightness(0.92);
}

:root[data-theme="dark"] .j-card-head b {
  filter: brightness(1.15);
}

.j-card-head span:not(.j-logo):not(.j-count) {
  font-size: 15px;
  color: var(--muted);
}

.j-logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 14px;
  background: var(--c);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.j-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  background: #f4efe6;
}

.j-logo svg {
  width: 26px;
  height: 26px;
}

.j-count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c);
  opacity: 0.85;
}

.j-card-body {
  padding: 26px 28px 30px;
}

.j-card-body h3 {
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.05;
}

.j-card-body > p:not(.j-label) {
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--muted);
}

.j-card-body strong {
  color: var(--ink);
  box-shadow: inset 0 -0.38em color-mix(in srgb, var(--c) 30%, transparent);
}

.j-label {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.j-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.j-chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 600;
}

.j-polaroid {
  width: 132px;
  padding: 7px 7px 6px;
  border-radius: 3px;
  background: #fbf8f2;
  color: #2a2620;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: rotate(-2deg);
}

.j-polaroid:nth-child(2) {
  transform: rotate(2.5deg);
}

.j-polaroid img,
.j-polaroid .j-art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
}

.j-art {
  background: linear-gradient(150deg, var(--c1), var(--c2));
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.j-polaroid small {
  display: block;
  margin-top: 5px;
  font-family: var(--hand);
  font-size: 15px;
  text-align: center;
}

.j-card .pill-yellow {
  height: 44px;
  margin-top: 4px;
}

/* --- Compass, zoom controls, progress, replay --- */
.j-compass {
  position: absolute;
  top: 84px;
  right: 30px;
  width: 92px;
  height: 92px;
  border: 1px dashed var(--faint);
  border-radius: 50%;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  font-size: 10px;
  font-weight: 800;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.4s;
}

.journey.zoomed .j-compass {
  opacity: 1;
}

.j-compass span {
  position: absolute;
}

.j-compass .n { top: 6px; left: 50%; transform: translateX(-50%); }
.j-compass .s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.j-compass .e { right: 8px; top: 50%; transform: translateY(-50%); }
.j-compass .w { left: 8px; top: 50%; transform: translateY(-50%); }

.j-compass i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 52px;
  margin: -26px 0 0 -5px;
  background: linear-gradient(180deg, var(--coral) 50%, var(--ink) 50%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s;
}

.j-zoom {
  position: absolute;
  right: 30px;
  bottom: 160px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.journey.zoomed .j-zoom {
  opacity: 1;
  pointer-events: auto;
}

.j-zoom > button,
.j-zoom > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.j-zoom > div {
  display: flex;
  flex-direction: column;
}

.j-zoom button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.j-zoom > button {
  color: var(--trail);
}

.j-zoom > div button + button {
  border-top: 1px solid var(--line);
}

.j-progress,
.j-view {
  position: absolute;
  left: 50%;
  bottom: 104px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 9px 20px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.journey.zoomed .j-progress,
.journey.outro .j-view {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.j-progress b {
  font-size: 15.5px;
}

.j-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.j-dots button {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--faint);
  border-radius: 50%;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.j-dots button.done {
  border-color: var(--dc);
  background: var(--dc);
}

.j-dots button.current {
  border: 3px solid var(--dc);
  background: var(--card);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dc) 30%, transparent);
}

.j-view {
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 800px) {
  .j-head {
    top: 64px;
  }

  .j-card {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 128px;
    width: auto;
    border-radius: 22px;
    transform: translateY(30px);
  }

  .journey.zoomed .j-card {
    transform: none;
  }

  .j-card-head {
    gap: 12px;
    padding: 14px 18px;
  }

  .j-logo {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 13px;
  }

  .j-card-head b {
    font-size: 16px;
  }

  .j-card-head span:not(.j-logo):not(.j-count) {
    font-size: 13px;
  }

  .j-card-body {
    padding: 16px 18px 18px;
  }

  .j-card-body h3 {
    font-size: 24px;
  }

  .j-card-body > p:not(.j-label) {
    margin-top: 8px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .j-label,
  .j-extra:not(:has(.pill)) {
    display: none;
  }

  .j-compass {
    top: 62px;
    right: 12px;
    width: 64px;
    height: 64px;
    font-size: 8px;
  }

  .j-compass i {
    height: 36px;
    margin-top: -18px;
  }

  .j-zoom {
    display: none;
  }

  .j-progress,
  .j-view {
    bottom: 76px;
    padding: 7px 14px 7px 10px;
    gap: 10px;
  }

  .j-progress b {
    font-size: 13px;
  }

  .j-dots {
    gap: 6px;
  }

  .j-dots button {
    width: 11px;
    height: 11px;
  }

  .jpin-inner {
    transform: scale(0.8);
  }

  .jpin.current .jpin-inner {
    transform: scale(0.92);
  }

  .jpin-label {
    font-size: 12.5px;
  }

  .journey:not(.zoomed) .jpin-label {
    display: none;
  }
}

/* ==========================================================================
   CASE STUDY PAGE (full-screen dialog opened from the box)
   ========================================================================== */

:root {
  --coral-soft: rgba(240, 115, 90, 0.75);
}

/* Lenis smooth scrolling */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

[data-lenis-prevent] {
  overscroll-behavior: contain;
}

.case-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-y: auto;
  background: var(--bg);
  color: var(--ink);
}

.case-modal::backdrop {
  background: var(--bg);
}

.case-modal[open] {
  animation: pageIn 0.7s var(--ease);
}

/* opened from a card: the zoom already did the motion, so the page just fades in over it */
.case-modal.zoom-in {
  animation: pageFade 0.45s ease-out both;
}

.case-modal.zoom-in::backdrop {
  background: transparent;
}

.case-modal.closing {
  animation: pageOut 0.42s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

.case-modal.closing::backdrop {
  animation: pageFadeOut 0.42s ease-in forwards;
}

@keyframes pageFade {
  from { opacity: 0; }
}

@keyframes pageOut {
  to {
    opacity: 0;
    transform: scale(0.94);
    border-radius: 28px;
  }
}

@keyframes pageFadeOut {
  to { opacity: 0; }
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.985);
  }
}

#caseBody {
  min-height: 100%;
  background:
    radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--c1) 14%, transparent), transparent 70%),
    var(--bg);
}

.cp-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(16px, 3vw, 40px);
  pointer-events: none;
}

.cp-top > * {
  pointer-events: auto;
}

.cp-back {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s var(--ease);
}

.cp-back:hover {
  transform: translateX(-3px);
}

.cp-pill {
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.cp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 90px);
  min-height: calc(100svh - 90px);
  padding: 0 20px 90px;
  text-align: center;
}

.cp-hero > * {
  animation: rise 1s var(--ease) both;
}

.cp-hero > :nth-child(2) { animation-delay: 0.1s; }
.cp-hero > :nth-child(3) { animation-delay: 0.2s; }
.cp-hero > :nth-child(4) { animation-delay: 0.35s; }

.cp-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--c2) 40%, transparent);
}

.cp-hero h1 {
  margin-top: 26px;
  font-size: clamp(54px, 9vw, 150px);
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.cp-hero .hl {
  --c: color-mix(in srgb, var(--c1) 55%, transparent);
}

.cp-sub {
  max-width: 760px;
  margin-top: 28px;
  font-size: clamp(19px, 1.9vw, 26px);
  line-height: 1.45;
  color: var(--ink);
}

.cp-sub span {
  font-size: 0.78em;
  color: var(--muted);
}

.cp-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 70px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.cp-scroll svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: bob 2.2s ease-in-out infinite;
}

.cp-body {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px) 120px;
}

.cp-reveal {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.cp-reveal.in {
  opacity: 1;
  transform: none;
}

.cp-body .cs-cover {
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.cp-body .cs-cta {
  display: inline-flex;
  margin-top: 6px;
}

.cp-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 90px;
  padding: 38px 40px;
  border-radius: 28px;
  background:
    radial-gradient(90% 90% at 0% 0%, rgba(255, 255, 255, 0.25), transparent 60%),
    linear-gradient(140deg, var(--n1), var(--n2));
  color: #fff;
  text-align: left;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.cp-next:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.cp-next small {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}

.cp-next b {
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.cp-next span {
  font-size: 18px;
  opacity: 0.9;
}

/* Cover: real screens when available, otherwise a branded device mock */
.cs-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  color: #fff;
}

.cs-cover.has-img {
  aspect-ratio: 1600 / 1178;
  background: #efe9df;
}

.cs-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-word {
  position: absolute;
  left: 40px;
  top: 36px;
  z-index: 1;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.cv-phone,
.cv-browser {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.cv-phone {
  right: 16%;
  bottom: -18%;
  width: 22%;
  aspect-ratio: 9 / 17;
  padding: 7% 3% 3%;
  border-radius: 26px;
  transform: rotate(8deg);
}

.cv-browser {
  right: 4%;
  bottom: -10%;
  width: 54%;
  aspect-ratio: 16 / 10;
  padding: 0 0 10px;
  border-radius: 14px;
  transform: rotate(-4deg);
}

.cv-bar {
  display: flex;
  gap: 5px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.cv-bar i {
  width: 7px !important;
  height: 7px !important;
  margin: 0 !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7) !important;
}

.cv-phone b,
.cv-browser > b {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  color: var(--c2);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.cv-browser > b {
  margin: 14px 16px 4px;
}

.cv-phone i,
.cv-browser > i {
  display: block;
  height: 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.55);
}

.cv-phone i:nth-of-type(2) { width: 70%; }
.cv-phone i:nth-of-type(3) { flex: 1; height: auto; background: rgba(255, 255, 255, 0.3); border-radius: 10px; }

.cv-browser > i {
  width: 52%;
  margin: 4px 16px 0;
}

.cv-browser > i:last-child {
  width: 34%;
}

/* Case study content */
.cs-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 50px 0 10px;
  padding: 20px 0;
  border-block: 1px solid var(--line);
}

.cs-meta dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.cs-meta dd {
  margin-top: 4px;
  font-weight: 600;
}

.cs-content section {
  margin-top: 46px;
}

.cs-content h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
}

.cs-concept {
  padding: 2px 9px;
  border: 1px solid currentColor;
  border-radius: 12px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.cs-content section p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.cs-content ul {
  display: grid;
  gap: 10px;
}

.cs-content li {
  position: relative;
  padding-left: 24px;
  font-size: 17px;
  color: var(--muted);
}

.cs-content li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c1, var(--yellow));
}

.cs-challenge {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.cs-challenge > div {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.cs-challenge > div:last-child h4 {
  color: #3fbf7f;
}

.cs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-chips span {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 14.5px;
  font-weight: 600;
}

.cs-highlight {
  margin: 60px 0 30px;
  padding: 26px 30px;
  border-left: 4px solid var(--yellow);
  border-radius: 4px 20px 20px 4px;
  background: color-mix(in srgb, var(--yellow) 10%, transparent);
  font-family: var(--hand);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

/* Case links inside the work-category modal (hero pins) */
.pm-cases {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}

.pm-cases:empty {
  display: none;
}

.pm-cases button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.pm-cases button:hover {
  border-color: var(--coral);
  background: color-mix(in srgb, var(--coral) 8%, transparent);
}

.pm-cases b {
  font-size: 16px;
}

.pm-cases span {
  grid-column: 1;
  font-size: 13.5px;
  color: var(--muted);
}

.pm-cases i {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-style: normal;
  color: var(--coral);
}

@media (max-width: 640px) {
  .cp-back {
    width: 46px;
    height: 46px;
  }

  .cp-pill {
    padding: 10px 16px;
    font-size: 13.5px;
  }

  .cs-cover {
    aspect-ratio: 4 / 3;
  }

  .cv-word {
    left: 22px;
    top: 22px;
  }

  .cv-phone {
    width: 34%;
  }

  .cv-browser {
    width: 72%;
  }

  .cs-meta,
  .cs-challenge {
    grid-template-columns: 1fr;
  }

  .cs-content section p,
  .cs-content li {
    font-size: 16px;
  }

  .cp-next {
    padding: 28px 24px;
  }
}

/* ==========================================================================
   STORY CASE STUDY PAGES (mobile apps, content in case-stories.js)
   ========================================================================== */

/* panels and lists set their own display, so hidden must win explicitly */
#caseBody [hidden] {
  display: none !important;
}

#caseBody.is-story {
  --g1: #7b5cff;
  --g2: #c650ff;
  background:
    radial-gradient(70% 45% at 15% 0%, color-mix(in srgb, var(--g1) 26%, transparent), transparent 70%),
    radial-gradient(60% 40% at 90% 8%, color-mix(in srgb, var(--g2) 18%, transparent), transparent 70%),
    var(--bg);
  overflow-x: clip;
}

.cp-progress {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 3px;
  margin-bottom: -3px;
}

.cp-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  transform: scaleX(0);
  transform-origin: left;
}

.is-story .cp-top {
  margin-bottom: -90px;
}

.is-story .cp-pill {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Gradient second line used in every headline */
.sg {
  background: linear-gradient(100deg, var(--g1), var(--g2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.04em;
}

/* --- Hero --- */
.st-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 130px 20px 0;
  text-align: center;
}

.st-hero > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

/* opened from a card: the hero zooms forward out of the card */
.zoom-in .st-hero > * {
  transform: translateY(24px) scale(0.9);
  transition-duration: 0.8s;
}

.st-hero.in > * {
  opacity: 1;
  transform: none;
}

.st-hero.in > :nth-child(2) { transition-delay: 0.08s; }
.st-hero.in > :nth-child(3) { transition-delay: 0.16s; }
.st-hero.in > :nth-child(4) { transition-delay: 0.26s; }
.st-hero.in > :nth-child(5) { transition-delay: 0.34s; }
.st-hero.in > :nth-child(6) { transition-delay: 0.42s; }

.st-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border-radius: 30px;
  background: #fff;
  color: #1b1b1b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.st-brand img,
.st-brand i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
}

.st-brand i {
  background: linear-gradient(140deg, var(--g1), var(--g2));
  color: #fff;
  font-style: normal;
  font-weight: 800;
}

.st-brand b {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.st-tag {
  margin-top: 26px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.st-hero h1 {
  margin-top: 16px;
  font-size: clamp(52px, 8.6vw, 140px);
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.st-sub {
  max-width: 720px;
  margin-top: 28px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.6;
  color: var(--muted);
}

.st-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.st-chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  font-size: 14px;
  font-weight: 600;
}

.st-chips small {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g1);
  filter: brightness(1.25);
}

.st-hero-phones {
  --par: 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 2vw, 26px);
  width: min(900px, 100%);
  margin-top: 70px;
  padding-bottom: 40px;
}

.st-hero-phones::before {
  content: "";
  position: absolute;
  inset: 10% 5% 0;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--g1) 45%, transparent), transparent 65%);
  filter: blur(40px);
}

.st-hero-phones .st-phone {
  position: relative;
  width: 30%;
  cursor: zoom-in;
  transform: translateY(calc(var(--par) * var(--k, 0) * 1px)) rotate(var(--r, 0deg));
  transition: transform 0.2s linear;
}

.st-hero-phones .st-phone:nth-child(1) { --r: -6deg; --k: -0.05; margin-bottom: 30px; }
.st-hero-phones .st-phone:nth-child(2) { --k: -0.14; z-index: 1; width: 34%; }
.st-hero-phones .st-phone:nth-child(3) { --r: 6deg; --k: -0.05; margin-bottom: 30px; }

/* --- Phone frame used everywhere --- */
.st-phone {
  display: block;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  border: 6px solid #111;
  border-radius: 34px;
  background: #111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 60px rgba(0, 0, 0, 0.35);
}

.st-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 28px;
}

/* --- Chapters --- */
.st-chapter {
  max-width: 1200px;
  margin: 0 auto;
  padding: 150px clamp(20px, 5vw, 48px) 0;
}

.st-head {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.st-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.st-kicker i {
  padding: 3px 9px;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--g1), var(--g2));
  color: #fff;
  font-style: normal;
  letter-spacing: 0.05em;
}

.st-head h2 {
  margin-top: 24px;
  font-size: clamp(42px, 5.8vw, 86px);
  letter-spacing: -0.06em;
  line-height: 0.98;
  text-shadow: none;
}

.st-head p {
  max-width: 640px;
  margin: 22px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.st-body {
  margin-top: 60px;
}

/* Staggered children once a block reveals */
.st-body [style*="--i"] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i) * 80ms + 150ms);
}

.st-body.in [style*="--i"],
.st-panel.swap [style*="--i"] {
  opacity: 1;
  transform: none;
}

/* notes */
.st-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.st-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 210px;
  min-height: 190px;
  padding: 22px 18px;
  border-radius: 4px 4px 16px 4px;
  color: #2a2620;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.st-body.in .st-note {
  transform: rotate(var(--rot));
}

.st-note:nth-child(5n + 1) { background: #ffe58a; --rot: -3deg; }
.st-note:nth-child(5n + 2) { background: #ffc3b0; --rot: 2deg; }
.st-note:nth-child(5n + 3) { background: #bfe0ff; --rot: -1.5deg; }
.st-note:nth-child(5n + 4) { background: #c7f0d2; --rot: 2.5deg; }
.st-note:nth-child(5n + 5) { background: #e1d4ff; --rot: -2deg; }

.st-note:hover {
  transform: rotate(0deg) translateY(-6px) !important;
  transition-delay: 0s !important;
}

.st-note small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.55;
}

.st-note b {
  font-family: var(--hand);
  font-size: 27px;
  line-height: 1;
}

.st-note span {
  margin-top: auto;
  font-size: 14.5px;
  line-height: 1.4;
}

/* cards */
.st-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.st-card {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  transition: border-color 0.3s, translate 0.3s var(--ease);
}

.st-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(color-mix(in srgb, var(--g1) 30%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.st-card:hover {
  border-color: color-mix(in srgb, var(--g1) 50%, transparent);
  translate: 0 -4px;
}

.st-card:hover::after {
  opacity: 1;
}

.st-ic {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.st-ic .ico {
  width: 24px;
  height: 24px;
}

.st-card b {
  display: block;
  margin-top: 20px;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.st-card p {
  margin-top: 8px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* tiles */
.st-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.st-tile {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}

.st-tile strong {
  font-size: clamp(40px, 4.4vw, 62px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  background: linear-gradient(100deg, var(--g1), var(--g2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.st-tile b {
  margin-top: 14px;
  font-size: 17px;
}

.st-tile span {
  margin-top: 4px;
  font-size: 14.5px;
  color: var(--muted);
}

/* callout */
.st-callout {
  position: relative;
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 70px) clamp(24px, 6vw, 70px);
  border-radius: 32px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  text-align: center;
  box-shadow: 0 40px 80px color-mix(in srgb, var(--g1) 35%, transparent);
}

.st-orb {
  position: absolute;
  left: 32px;
  top: 32px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, rgba(255, 255, 255, 0.2));
  animation: bob 3s ease-in-out infinite;
}

.st-callout small {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}

.st-callout p {
  margin-top: 16px;
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.st-callout > span:last-child {
  display: block;
  max-width: 560px;
  margin: 18px auto 0;
  font-size: 17px;
  opacity: 0.9;
}

/* tabs */
.st-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
}

.st-tabs button {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.st-tabs button:hover {
  color: var(--ink);
}

.st-tabs button[aria-selected="true"] {
  border-color: transparent;
  background: linear-gradient(100deg, var(--g1), var(--g2));
  color: #fff;
}

.st-tabs-sm button {
  padding: 8px 14px;
  font-size: 14px;
}

/* steps */
.st-steps-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
}

.st-steps {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
  counter-reset: none;
}

.st-steps li {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: start;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.st-steps li > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 800;
}

.st-steps b {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.st-steps p {
  margin-top: 4px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}

.st-phone-lg {
  width: 100%;
  max-width: 300px;
  cursor: zoom-in;
}

/* compare: list on the left, sticky phone on the right */
.st-compare {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 70px;
  max-width: 1080px;
  margin: 0 auto;
}

.st-cmp {
  min-height: 70vh;
  padding: 10vh 0;
  opacity: 0.3;
  transition: opacity 0.5s;
}

.st-cmp.on {
  opacity: 1;
}

.st-cmp-no {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--g1);
  filter: brightness(1.25);
}

.st-cmp h4 {
  margin-top: 8px;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.st-cmp-inline {
  display: none;
}

.st-cmp-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}

.st-cmp-cols > div {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.st-cmp-cols small {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.st-cmp-cols .was small { color: #ff6b5b; }
.st-cmp-cols .now small { color: #33c27f; }

.st-cmp-cols ul {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.st-cmp-cols li {
  position: relative;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--muted);
}

.st-cmp-cols li::before {
  position: absolute;
  left: 0;
  font-weight: 800;
}

.st-cmp-cols .was li::before { content: "×"; color: #ff6b5b; }
.st-cmp-cols .now li::before { content: "✓"; color: #33c27f; }

.st-cmp-cols .now li {
  color: var(--ink);
}

.st-compare-stage {
  position: relative;
}

.st-cmp-phone {
  position: sticky;
  top: calc(50vh - 340px);
  display: grid;
  margin: 10vh auto 0;
}

.st-cmp-phone img {
  grid-area: 1 / 1;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.5s, transform 0.6s var(--ease);
}

.st-cmp-phone img.on {
  opacity: 1;
  transform: none;
}

/* flows */
.st-panel.swap {
  animation: panelIn 0.5s var(--ease);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.st-flow-desc {
  margin: -10px 0 30px;
  text-align: center;
  font-size: 16px;
  color: var(--muted);
}

.st-flow {
  display: flex;
  justify-content: center;
  gap: 22px;
  overflow-x: auto;
  padding: 10px 4px 30px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.st-shot {
  flex: 0 0 210px;
  scroll-snap-align: center;
  cursor: zoom-in;
}

.st-shot .st-phone {
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.st-shot:hover .st-phone {
  transform: translateY(-8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 70px color-mix(in srgb, var(--g1) 30%, rgba(0, 0, 0, 0.35));
}

.st-shot figcaption {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 700;
}

.st-shot figcaption small {
  color: var(--g1);
  filter: brightness(1.25);
}

/* countries */
.st-country {
  display: grid;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.st-docs ul {
  display: grid;
  gap: 10px;
}

.st-docs ul:not([hidden]) li {
  animation: panelIn 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
  opacity: 1 !important;
  transform: none !important;
}

.st-docs li,
.st-check li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  font-size: 16.5px;
  font-weight: 600;
}

.st-docs li > span,
.st-check li > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  color: #fff;
}

.st-docs .ico,
.st-check .ico {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.st-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

.st-status span {
  padding: 8px 14px;
  border-radius: 20px;
}

.st-status .s0 { background: rgba(245, 196, 64, 0.18); color: #e0a91c; }
.st-status .s1 { background: rgba(51, 194, 127, 0.16); color: #2fb072; }
.st-status .s2 { background: rgba(255, 107, 91, 0.16); color: #f2604f; }

.st-status i {
  font-style: normal;
  color: var(--faint);
}

/* checklist */
.st-check {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.st-check li > span {
  transform: scale(0);
  transition: transform 0.45s var(--ease);
  transition-delay: calc(var(--i) * 120ms + 400ms);
}

.st-body.in .st-check li > span {
  transform: scale(1);
}

/* deliverables */
.st-deliv {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.st-deliv span {
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  font-size: 17px;
  font-weight: 700;
}

/* --- Wrap & more stories --- */
.st-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 170px 20px 0;
  text-align: center;
}

.st-wrap > small {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.st-wrap h2 {
  margin-top: 14px;
  font-size: clamp(44px, 6vw, 84px);
  letter-spacing: -0.06em;
  text-shadow: none;
}

.st-scribble {
  display: inline-block;
  padding: 0 0.18em;
  border-radius: 0.3em;
  background: linear-gradient(100deg, var(--g1), var(--g2));
  color: #fff;
  font-family: var(--hand);
  font-weight: 700;
  letter-spacing: -0.02em;
  transform: rotate(-2deg);
}

.st-line {
  margin-top: 26px;
  font-family: var(--hand);
  font-size: clamp(24px, 2.6vw, 32px);
}

.st-wrap > p:not(.st-line) {
  margin-top: 8px;
  color: var(--muted);
}

.st-wrap-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.st-wrap-links a,
.st-wrap-links button {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  font-size: 14.5px;
  font-weight: 700;
  transition: border-color 0.25s, transform 0.25s;
}

.st-wrap-links a:hover,
.st-wrap-links button:hover {
  border-color: var(--g1);
  transform: translateY(-2px);
}

.st-more {
  max-width: 1080px;
  margin: 0 auto;
  padding: 130px 20px 140px;
  text-align: center;
}

.st-more > p {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.st-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.st-more-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 260px;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(255, 255, 255, 0.28), transparent 60%),
    linear-gradient(150deg, var(--n1), var(--n2));
  color: #fff;
  text-align: left;
  box-shadow: 0 24px 50px color-mix(in srgb, var(--n2) 35%, transparent);
  transition: transform 0.4s var(--ease);
}

.st-more-card:hover {
  transform: translateY(-8px) rotate(-1deg);
}

.st-more-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.st-more-top i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  color: var(--n2);
  font-style: normal;
  font-weight: 800;
}

.st-more-top em {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.st-more-card b {
  margin-top: auto;
  font-size: 26px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.st-more-name {
  margin-top: 10px;
  font-weight: 700;
}

.st-more-card small {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.85;
}

/* --- Lightbox --- */
.st-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 30px;
  background: rgba(8, 8, 10, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s;
}

.st-lightbox.open {
  opacity: 1;
}

.st-lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100%;
}

.st-lightbox img {
  max-width: min(420px, 80vw);
  max-height: calc(100vh - 120px);
  border-radius: 24px;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.94);
  transition: transform 0.4s var(--ease);
}

.st-lightbox.open img {
  transform: none;
}

.st-lightbox figcaption {
  margin-top: 14px;
  color: #fff;
  font-weight: 700;
}

.st-lb-nav,
.st-lb-close {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  transition: background 0.2s;
}

.st-lb-nav:hover,
.st-lb-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.st-lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
}

.st-lightbox.single .st-lb-nav {
  visibility: hidden;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .st-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .st-compare {
    grid-template-columns: 1fr;
  }

  .st-compare-stage {
    display: none;
  }

  .st-cmp {
    min-height: 0;
    padding: 30px 0;
    opacity: 1;
  }

  .st-cmp-inline {
    display: block;
    width: 62%;
    max-width: 260px;
    margin: 20px auto 0;
    cursor: zoom-in;
  }

  .st-steps-wrap {
    grid-template-columns: 1fr;
  }

  .st-steps-wrap .st-phone-lg {
    margin: 0 auto;
    max-width: 260px;
  }

  .st-more-grid {
    grid-template-columns: 1fr;
  }

  .st-flow {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .st-hero {
    padding-top: 100px;
  }

  .st-chapter {
    padding-top: 110px;
  }

  .st-body {
    margin-top: 40px;
  }

  .st-note {
    width: calc(50% - 9px);
    min-height: 170px;
    padding: 18px 14px;
  }

  .st-note b {
    font-size: 23px;
  }

  .st-tiles {
    gap: 10px;
  }

  .st-tile {
    padding: 20px 16px;
  }

  .st-cmp-cols {
    grid-template-columns: 1fr;
  }

  .st-shot {
    flex-basis: 62vw;
  }

  .st-hero-phones .st-phone {
    border-width: 4px;
    border-radius: 22px;
  }

  .st-hero-phones .st-phone img {
    border-radius: 18px;
  }

  .st-lightbox {
    grid-template-columns: 1fr;
    padding: 70px 16px 20px;
  }

  .st-lb-nav {
    display: none;
  }
}

/* ==========================================================================
   PROJECT MODAL & TOAST
   ========================================================================== */

.project-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.project-modal::backdrop {
  background: rgba(10, 10, 10, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.project-modal[open] {
  animation: modalIn 0.45s var(--ease);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
}

/* Image (portfolio board, 4:5) beside the text on desktop, stacked on phones */
.project-modal[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.pm-art {
  background: linear-gradient(140deg, var(--c1), var(--c2));
}

.pm-art img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 40px);
  object-fit: cover;
  object-position: top;
}

.pm-body {
  align-self: center;
  padding: 36px 36px 36px;
}

@media (max-width: 800px) {
  .project-modal[open] {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .pm-art img {
    height: 46vh;
  }

  .pm-body {
    padding: 22px 22px 26px;
  }
}

/* Services list in the contact heading */
.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 820px;
  margin: 28px auto 0;
}

.services li {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 15px;
  font-weight: 600;
}

:root[data-theme="light"] .services li {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.6);
}

.pin-logo .ico {
  width: 15px;
  height: 15px;
}

.pm-body .kicker {
  margin-bottom: 8px;
}

.pm-body h3 {
  font-size: 32px;
}

.pm-body > p:not(.kicker) {
  margin-top: 14px;
  color: var(--muted);
}

.pm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.pm-tags li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.pm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 13px 20px;
  border-radius: 30px;
  background: var(--yellow);
  color: #1b1b1b;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
  .story {
    grid-template-columns: 1fr;
    padding-left: var(--gutter);
  }

  .desk {
    min-height: 600px;
    max-width: 640px;
  }
}

@media (max-width: 800px) {
  body {
    font-size: 16px;
  }

  .top-pills {
    top: 10px;
    right: 10px;
    gap: 8px;
  }

  .pill {
    height: 40px;
    padding: 0 14px;
    font-size: 13.5px;
  }

  .dock {
    bottom: 10px;
    gap: 0;
    padding: 5px;
    max-width: calc(100vw - 16px);
  }

  .dock-link {
    height: 42px;
    padding: 0 11px;
    font-size: 14px;
  }

  .dock-link.active .ico,
  .dock-link.active .dock-avatar {
    display: none;
  }

  .dock-cta {
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
  }

  .sound-btn {
    left: 12px;
    top: 12px;
    bottom: auto;
    width: 40px;
    height: 40px;
  }

  .valley-shade {
    background: linear-gradient(180deg, rgba(10, 10, 14, 0.75) 0%, rgba(10, 10, 14, 0.25) 55%, rgba(10, 10, 14, 0.7) 100%);
  }

  .valley-copy {
    top: 80px;
    right: var(--gutter);
  }

  /* Phones: text on the dark area at the top, photo in the lower part of the screen */
  .valley-bg {
    top: auto;
    bottom: 0;
    height: 64%;
    object-position: 84% top;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%);
    mask-image: linear-gradient(180deg, transparent 0, #000 22%);
  }

  .valley {
    background: radial-gradient(ellipse at 80% 60%, #4a0f1c, #130c12 70%);
  }

  .pin {
    font-size: 13px;
  }

  .pin:nth-of-type(1) { --x: 5% !important; --y: 54% !important; }
  .pin:nth-of-type(2) { --x: 5% !important; --y: 63% !important; }
  .pin:nth-of-type(3) { display: none; }
  .pin:nth-of-type(4) { --x: 5% !important; --y: 72% !important; }

  .hint,
  .br {
    display: none;
  }

  .scroll-pill {
    bottom: 80px;
    font-size: 15px;
  }

  .story {
    padding-top: 90px;
    padding-bottom: 110px;
  }

  .tell {
    line-height: 1.28;
  }

  /* Highlights may wrap on small screens: paint the marker per line instead */
  .hl {
    white-space: normal;
    padding: 0 0.08em;
    border-radius: 0.3em;
    background: linear-gradient(var(--c, var(--sun)), var(--c, var(--sun))) 0 75% / 100% 82% no-repeat;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size 0.9s var(--ease);
  }

  .js .hl:not(.on) {
    background-size: 0% 82%;
  }

  .hl::before,
  .circle-draw {
    display: none;
  }

  .desk {
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 18px;
    padding-top: 10px;
  }

  .desk {
    align-items: flex-start;
    gap: 26px 14px;
  }

  .desk .note {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: calc(50% - 7px);
    max-width: 210px;
    padding: 22px 14px 14px;
    font-size: 19px;
  }

  .note small {
    font-size: 9.5px;
  }

  .move-hint {
    position: static;
    width: 100%;
    text-align: center;
  }

  .tools {
    position: relative;
    inset: auto;
    grid-template-columns: 1fr 1fr;
    margin-top: -330px;
  }

  .gift-stage.open .tools {
    margin-top: -360px;
  }

  .tools li {
    grid-template-columns: 1fr;
    justify-items: start;
    row-gap: 8px;
  }

  .tools small {
    grid-column: 1;
  }

  .tool-ico {
    grid-row: auto;
  }

  .process .sec-head {
    padding-left: 0;
  }

  .forge {
    height: 480vh;
    margin: 20px calc(var(--gutter) * -1) 0;
  }

  .forge-stick {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    padding: 78px 16px 104px;
  }

  .forge-rail {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .forge-rail li {
    flex: none;
    padding: 0;
  }

  .forge-rail li::before,
  .fr-bar,
  .fr-n,
  .fr-t small {
    display: none;
  }

  .forge-rail button {
    padding: 7px 13px;
    border: 1.5px solid var(--line);
    border-radius: 20px;
    opacity: 0.6;
  }

  .forge-rail li.on button {
    border-color: transparent;
    background: var(--c);
    color: #1d1c1a;
  }

  .fr-t b {
    font-size: 14px;
    line-height: 1.2;
  }

  .forge-cap {
    display: block;
    grid-row: 2;
    font-size: 15px;
    color: var(--muted);
  }

  .forge-count {
    right: 28px;
    bottom: 116px;
    font-size: 17px;
  }

  .forge-count b {
    font-size: 26px;
  }

  .forge-stage {
    grid-row: 3;
    border-radius: 24px;
  }

  .hello {
    padding-top: 110px;
  }

  .keys-panel {
    padding: 24px 16px 30px;
    border-radius: 26px;
  }

  .keys {
    grid-template-columns: 1fr 1fr;
    gap: 30px 12px;
  }

  .key-col {
    grid-template-rows: auto auto;
  }

  .key-col .key {
    grid-row: 1;
  }

  .knote.up,
  .knote.dn {
    grid-row: 2;
  }

  .key {
    width: 86px;
    height: 86px;
  }

  .key svg {
    width: 40px;
    height: 40px;
  }

  .knote .arr {
    display: none;
  }

  .note-wall {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 90px;
  }

  .note-form {
    transform: none;
  }

  .footer {
    flex-direction: column;
    padding-bottom: 90px;
  }
}

@media (max-width: 420px) {
  .pill-status {
    display: none;
  }

  .dock-link {
    padding: 0 9px;
    font-size: 13.5px;
  }

  .dock-cta {
    padding: 0 12px;
    font-size: 13.5px;
  }

  .dock-link[data-section="story"] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
