/* =========================================================================
   Picatzso — rounded minimal
   Palette : white / ink / graphite / mist / line / wash   (no colour)
   Type    : Quicksand 400–700 throughout

   MOTION RULES
   - Curves live only in the token block below. No `ease-in` anywhere.
   - Interface motion stays under 300ms. One-shot explanatory demos may
     run longer, because they are explaining rather than responding.
   - Only `transform` and `opacity` animate. Two documented exceptions:
     the sliding indicators animate `width`, and the accordion animates
     `height` via WAAPI — both are small, isolated, layout-free elements.
   - Nothing scales from 0. Entrances start around scale(0.92–0.96).
   - Hover motion sits behind (hover: hover) and (pointer: fine).

   VISIBILITY RULE — the hard-won one
   - Every "hidden until animated" state is written as
     `html[data-js] X:not([data-state])`, so the rule stops matching the
     moment the state lands. Never a competing pair of rules: the scoped
     one wins on specificity and content stays invisible forever.
   ========================================================================= */

:root {
  --white:    #ffffff;
  --wash:     #f7f7f7;
  --line:     #e9e9e9;
  --line-2:   #d6d6d6;
  --mist:     #8d8d93;
  --graphite: #57575c;
  --ink:      #0a0a0b;

  --font: Quicksand, ui-rounded, "SF Pro Rounded", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --dur-press:  140ms;
  --dur-hover:  180ms;
  --dur-pop:    200ms;
  --dur-menu:   320ms;
  --dur-reveal: 460ms;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 9px;

  --gutter: clamp(20px, 5vw, 56px);
  --measure: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Type ---------------------------------------------------- */

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.14; letter-spacing: -0.02em; text-wrap: balance; }
.display { font-size: clamp(2.4rem, 6.2vw, 4.3rem); letter-spacing: -0.035em; line-height: 1.05; }
.h2      { font-size: clamp(1.75rem, 3.4vw, 2.6rem); letter-spacing: -0.025em; }
.h3      { font-size: clamp(1.1rem, 1.7vw, 1.35rem); letter-spacing: -0.015em; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--graphite); max-width: 58ch; text-wrap: pretty; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--mist); margin: 0;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex: none; }
.eyebrow::after {
  content: ""; height: 1px; width: clamp(28px, 6vw, 72px); background: var(--line-2);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 620ms var(--ease-out) 120ms;
}

:lang(zh) .display, :lang(zh) .h2 { letter-spacing: 0; line-height: 1.22; }
:lang(zh) .eyebrow { letter-spacing: 0.1em; }

/* ---------- Layout -------------------------------------------------- */

.wrap { width: 100%; max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(60px, 9vw, 116px); }
.section--tight { padding-block: clamp(44px, 6vw, 76px); }
.section--wash { background: var(--wash); }
.section--rule { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(34px, 4.5vw, 56px); max-width: 62ch; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 120; background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 0 0 var(--r-md) 0; }
.skip-link:focus { left: 0; top: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* ---------- Scroll progress ----------------------------------------- */

.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 110; pointer-events: none; }
.progress span {
  display: block; height: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left center; will-change: transform;
}

/* ---------- Header -------------------------------------------------- */

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-hover) ease;
}
.masthead[data-scrolled] { border-bottom-color: var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 74px; }

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 42px; width: auto; transition: transform var(--dur-pop) var(--ease-out); }

.nav { position: relative; display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative; text-decoration: none; font-size: 0.9rem; font-weight: 600; color: var(--graphite);
  padding: 9px 13px; border-radius: 999px;
  transition: color var(--dur-hover) ease;
}
.nav a[aria-current] { color: var(--ink); }
.nav-line {
  position: absolute; bottom: 2px; left: 0; height: 2px; width: 0; border-radius: 2px;
  background: var(--ink); opacity: 0; pointer-events: none; will-change: transform;
}
.nav[data-ready] .nav-line {
  transition: transform 280ms var(--ease-out), width 280ms var(--ease-out), opacity var(--dur-pop) var(--ease-out);
}

.masthead-actions { display: flex; align-items: center; gap: 10px; }

/* Sliding indicators. `width` is the documented exception to the
   transform/opacity rule: 2–26px tall, absolutely positioned, no layout
   dependents, so the paint cost is negligible. */
.lang { position: relative; display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang-highlight { position: absolute; top: 3px; left: 0; height: 26px; border-radius: 999px; background: var(--ink); will-change: transform; }
.lang[data-ready] .lang-highlight { transition: transform 250ms var(--ease-out), width 250ms var(--ease-out); }
.lang a {
  position: relative; z-index: 1; display: flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: 999px; text-decoration: none; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite);
  transition: color var(--dur-hover) ease;
}
.lang a[aria-current="true"] { color: var(--white); }

/* ---------- Buttons ------------------------------------------------- */

.btn {
  --fg: var(--white); --bd: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border: 1.5px solid var(--bd); border-radius: 999px;
  background: var(--ink); color: var(--fg);
  font: inherit; font-size: 0.94rem; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out),
              color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
/* The hover sweep: a wipe from the left, not a colour fade. */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #2b2b30;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 280ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; --fg: var(--ink); --bd: var(--line-2); }
.btn--ghost::before { background: var(--ink); }
.btn--sm { padding: 9px 17px; font-size: 0.85rem; }
.arw { transition: transform var(--dur-pop) var(--ease-out); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.tlink { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 700; font-size: 0.92rem; position: relative; padding-bottom: 2px; }
.tlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform var(--dur-pop) var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
  .lang a:hover { color: var(--ink); }
  .lang a[aria-current="true"]:hover { color: var(--white); }
  .btn:hover::before { transform: scaleX(1); }
  .btn--ghost:hover { --fg: var(--white); --bd: var(--ink); }
  .btn:hover .arw { transform: translateX(3px); }
  .tlink:hover::after { transform: scaleX(1); }
  .tlink:hover .arw { transform: translateX(3px); }
  .brand:hover img { transform: scale(1.04) rotate(-1.5deg); }
}

/* ---------- Hero ---------------------------------------------------- */

.hero { padding-block: clamp(44px, 7vw, 96px) clamp(52px, 8vw, 100px); }
.hero-grid { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; } }

.hero .display { margin: 22px 0; }
.hero .btn-row { margin-top: 32px; }

.hero-art { display: grid; place-items: center; will-change: transform; }
.hero-float { display: block; width: min(100%, 460px); }
.hero-art img { width: 100%; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.tag {
  font-size: 0.78rem; font-weight: 600; color: var(--graphite);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  transition: transform var(--dur-hover) var(--ease-out), border-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .tag:hover { transform: translateY(-2px); border-color: var(--ink); color: var(--ink); }
}

/* ---------- Service cards ------------------------------------------- */

.cards { display: grid; gap: clamp(16px, 2vw, 22px); }
@media (min-width: 880px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(20px, 2.4vw, 28px);
  display: flex; flex-direction: column; gap: 20px;
  transition: border-color var(--dur-hover) ease, transform var(--dur-hover) var(--ease-out),
              box-shadow var(--dur-hover) ease;
}
.card-num { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; color: var(--mist); }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-desc { color: var(--graphite); font-size: 0.95rem; margin: 0; }
.card-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.card-list li { position: relative; padding-left: 18px; font-size: 0.9rem; color: var(--graphite); }
.card-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

.stage {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--wash); border-radius: var(--r-lg);
  transition: transform 260ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 14px 36px rgba(10,10,11,0.07); }
  .card:hover .stage { transform: scale(1.02); }
}

/* --- Demo 1 · e-invitation: flap opens, card rises ------------------ */
.ev { position: absolute; inset: 0; display: grid; place-items: center; perspective: 640px; }
.ev-body { position: relative; width: 52%; aspect-ratio: 3 / 2; }
.ev-pocket { position: absolute; inset: 0; background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-sm); }
.ev-card {
  position: absolute; left: 12%; right: 12%; bottom: 8%; height: 86%;
  background: var(--ink); border-radius: var(--r-sm); transform: translateY(6%);
  display: grid; align-content: center; justify-items: center; gap: 5px; padding: 0 14%;
}
.ev-card i { display: block; height: 2.5px; border-radius: 2px; background: var(--white); }
.ev-card i:nth-child(1) { width: 46px; }
.ev-card i:nth-child(2) { width: 64px; height: 3.5px; }
.ev-card i:nth-child(3) { width: 32px; }
.ev-front { position: absolute; inset: 0; background: var(--wash); border: 1.5px solid var(--ink); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); }
.ev-flap {
  position: absolute; left: -1.5px; right: -1.5px; top: -1.5px; height: 64%;
  background: var(--white); border: 1.5px solid var(--ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top center;
}
[data-play] .ev-flap { animation: ev-open 820ms var(--ease-out) forwards; }
[data-play] .ev-card { animation: ev-rise 820ms 160ms var(--ease-out) forwards; }
@keyframes ev-open { to { transform: rotateX(-170deg); } }
@keyframes ev-rise { to { transform: translateY(-36%); } }

/* --- Demo 2 · web design & hosting ---------------------------------- */
.wb { position: absolute; inset: 14% 16% 22%; background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-sm); overflow: hidden; }
.wb-bar { height: 15px; border-bottom: 1.5px solid var(--ink); display: flex; align-items: center; gap: 4px; padding-inline: 7px; }
.wb-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); opacity: 0.35; }
.wb-canvas { position: absolute; inset: 15px 0 0; padding: 8px; display: grid; gap: 5px; grid-template-columns: 1fr 1fr; grid-auto-rows: min-content; }
.wb-b { background: var(--wash); border-radius: 3px; }
.wb-b--hero { grid-column: 1 / -1; height: 20px; background: var(--ink); }
.wb-b--col { height: 26px; }
.wb-b--foot { grid-column: 1 / -1; height: 7px; }
[data-play] .wb-b { animation: pop-up 420ms var(--ease-out) backwards; }
[data-play] .wb-b:nth-child(1) { animation-delay: 40ms; }
[data-play] .wb-b:nth-child(2) { animation-delay: 110ms; }
[data-play] .wb-b:nth-child(3) { animation-delay: 170ms; }
[data-play] .wb-b:nth-child(4) { animation-delay: 230ms; }
@keyframes pop-up { from { opacity: 0; transform: translateY(8px); } }

.wb-host { position: absolute; left: 16%; right: 16%; bottom: 9%; display: flex; align-items: center; gap: 6px; }
.wb-host b { height: 8px; flex: 1; border-radius: 999px; background: var(--line-2); transform-origin: left center; }
.wb-host span { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex: none; }
[data-play] .wb-host b { animation: grow-x 620ms 340ms var(--ease-in-out) backwards; }
[data-play] .wb-host span { animation: fade-in 260ms 900ms var(--ease-out) backwards; }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes fade-in { from { opacity: 0; } }

/* --- Demo 3 · apps -------------------------------------------------- */
.ph { position: absolute; inset: 8% 0; display: grid; place-items: center; }
.ph-body { position: relative; height: 100%; aspect-ratio: 1 / 2; background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; overflow: hidden; }
.ph-notch { position: absolute; left: 50%; top: 5px; width: 26px; height: 4px; margin-left: -13px; border-radius: 999px; background: var(--ink); opacity: 0.25; z-index: 2; }
.ph-screen { position: absolute; inset: 14px 8px 22px; display: grid; gap: 5px; grid-auto-rows: min-content; }
.ph-row { height: 13px; border-radius: 3px; background: var(--wash); }
.ph-row--lead { height: 26px; background: var(--ink); }
[data-play] .ph-row { animation: slide-in 400ms var(--ease-out) backwards; }
[data-play] .ph-row:nth-child(1) { animation-delay: 60ms; }
[data-play] .ph-row:nth-child(2) { animation-delay: 130ms; }
[data-play] .ph-row:nth-child(3) { animation-delay: 190ms; }
[data-play] .ph-row:nth-child(4) { animation-delay: 250ms; }
@keyframes slide-in { from { opacity: 0; transform: translateX(14px); } }
.ph-tabs { position: absolute; left: 8px; right: 8px; bottom: 6px; height: 13px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-around; }
.ph-tabs i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.ph-tabs i:nth-child(1) { background: var(--ink); }
[data-play] .ph-tabs i { animation: pop-dot 300ms var(--ease-out) backwards; }
[data-play] .ph-tabs i:nth-child(1) { animation-delay: 360ms; }
[data-play] .ph-tabs i:nth-child(2) { animation-delay: 420ms; }
[data-play] .ph-tabs i:nth-child(3) { animation-delay: 480ms; }
@keyframes pop-dot { from { opacity: 0; transform: scale(0.4); } }

/* ---------- The six systems ----------------------------------------- */

.apps { display: grid; gap: clamp(14px, 1.8vw, 18px); }
@media (min-width: 620px)  { .apps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .apps { grid-template-columns: repeat(3, 1fr); } }

.app {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px;
  transition: border-color var(--dur-hover) ease, transform var(--dur-hover) var(--ease-out),
              box-shadow var(--dur-hover) ease;
}
.app-glyph {
  position: relative; width: 48px; height: 48px; flex: none;
  border: 1.5px solid var(--ink); border-radius: var(--r-md);
  display: grid; place-items: center; overflow: hidden;
  transition: transform var(--dur-pop) var(--ease-out);
}
.app h3 { font-size: 1rem; margin-bottom: 4px; }
.app p { font-size: 0.88rem; color: var(--graphite); margin: 0; }

@media (hover: hover) and (pointer: fine) {
  .app:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 10px 26px rgba(10,10,11,0.06); }
  .app:hover .app-glyph { transform: scale(1.06); }
}

/* glyph parts — transform and opacity only */
.g-box { width: 20px; height: 15px; border: 1.5px solid var(--ink); border-radius: 3px; }
.g-drop { position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 2px; background: var(--ink); transform: translateY(11px); }
[data-play] .g-drop { animation: drop-in 560ms 120ms var(--ease-in-out) backwards; }
@keyframes drop-in { 0% { opacity: 0; transform: translateY(-10px); } 55% { opacity: 1; } 100% { opacity: 1; transform: translateY(11px); } }

.g-stack { display: grid; gap: 3px; }
.g-stack i { display: block; width: 22px; height: 7px; border: 1.5px solid var(--ink); border-radius: 2px; }
[data-play] .g-stack i { animation: stack-in 380ms var(--ease-out) backwards; }
[data-play] .g-stack i:nth-child(3) { animation-delay: 100ms; }
[data-play] .g-stack i:nth-child(2) { animation-delay: 200ms; }
[data-play] .g-stack i:nth-child(1) { animation-delay: 300ms; }
@keyframes stack-in { from { opacity: 0; transform: translateY(7px) scale(0.9); } }

.g-coins { display: grid; gap: 3px; justify-items: center; }
.g-coins i { display: block; width: 22px; height: 6px; border: 1.5px solid var(--ink); border-radius: 999px; }
.g-coins i:nth-child(2) { width: 18px; }
.g-coins i:nth-child(3) { width: 14px; }
[data-play] .g-coins i { animation: coin-in 400ms var(--ease-out) backwards; }
[data-play] .g-coins i:nth-child(3) { animation-delay: 90ms; }
[data-play] .g-coins i:nth-child(2) { animation-delay: 190ms; }
[data-play] .g-coins i:nth-child(1) { animation-delay: 290ms; }
@keyframes coin-in { from { opacity: 0; transform: translateY(9px); } }

.g-card { width: 24px; height: 16px; border: 1.5px solid var(--ink); border-radius: 3px; }
.g-tick { position: absolute; width: 13px; height: 7px; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg); }
[data-play] .g-tick { animation: tick-in 340ms 240ms var(--ease-out) backwards; }
@keyframes tick-in { from { opacity: 0; transform: rotate(-45deg) scale(0.4); } }

.g-slip { width: 18px; background: var(--ink); border-radius: 2px 2px 0 0; height: 26px; transform-origin: top center; }
[data-play] .g-slip { animation: print 560ms 140ms var(--ease-out) backwards; }
@keyframes print { from { transform: scaleY(0); } }

.g-list { display: grid; gap: 4px; }
.g-list i { display: block; width: 20px; height: 3px; border-radius: 2px; background: var(--line-2); position: relative; }
.g-list i::after { content: ""; position: absolute; inset: 0; background: var(--ink); border-radius: 2px; transform-origin: left center; }
[data-play] .g-list i::after { animation: grow-x 300ms var(--ease-out) backwards; }
[data-play] .g-list i:nth-child(1)::after { animation-delay: 120ms; }
[data-play] .g-list i:nth-child(2)::after { animation-delay: 220ms; }
[data-play] .g-list i:nth-child(3)::after { animation-delay: 320ms; }

/* ---------- Process ------------------------------------------------- */

.steps { display: grid; gap: clamp(16px, 2vw, 22px); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; display: flex; flex-direction: column; gap: 9px; padding-top: 22px; }
.step::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--ink);
  transform-origin: left center;
  transition: transform 620ms var(--ease-out) var(--d, 0ms);
}
.step b { font-size: 0.72rem; letter-spacing: 0.16em; color: var(--mist); }
.step h3 { font-size: 1.02rem; }
.step p { font-size: 0.9rem; color: var(--graphite); }

.pledges { display: grid; gap: clamp(14px, 1.8vw, 20px); }
@media (min-width: 700px) { .pledges { grid-template-columns: repeat(3, 1fr); } }
.pledge { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.pledge b { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; }
.pledge p { font-size: 0.9rem; color: var(--graphite); }

/* ---------- Ownership plans -------------------------------------------
   Both options stay on screen so they can be compared without toggling,
   and the chosen one is the emphasised one — the box IS the control. */

.plans { display: grid; gap: clamp(16px, 2vw, 22px); align-items: start; }
@media (min-width: 900px) { .plans { grid-template-columns: 1fr 1fr; } }

.plan {
  position: relative; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(22px, 3vw, 34px);
  display: flex; flex-direction: column; gap: 18px;
  transition: background-color 240ms ease, border-color 240ms ease,
              transform 300ms var(--ease-out), box-shadow 300ms ease;
}
/* The selection ring is an inset shadow, not a thicker border — a border
   width change would shift every line of text inside by half a pixel. */
.plan::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--ink); opacity: 0;
  transition: opacity 240ms var(--ease-out);
}
.plan[aria-checked="true"] {
  background: var(--white);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(10, 10, 11, 0.09);
}
.plan[aria-checked="true"]::after { opacity: 1; }

.plan-top { display: flex; align-items: center; gap: 12px; }

.plan-mark {
  width: 21px; height: 21px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line-2); position: relative;
  transition: border-color 220ms ease;
}
.plan-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink);
  transform: scale(0); transition: transform 260ms var(--ease-out);
}
.plan[aria-checked="true"] .plan-mark { border-color: var(--ink); }
.plan[aria-checked="true"] .plan-mark::after { transform: scale(1); }

.plan-badge {
  display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: transparent; color: var(--graphite);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background-color 240ms ease, color 240ms ease, border-color 240ms ease;
}
.plan[aria-checked="true"] .plan-badge { background: var(--ink); border-color: var(--ink); color: var(--white); }

.plan-state { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: var(--graphite); }
.plan-state i { font-style: normal; }
.plan[aria-checked="true"] .plan-state { color: var(--ink); }
.plan[aria-checked="true"] .plan-state [data-off],
.plan[aria-checked="false"] .plan-state [data-on] { display: none; }

.plan-head { display: flex; flex-direction: column; gap: 10px; }
.plan-head h3 { transition: color 240ms ease; }
.plan-lede { font-weight: 700; font-size: 0.98rem; margin: 0; transition: color 240ms ease; }
.plan-head p { color: var(--graphite); font-size: 0.95rem; }
.plan[aria-checked="false"] .plan-head h3,
.plan[aria-checked="false"] .plan-lede { color: var(--graphite); }

.plan-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.plan-points li { position: relative; padding-left: 30px; font-size: 0.95rem; color: var(--graphite); }
.plan-points li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px;
  border: 1.5px solid var(--line-2); border-radius: 50%;
  transition: border-color 240ms ease, background-color 240ms ease;
}
.plan-points li::after {
  content: ""; position: absolute; left: 5px; top: 9px; width: 8px; height: 4px;
  border-left: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2);
  transform: rotate(-45deg); transition: border-color 240ms ease;
}
.plan[aria-checked="true"] .plan-points li { color: var(--ink); }
.plan[aria-checked="true"] .plan-points li::before { border-color: var(--ink); }
.plan[aria-checked="true"] .plan-points li::after { border-color: var(--ink); }

/* The points re-run their entrance each time this card becomes the chosen one,
   so the switch lands somewhere visible rather than just recolouring. */
.plan[aria-checked="true"] .plan-points li { animation: point-in 420ms var(--ease-out) backwards; }
.plan[aria-checked="true"] .plan-points li:nth-child(1) { animation-delay: 40ms; }
.plan[aria-checked="true"] .plan-points li:nth-child(2) { animation-delay: 100ms; }
.plan[aria-checked="true"] .plan-points li:nth-child(3) { animation-delay: 160ms; }
.plan[aria-checked="true"] .plan-points li:nth-child(4) { animation-delay: 220ms; }
@keyframes point-in { from { opacity: 0; transform: translateX(-8px); } }

@media (hover: hover) and (pointer: fine) {
  .plan[aria-checked="false"]:hover { border-color: var(--line-2); background: var(--white); transform: translateY(-2px); }
  .plan[aria-checked="false"]:hover .plan-state { color: var(--ink); }
  .plan[aria-checked="false"]:hover .plan-mark { border-color: var(--graphite); }
}
.plan:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.plan-note { margin-top: clamp(20px, 2.5vw, 28px); font-size: 0.92rem; color: var(--graphite); max-width: 78ch; }

/* ---------- FAQ ------------------------------------------------------ */

.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white);
  padding: 2px 20px; overflow: hidden;
  transition: border-color var(--dur-hover) ease;
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 17px 0; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 260ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-body { padding-bottom: 18px; }
.faq-body p { color: var(--graphite); font-size: 0.94rem; margin: 0; }
.faq details[open] .faq-body { animation: faq-in 300ms var(--ease-out) backwards; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }
@media (hover: hover) and (pointer: fine) { .faq details:hover { border-color: var(--line-2); } }

/* ---------- Contact -------------------------------------------------- */

.contact-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.05fr 0.95fr; } }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.82rem; font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--ink);
  padding: 13px 16px; background: var(--white);
  border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  transition: border-color var(--dur-hover) ease, box-shadow var(--dur-hover) ease;
}
.field textarea { resize: vertical; min-height: 118px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 10, 11, 0.07);
}
.field-hint { font-size: 0.79rem; color: var(--mist); }
.two-up { display: grid; gap: 16px; }
@media (min-width: 600px) { .two-up { grid-template-columns: 1fr 1fr; } }

.contact-list { display: grid; gap: 12px; }
.contact-item {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color var(--dur-hover) ease, transform var(--dur-hover) var(--ease-out);
}
.contact-item b { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); display: block; margin-bottom: 3px; }
.contact-item p, .contact-item a { font-size: 0.95rem; margin: 0; text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .contact-item:hover { border-color: var(--line-2); transform: translateX(3px); }
}

/* ---------- Footer --------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding-block: 52px 34px; }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.foot img { height: 62px; width: auto; margin-bottom: 14px; }
.foot h4 { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); margin-bottom: 13px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot a { text-decoration: none; font-size: 0.92rem; color: var(--graphite); transition: color var(--dur-hover) ease; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; font-size: 0.82rem; color: var(--mist); }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--ink); } }

/* ---------- Floating WhatsApp ---------------------------------------- */

.wa {
  position: fixed; right: clamp(16px, 3vw, 26px); bottom: clamp(16px, 3vw, 26px); z-index: 70;
  transition: opacity var(--dur-pop) var(--ease-out), transform var(--dur-pop) var(--ease-out);
}
.wa[data-shown] { pointer-events: auto; }

.wa-btn {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--white);
  text-decoration: none; box-shadow: 0 8px 22px rgba(10,10,11,0.2), 0 2px 6px rgba(10,10,11,0.1);
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-hover) ease;
}
.wa-btn:active { transform: scale(0.95); }
.wa-btn svg { width: 27px; height: 27px; }

.wa-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--ink); opacity: 0; pointer-events: none; }
.wa[data-shown] .wa-ring { animation: wa-ring 2200ms var(--ease-out) 2; }
@keyframes wa-ring {
  0%   { opacity: 0.4; transform: scale(1); }
  70%  { opacity: 0;   transform: scale(1.6); }
  100% { opacity: 0;   transform: scale(1.6); }
}

.wa-label {
  position: absolute; right: 0; top: 50%; height: 42px; margin-top: -21px;
  display: flex; align-items: center; white-space: nowrap;
  padding: 0 66px 0 20px; border-radius: 999px;
  background: var(--white); color: var(--ink); border: 1.5px solid var(--line-2);
  font-size: 0.86rem; font-weight: 700; pointer-events: none;
  transform-origin: right center; transform: scaleX(0.55); opacity: 0;
  transition: transform var(--dur-pop) var(--ease-out), opacity var(--dur-pop) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .wa:hover .wa-label, .wa:focus-within .wa-label { transform: scaleX(1); opacity: 1; }
  .wa-btn:hover { box-shadow: 0 12px 30px rgba(10,10,11,0.24), 0 3px 8px rgba(10,10,11,0.12); }
}

/* ---------- Mobile drawer -------------------------------------------- */

.menu-btn {
  display: none; width: 42px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 999px;
  background: var(--white); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform var(--dur-press) var(--ease-out);
}
.menu-btn:active { transform: scale(0.95); }
.menu-btn span { display: block; width: 15px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform var(--dur-pop) var(--ease-out); }

.sheet { position: fixed; inset: 0; z-index: 80; display: none; }
.sheet[data-open] { display: block; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(10,10,11,0.3); opacity: 0; transition: opacity var(--dur-menu) var(--ease-drawer); }
.sheet-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(86vw, 330px);
  background: var(--white); border-left: 1px solid var(--line);
  padding: 20px var(--gutter); display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform var(--dur-menu) var(--ease-drawer);
}
.sheet[data-visible] .sheet-scrim { opacity: 1; }
.sheet[data-visible] .sheet-panel { transform: translateX(0); }
.sheet-panel a {
  text-decoration: none; font-weight: 700; font-size: 1.3rem; padding: 11px 0;
  transition: transform var(--dur-pop) var(--ease-out);
}
.sheet[data-visible] .sheet-panel a { animation: sheet-item 340ms var(--ease-out) backwards; }
.sheet[data-visible] .sheet-panel a:nth-of-type(1) { animation-delay: 60ms; }
.sheet[data-visible] .sheet-panel a:nth-of-type(2) { animation-delay: 105ms; }
.sheet[data-visible] .sheet-panel a:nth-of-type(3) { animation-delay: 150ms; }
.sheet[data-visible] .sheet-panel a:nth-of-type(4) { animation-delay: 195ms; }
.sheet[data-visible] .sheet-panel a:nth-of-type(5) { animation-delay: 240ms; }
@keyframes sheet-item { from { opacity: 0; transform: translateX(18px); } }
.sheet-close { align-self: flex-end; background: none; border: 0; font: inherit; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; margin-bottom: 12px; }

@media (max-width: 1040px) { .nav { display: none; } .menu-btn { display: flex; } }
@media (max-width: 520px) { .masthead .btn { display: none; } }

/* ---------- Toast ----------------------------------------------------- */

.toast-slot { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%); pointer-events: none; }
.toast {
  background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; box-shadow: 0 8px 24px rgba(10,10,11,0.2);
  opacity: 0; transform: translateY(12px) scale(0.96);
  transition: opacity var(--dur-pop) var(--ease-out), transform var(--dur-pop) var(--ease-out);
}
.toast[data-shown] { opacity: 1; transform: translateY(0) scale(1); }

/* =======================================================================
   ENTRANCE STATES — every one written as :not([state]) so the rule stops
   matching the instant the state lands. See the visibility rule at the top.
   ======================================================================= */

html[data-js] [data-reveal] {
  transition: opacity var(--dur-reveal) var(--ease-out) var(--d, 0ms),
              transform var(--dur-reveal) var(--ease-out) var(--d, 0ms);
}
html[data-js] [data-reveal]:not([data-inview]) { opacity: 0; transform: translateY(16px); }

html[data-js] .eyebrow:not([data-inview])::after,
html[data-js] [data-inview] .eyebrow::after { transform: scaleX(0); }
html[data-js] [data-reveal][data-inview] .eyebrow::after,
html[data-js] .eyebrow[data-inview]::after { transform: scaleX(1); }

html[data-js] .step:not([data-inview])::before { transform: scaleX(0); }

/* Hero load sequence */
html[data-js] [data-seq] > * {
  transition: opacity 520ms var(--ease-out) var(--sd, 0ms),
              transform 520ms var(--ease-out) var(--sd, 0ms);
}
html[data-js] [data-seq]:not([data-in]) > * { opacity: 0; transform: translateY(18px); }
html[data-js] [data-seq] > *:nth-child(1) { --sd: 40ms; }
html[data-js] [data-seq] > *:nth-child(2) { --sd: 110ms; }
html[data-js] [data-seq] > *:nth-child(3) { --sd: 180ms; }
html[data-js] [data-seq] > *:nth-child(4) { --sd: 250ms; }
html[data-js] [data-seq] > *:nth-child(5) { --sd: 320ms; }

html[data-js] .hero-float { transition: opacity 620ms var(--ease-out) 180ms, transform 620ms var(--ease-out) 180ms; }
html[data-js] .hero-float:not([data-in]) { opacity: 0; transform: scale(0.94); }
/* Idle drift — 7s, 7px, and it stops for reduced motion. */
html[data-js] .hero-float[data-in] { animation: float 7s var(--ease-in-out) 1s infinite alternate; }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-9px); } }

html[data-js] .wa:not([data-shown]) { opacity: 0; transform: translateY(10px) scale(0.92); pointer-events: none; }

html[data-js] [data-demo]:not([data-play]) .wb-b,
html[data-js] [data-demo]:not([data-play]) .wb-host span,
html[data-js] [data-demo]:not([data-play]) .ph-row { opacity: 0; }
html[data-js] [data-demo]:not([data-play]) .ph-tabs i { opacity: 0; transform: scale(0.4); }
html[data-js] [data-demo]:not([data-play]) .wb-host b { transform: scaleX(0); }
html[data-js] [data-demo]:not([data-play]) .g-slip { transform: scaleY(0); }
html[data-js] [data-demo]:not([data-play]) .g-list i::after { transform: scaleX(0); }
html[data-js] [data-demo]:not([data-play]) .g-drop { opacity: 0; transform: translateY(-10px); }
html[data-js] [data-demo]:not([data-play]) .g-tick { opacity: 0; transform: rotate(-45deg) scale(0.4); }
html[data-js] [data-demo]:not([data-play]) .g-stack i { opacity: 0; transform: translateY(7px) scale(0.9); }
html[data-js] [data-demo]:not([data-play]) .g-coins i { opacity: 0; transform: translateY(9px); }
html[data-js] [data-demo]:not([data-play]) .ev-card { transform: translateY(6%); }

/* ---------- Reduced motion -------------------------------------------- */
/* Fewer and gentler: opacity stays, movement goes, demos show the result. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  html[data-js] [data-reveal] { transition: opacity 200ms ease; }
  html[data-js] [data-reveal]:not([data-inview]) { transform: none; }
  html[data-js] [data-seq] > * { transition: opacity 200ms ease; }
  html[data-js] [data-seq]:not([data-in]) > * { transform: none; }
  html[data-js] .hero-float { transition: opacity 200ms ease; }
  html[data-js] .hero-float:not([data-in]) { transform: none; }
  html[data-js] .hero-float[data-in] { animation: none; }
  html[data-js] .wa { transition: opacity 200ms ease; }
  html[data-js] .wa:not([data-shown]) { transform: none; }
  html[data-js] .wa[data-shown] .wa-ring { animation: none; }

  .progress span { transition: none; }
  .eyebrow::after, .step::before { transition: none; }
  html[data-js] .eyebrow:not([data-inview])::after,
  html[data-js] .step:not([data-inview])::before { transform: none; }

  .lang[data-ready] .lang-highlight,
  .nav[data-ready] .nav-line { transition: none; }

  .plan { transition: background-color 200ms ease, border-color 200ms ease; }
  .plan[aria-checked="true"] { transform: none; }
  .plan[aria-checked="false"]:hover { transform: none; }
  .plan[aria-checked="true"] .plan-points li { animation: none; }
  .plan-mark::after { transition: none; }

  .card:hover, .app:hover, .tag:hover, .contact-item:hover { transform: none; }
  .card:hover .stage, .app:hover .app-glyph { transform: none; }
  .btn:active, .menu-btn:active, .wa-btn:active, .arw { transform: none !important; }
  .btn::before { transition: none; }

  .sheet-panel { transform: none; opacity: 0; transition: opacity var(--dur-pop) ease; }
  .sheet[data-visible] .sheet-panel { transform: none; opacity: 1; }
  .sheet[data-visible] .sheet-panel a { animation: none; }

  .toast { transform: translateY(0) scale(1); transition: opacity 200ms ease; }
  .faq details[open] .faq-body { animation: none; }

  [data-play] .ev-flap, [data-play] .ev-card, [data-play] .wb-b, [data-play] .wb-host b,
  [data-play] .wb-host span, [data-play] .ph-row, [data-play] .ph-tabs i, [data-play] .g-drop,
  [data-play] .g-tick, [data-play] .g-slip, [data-play] .g-list i::after,
  [data-play] .g-stack i, [data-play] .g-coins i { animation: none; }
  .ev-flap { transform: rotateX(-170deg); }
  html[data-js] [data-demo] .ev-card { transform: translateY(-36%); }
  html[data-js] [data-demo]:not([data-play]) .wb-b,
  html[data-js] [data-demo]:not([data-play]) .wb-host span,
  html[data-js] [data-demo]:not([data-play]) .ph-row,
  html[data-js] [data-demo]:not([data-play]) .ph-tabs i,
  html[data-js] [data-demo]:not([data-play]) .g-drop,
  html[data-js] [data-demo]:not([data-play]) .g-tick,
  html[data-js] [data-demo]:not([data-play]) .g-stack i,
  html[data-js] [data-demo]:not([data-play]) .g-coins i { opacity: 1; transform: none; }
  html[data-js] [data-demo]:not([data-play]) .wb-host b,
  html[data-js] [data-demo]:not([data-play]) .g-slip,
  html[data-js] [data-demo]:not([data-play]) .g-list i::after { transform: none; }
  html[data-js] [data-demo]:not([data-play]) .g-drop { transform: translateY(11px); }
  html[data-js] [data-demo]:not([data-play]) .g-tick { transform: rotate(-45deg); }
}

@media print {
  .masthead, .wa, .sheet, .toast-slot, .progress { display: none !important; }
}
