/* Leonia Suite Hub — "Tide & Obsidian" edition (inspired by scrolltide.co)
   Deep obsidian cinema surfaces, 1px hairline architecture, Bricolage Grotesque + Be Vietnam Pro + Space Mono,
   live canvas tide ribbons, 3D scroll-straightening studio window, framed viewport library, and monumental wordmark. */

:root {
  /* Pastel Tide: porcelain paper, plum ink, blush + lilac + tiffany. Same token names as the dark build,
     values inverted so every rule written against them keeps its meaning (bone = text/primary button, ink = page). */
  --ink: #fbf8fa;
  --ink-2: #f6f0f5;
  --surface: #ffffff;
  --surface-2: #faf3f8;
  --surface-3: #f2e8f0;
  --line: rgba(70, 35, 80, 0.10);
  --line-strong: rgba(70, 35, 80, 0.20);
  --bone: #1e1626;
  --mist: #6c6077;
  --dim: #74687f;

  --foam: #0b7d73;
  --tide: #b83b79;
  --deep: #7b5cf0;
  --rose: #e0579a;
  --amber: #e89a14;
  --lime: #6f9a1f;

  --porcelain: #fffdfb;
  --chalk: #ffffff;
  --onyx: #1e1626;

  --blush: #f9d8e6;
  --lilac: #e2daf8;
  --mint: #d3f1ec;
  --pastel: linear-gradient(110deg, #fce2ed 0%, #e5defa 52%, #daf4f0 100%);
  --tide-grad: linear-gradient(96deg, #c2367f 0%, #8a5cf0 48%, #1f9d8f 100%);
  --glow-tide: radial-gradient(56% 48% at 50% 0%, rgba(236, 140, 185, 0.30), rgba(200, 184, 246, 0.14) 48%, transparent 76%);

  --r-xs: 6px;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
  --r-xl: 30px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);

  --display: 'Onest', 'Be Vietnam Pro', system-ui, sans-serif;
  --body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Onest', 'Be Vietnam Pro', system-ui, sans-serif;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 2px 4px rgba(60, 25, 70, 0.04), 0 24px 56px -28px rgba(110, 50, 110, 0.28);
  --shadow-float: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 40px 100px -34px rgba(110, 50, 110, 0.38), 0 0 80px -30px rgba(236, 140, 185, 0.35);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--ink); color: var(--bone); }
body {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  color-scheme: light;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: #f9d8e6; color: #1e1626; }
:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; border-radius: 6px; }

.shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--ink); }

/* ---------- Top Announcement Bar ---------- */
.announce {
  position: relative;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 16px;
  font-size: 12.5px;
  color: var(--mist);
  text-decoration: none;
  background: linear-gradient(90deg, #fce2ed, #e8e0fb 50%, #d9f4ef);
  border-bottom: 1px solid var(--line);
  transition: color 200ms var(--ease-out), background-color 200ms;
}
.announce:hover { color: var(--bone); }
.announce .tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--foam);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 150, 138, 0.36);
  background: rgba(143, 220, 211, 0.14);
}
.announce .tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--foam);
  box-shadow: 0 0 0 0 rgba(15, 150, 138, 0.85);
  animation: pulse-dot 2.2s var(--ease-out) infinite;
}
.announce .long { color: var(--bone); font-weight: 500; }
.announce .sep { color: var(--dim); }
.announce #annLeft { font-family: var(--mono); font-size: 11px; color: var(--foam); }
.announce .go {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bone);
  padding: 2px 10px;
  border-radius: 999px;
  transition: transform 200ms var(--ease-out), background-color 200ms;
}
.announce:hover .go { transform: translateX(2px); background: #3a2d47; }
@keyframes pulse-dot {
  70% { box-shadow: 0 0 0 7px rgba(15, 150, 138, 0.00); }
  100% { box-shadow: 0 0 0 0 rgba(15, 150, 138, 0.00); }
}

/* ---------- Floating glass navbar: gradient hairline, per-tool colors, scroll progress, shimmering CTA ---------- */
.dock-shell {
  position: relative;
  z-index: 40;
  padding: 10px 16px 6px;
  background: linear-gradient(180deg, var(--ink) 55%, rgba(251, 248, 250, 0));
}
.dock {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 7px 8px 7px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84)) padding-box,
    linear-gradient(110deg, #f4b9d3 0%, #cdbcf4 50%, #a8e2d8 100%) border-box;
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 1px 0 #fff inset, 0 12px 32px -16px rgba(120, 60, 120, 0.38), 0 0 0 5px rgba(255, 255, 255, 0.4);
  transition: box-shadow 260ms var(--ease-out), background 260ms;
}
.dock-shell.scrolled .dock {
  background:
    linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)) padding-box,
    linear-gradient(110deg, #ef9fc4 0%, #b9a4f0 50%, #8fd8cb 100%) border-box;
  box-shadow: 0 1px 0 #fff inset, 0 18px 40px -16px rgba(120, 60, 120, 0.5), 0 0 0 5px rgba(255, 255, 255, 0.5);
}
/* scroll progress: a thin gradient line that grows along the bottom edge */
.dock::after {
  content: '';
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--tide-grad);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  opacity: 0.85;
  pointer-events: none;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 2px 6px 2px 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--pastel);
  border: 1px solid rgba(184, 59, 121, 0.16);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 8px 16px -8px rgba(184, 59, 121, 0.55);
  transition: transform 420ms var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-mark img { width: 24px; height: 24px; }
.brand-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--bone);
}

/* Tool switcher */
.tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(244, 235, 242, 0.75);
  border: 1px solid rgba(70, 35, 80, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
  --pillbg: #fff;
  --glow: rgba(110, 50, 110, 0.35);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs[data-active="page"] { --pillbg: linear-gradient(135deg, #fee6f0, #f8cfe1); --glow: rgba(224, 87, 154, 0.55); }
.tabs[data-active="clip"] { --pillbg: linear-gradient(135deg, #eee9fe, #d9cffa); --glow: rgba(123, 92, 240, 0.5); }
.tabs[data-active="look"] { --pillbg: linear-gradient(135deg, #e2f7f3, #c2ece4); --glow: rgba(15, 150, 138, 0.5); }
.tab-pill {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: var(--pillbg);
  box-shadow: 0 1px 2px rgba(60, 25, 70, 0.08), 0 10px 20px -10px var(--glow);
  transition: transform 440ms var(--ease-spring), width 440ms var(--ease-spring), box-shadow 300ms;
  pointer-events: none;
}
.tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 180ms var(--ease-out), transform 260ms var(--ease-spring);
}
.tab:hover { color: var(--bone); }
.tab:active { transform: scale(0.96); }
.tab.active { color: var(--bone); }
.tab svg { width: 15px; height: 15px; transition: transform 320ms var(--ease-spring); }
.tab[data-to="home"] svg { color: #5b4a68; }
.tab[data-to="page"] svg { color: #d0357f; }
.tab[data-to="clip"] svg { color: #7b5cf0; }
.tab[data-to="look"] svg { color: #0f968a; }
.tab:hover svg { transform: translateY(-1px) rotate(-8deg) scale(1.15); }
.tab.active svg { transform: scale(1.1); }
.tab .sub-pill {
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--mist);
  transition: background-color 200ms, color 200ms;
}
.tab.active .sub-pill { background: rgba(255, 255, 255, 0.85); color: var(--bone); }

.dock-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--mist);
  background: #fff;
  border: 1px solid var(--line);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), color 180ms, border-color 180ms;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--bone); border-color: var(--line-strong); }
.icon-btn.off { opacity: 0; transform: scale(0.85); pointer-events: none; }

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(244, 235, 242, 0.75);
}
.lang a {
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--mist);
  transition: background-color 180ms, color 180ms, box-shadow 180ms;
}
.lang a:hover { color: var(--bone); }
.lang a[aria-current="true"] { background: #fff; color: var(--bone); box-shadow: 0 1px 3px rgba(60, 25, 70, 0.12); }

.nav-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d44b94 0%, #a8316f 55%, #7d3fb9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 12px 24px -10px rgba(184, 59, 121, 0.9);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
  transform: translateX(-130%);
  animation: cta-sweep 4.8s ease-in-out 1.4s infinite;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 18px 28px -10px rgba(184, 59, 121, 0.95); }
.nav-cta:active { transform: scale(0.97); }
@keyframes cta-sweep { 0% { transform: translateX(-130%); } 35%, 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .nav-cta::before { animation: none; } }

/* ---------- Stage & Views ---------- */
.stage { position: relative; flex: 1; overflow: hidden; }
#view-home { overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
iframe.view {
  top: 0;
  height: 100% !important;
  width: 100%;
  border: 0;
  background: var(--ink);
}
.view {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out), visibility 0s linear 320ms;
}
.view.active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out), visibility 0s;
}
.loader {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--tide-grad);
  z-index: 35;
  transition: width 480ms var(--ease-out), opacity 240ms var(--ease-out) 140ms;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.text-tide {
  background: var(--tide-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Hero Section (Scrolltide Cinema + Tide Canvas) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 76px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.tide-glow {
  position: absolute;
  inset: -12% -10% 0;
  background:
    radial-gradient(48% 42% at 50% 18%, rgba(70, 183, 255, 0.24), transparent 72%),
    radial-gradient(36% 34% at 22% 28%, rgba(139, 243, 230, 0.14), transparent 70%),
    radial-gradient(36% 34% at 78% 24%, rgba(155, 140, 255, 0.15), transparent 70%);
}
.tide-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(65% 55% at 50% 30%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(65% 55% at 50% 30%, #000 20%, transparent 85%);
}
.hero-vignette {
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--ink));
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.14;
  pointer-events: none;
}

.hero-center {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  transition: border-color 200ms var(--ease-out), color 200ms, transform 200ms var(--ease-out);
}
.eyebrow:hover { border-color: var(--line-strong); color: var(--bone); transform: translateY(-1px); }
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--foam);
  box-shadow: 0 0 12px var(--foam);
}
.eyebrow .arr { color: var(--dim); transition: transform 200ms var(--ease-out), color 200ms; }
.eyebrow:hover .arr { transform: translateX(3px); color: var(--bone); }

.hero-title {
  margin-top: 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 7.2vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.038em;
  color: var(--bone);
  max-width: 15.5ch;
}
.hero-title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  animation: word-rise 760ms var(--ease-out) forwards;
}
@keyframes word-rise {
  to { opacity: 1; transform: none; filter: blur(0); }
}

.hero-sub {
  margin-top: 22px;
  max-width: 580px;
  font-size: clamp(16.5px, 1.4vw, 19px);
  line-height: 1.62;
  color: var(--mist);
  text-wrap: balance;
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 999px;
  transition: transform 200ms var(--ease-out), background-color 200ms, border-color 200ms, box-shadow 220ms, color 200ms;
}
.btn:active { transform: scale(0.98); }
.btn .arr { transition: transform 200ms var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }

.btn-bone {
  background: var(--bone);
  color: var(--ink);
  box-shadow: 0 10px 30px -10px rgba(243, 245, 248, 0.35);
}
.btn-bone:hover {
  background: #3a2d47;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -8px rgba(184, 59, 121, 0.50);
}

.btn-tide {
  background: linear-gradient(135deg, rgba(236, 140, 185, 0.20), rgba(143, 220, 211, 0.14));
  color: var(--bone);
  border-color: rgba(184, 59, 121, 0.42);
}
.btn-tide:hover {
  border-color: rgba(15, 150, 138, 0.94);
  background: linear-gradient(135deg, rgba(236, 140, 185, 0.31), rgba(143, 220, 211, 0.25));
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -12px rgba(184, 59, 121, 0.44);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.65);
  color: var(--bone);
  border-color: var(--line-strong);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: var(--surface-2);
  border-color: rgba(70, 35, 80, 0.28);
  transform: translateY(-2px);
}

.proof {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--mist);
}
.proof .faces { display: flex; }
.proof .faces img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink);
  margin-left: -8px;
}
.proof .faces img:first-child { margin-left: 0; }
.proof b { color: var(--bone); font-weight: 600; }

/* ---------- Interactive Studio Window (Tilted -> Straightens on Scroll) ---------- */
.window-wrap {
  perspective: 1800px;
  margin: 52px auto 0;
  max-width: 1120px;
  padding: 0 24px;
}
.window {
  border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.96));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transform-origin: 50% 0%;
  transform: rotateX(13deg) scale(0.95);
  transition: transform 850ms var(--ease-out);
}
.window.flat { transform: none; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .window {
      transition: none;
      animation: flatten linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 42%;
    }
  }
}
@keyframes flatten {
  from { transform: rotateX(16deg) scale(0.93) translateY(24px); }
  to { transform: none; }
}

.win-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  background: rgba(251, 248, 250, 0.72);
  border-bottom: 1px solid var(--line);
}
.win-dots { display: flex; gap: 6px; align-items: center; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e6d9e5; border: 1px solid rgba(70, 35, 80, 0.08); }
.win-dots i:nth-child(1) { background: #ff5f57; }
.win-dots i:nth-child(2) { background: #febc2e; }
.win-dots i:nth-child(3) { background: #28c840; }
.win-url {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mist);
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(70, 35, 80, 0.04);
  border: 1px solid var(--line);
}
.win-status {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foam);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.win-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--foam); }

.win-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
}
.win-side {
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.win-side-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--foam);
}
.win-side h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.modes { display: grid; gap: 8px; }
.mode {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 11px;
  align-items: center;
  text-align: left;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: border-color 200ms var(--ease-out), background-color 200ms, transform 200ms var(--ease-out);
}
.mode:hover { border-color: var(--line-strong); transform: translateX(2px); }
.mode .ic {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--mist);
}
.mode b { display: block; font-size: 13.5px; font-weight: 600; color: var(--bone); }
.mode small { color: var(--mist); font-size: 12px; }
.mode.on {
  border-color: rgba(184, 59, 121, 0.61);
  background: linear-gradient(135deg, rgba(236, 140, 185, 0.18), rgba(143, 220, 211, 0.09));
  box-shadow: 0 0 0 1px rgba(184, 59, 121, 0.22);
}
.mode.on .ic {
  background: rgba(236, 140, 185, 0.22);
  border-color: rgba(15, 150, 138, 0.59);
  color: var(--foam);
}
.win-foot-note {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dim);
}

.win-main {
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  text-align: left;
  background: radial-gradient(80% 70% at 50% 100%, rgba(236, 140, 185, 0.10), transparent 70%);
}
.m-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(251, 248, 250, 0.78);
  border: 1px solid var(--line);
}
.m-input { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; }
.m-input .lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foam);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(143, 220, 211, 0.16);
  border: 1px solid rgba(15, 150, 138, 0.29);
  white-space: nowrap;
}
.m-input .typed {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-input .typed::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 3px;
  background: var(--tide);
  vertical-align: -2px;
  animation: blink 900ms steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.m-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}

.m-out { position: relative; flex: 1; margin-top: 16px; min-height: 356px; }
.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 360ms var(--ease-out), transform 480ms var(--ease-out);
}
.scene.on { opacity: 1; transform: none; pointer-events: auto; }
.piece {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 420ms var(--ease-out), transform 580ms var(--ease-spring);
}
.scene.built .piece { opacity: 1; transform: none; }
.scene.built .piece:nth-child(2) { transition-delay: 80ms; }
.scene.built .piece:nth-child(3) { transition-delay: 150ms; }
.scene.built .piece:nth-child(4) { transition-delay: 220ms; }
.scene.built .piece:nth-child(5) { transition-delay: 290ms; }

/* Scene 0: Bento Bio Preview */
.pg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr 0.78fr;
  gap: 10px;
  height: 100%;
}
.pg > div { border-radius: 14px; padding: 15px; font-size: 13px; font-weight: 600; position: relative; overflow: hidden; }
.pg .me {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--porcelain);
  color: var(--onyx);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.pg .me .av {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: url('/img/tpl/av-creator.jpg') center/cover;
  margin-bottom: auto;
  border: 2.5px solid #fff;
  box-shadow: 0 6px 16px rgba(110, 50, 110, 0.18);
}
.pg .me .badge-live {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e3ece4;
  color: #1c5435;
}
.pg .me b { font-family: var(--display); font-weight: 800; font-size: 25px; letter-spacing: -0.035em; line-height: 1.05; }
.pg .me small { color: #5d5952; font-size: 12.5px; margin-top: 3px; }
.pg .photo {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.65)), url('/img/tpl/cafe-matcha.jpg') center/cover;
  color: #fff;
  display: flex;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 11px;
}
.pg .ig {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pg .ig small, .pg .map small { font-family: var(--mono); font-size: 10px; color: var(--mist); text-transform: uppercase; }
.pg .map {
  background: rgba(143, 220, 211, 0.18);
  border: 1px solid rgba(15, 150, 138, 0.34);
  color: var(--foam);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pg .shop {
  grid-column: span 2;
  background: var(--bone);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

/* Scene 1: Clip Preview */
.clip { height: 100%; }
.frame {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(90% 80% at 50% 15%, rgba(236, 140, 185, 0.38), transparent 64%),
    linear-gradient(155deg, #fde9f2 0%, #ebe4fb 55%, #dff4ef 100%);
  box-shadow: 0 18px 36px -24px rgba(150, 60, 120, 0.5);
  color: var(--bone);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.frame .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(60px, 7vw, 96px);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: linear-gradient(180deg, #2a1c35 25%, #b83b79 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.frame .cap { margin-top: 8px; text-align: center; font-size: 15px; color: var(--mist); }
.frame .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--tide-grad); width: 0; }
.scene.built .frame .bar { width: 100%; transition: width 3.2s linear; }
.frame .rec {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--foam);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139, 243, 230, 0.08);
  border: 1px solid rgba(139, 243, 230, 0.24);
}
.frame .rec::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--foam); animation: blink 1s steps(1) infinite; }
.frame .fmt {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--mist);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

/* Scene 2: Look Preview */
.look { display: grid; grid-template-rows: auto 1fr; gap: 10px; height: 100%; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sw {
  height: 82px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid rgba(70, 35, 80, 0.1);
}
.specimen {
  border-radius: 14px;
  background: var(--porcelain);
  color: var(--onyx);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.specimen .aa {
  font-family: var(--display);
  font-weight: 800;
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.specimen small { display: block; color: #5b5750; font-size: 13px; margin-top: 6px; }
.specimen .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.specimen .chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--onyx);
  color: var(--porcelain);
  font-size: 12.5px;
  font-weight: 700;
}
.specimen .chip.alt { background: #c4482a; color: #fff; }

/* ---------- Infinite Marquee Strip ---------- */
.ticker {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 18px 0 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; gap: 36px; width: max-content; animation: tick 44s linear infinite; }
.track span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 36px;
}
.track span::after { content: '·'; color: var(--tide); font-size: 18px; }
.ticker:hover .track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Generic Section Rhythm ---------- */
section.block { padding: 104px 0; position: relative; border-bottom: 1px solid var(--line); }
section.block.surface-band { background: var(--ink-2); }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--foam);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tide);
}
h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--bone);
  margin-top: 12px;
  max-width: 18ch;
}
.lede {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.62;
  color: var(--mist);
  max-width: 54ch;
}
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

/* ---------- Scrolltide-Style Library Grid (#templates) ---------- */
.lib-controls {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip-f {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  color: var(--mist);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms, color 180ms, border-color 180ms;
}
.chip-f:hover { color: var(--bone); border-color: var(--line-strong); }
.chip-f.on { background: var(--bone); color: var(--ink); border-color: var(--bone); font-weight: 700; }
.chip-f .n {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.65;
  margin-left: 5px;
}

.tpl-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 18px;
}
.tpl-card {
  group: card;
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--bone);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tpl-card.hide { display: none; }
.tpl-card.pop { animation: pop-in 480ms var(--ease-out) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px); } }

.tpl-viewport {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 16 / 11;
  transition: border-color 320ms var(--ease-out), transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out);
}
.tpl-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(251, 248, 250, 0.88);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}
.tpl-bar-dots { display: flex; gap: 4px; }
.tpl-bar-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.tpl-media {
  position: relative;
  width: 100%;
  height: calc(100% - 29px);
  overflow: hidden;
}
.tpl-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 750ms var(--ease-out), filter 500ms;
}
.tpl-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(7, 8, 11, 0.72) 100%);
  opacity: 0.7;
  transition: opacity 320ms;
}
.tpl-card:hover .tpl-viewport {
  border-color: rgba(184, 59, 121, 0.50);
  transform: translateY(-4px);
  box-shadow: 0 28px 56px -26px rgba(110, 50, 110, 0.4), 0 0 36px -14px rgba(184, 59, 121, 0.25);
}
.tpl-card:hover .tpl-media img { transform: scale(1.055); }

.tpl-pill {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px -8px rgba(60, 25, 70, 0.5);
  backdrop-filter: blur(8px);
  color: var(--bone);
}
.tpl-pill.p-page { color: #b02f6e; background: rgba(255, 238, 246, 0.94); }
.tpl-pill.p-clip { color: #5b3fc4; background: rgba(240, 235, 255, 0.94); }
.tpl-pill.p-look { color: #0b7d73; background: rgba(227, 247, 243, 0.94); }

.tpl-swatch {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(7, 8, 11, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
}
.tpl-swatch i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); }

.tpl-open {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bone);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms var(--ease-out), transform 280ms var(--ease-out);
}
.tpl-card:hover .tpl-open, .tpl-card:focus-visible .tpl-open { opacity: 1; transform: none; }

.tpl-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.tpl-meta b {
  font-family: var(--display);
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bone);
}
.tpl-meta .tpl-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.tpl-line {
  display: block;
  padding: 0 2px;
  margin-top: -6px;
  font-size: 13.5px;
  color: var(--mist);
}
.gallery-foot { margin-top: 40px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Three Tools Deep-Dive ("One piece at a time" Bento) ---------- */
.tools-stack { margin-top: 48px; display: grid; gap: 22px; }
.tool {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 44px;
  align-items: center;
  padding: 36px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.9));
  position: relative;
  overflow: hidden;
  transition: border-color 360ms var(--ease-out);
}
.tool:hover { border-color: var(--line-strong); }
.tool-idx {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tool-idx span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--foam);
  border: 1px solid rgba(15, 150, 138, 0.39);
  background: rgba(143, 220, 211, 0.14);
}
.tool-idx i {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--line-strong);
}
.tool h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4vw, 50px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-top: 18px;
}
.tool h3 em {
  font-style: normal;
  background: var(--tide-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.give { margin-top: 20px; display: grid; gap: 14px; }
.give p { font-size: 15.5px; line-height: 1.62; color: var(--mist); }
.give b {
  font-family: var(--mono);
  color: var(--bone);
  font-weight: 700;
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tool .btn { margin-top: 24px; }

.tool-visual {
  border-radius: 20px;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 20px;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.vis-page { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 84px; gap: 10px; }
.vis-page div { border-radius: 14px; padding: 13px; font-size: 12.5px; font-weight: 700; }
.vis-page .a {
  grid-row: span 2;
  background: var(--porcelain);
  color: var(--onyx);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.vis-page .a b { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.vis-page .a span { color: #5b5750; font-weight: 500; font-size: 12px; margin-top: 2px; }
.vis-page .b { grid-column: span 2; grid-row: span 2; background: url('/img/tpl/wedding-photo.jpg') center/cover; }
.vis-page .c { background: var(--surface-2); border: 1px solid var(--line); color: var(--bone); }
.vis-page .d { background: rgba(143, 220, 211, 0.22); border: 1px solid rgba(143, 220, 211, 0.50); color: var(--foam); }
.vis-page .e { background: var(--bone); color: var(--ink); }

.vis-clip { display: flex; gap: 12px; align-items: flex-end; justify-content: center; height: 266px; }
.vis-clip .ph {
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(155deg, #fde3ee 0%, #ece4fb 100%);
  box-shadow: 0 14px 28px -18px rgba(150, 60, 120, 0.5);
  color: var(--bone);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  position: relative;
  overflow: hidden;
}
.vis-clip .ph::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--tide-grad); }
.in .vis-clip .ph::after { animation: fill 2.8s var(--ease-out) infinite; }
.vis-clip .s { background: linear-gradient(155deg, #e4f5f1 0%, #e9e4fb 100%); }
.vis-clip .t { background: linear-gradient(155deg, #fff0d9 0%, #fde1ec 100%); }
.vis-clip .ph:nth-child(2)::after { animation-delay: 400ms; }
.vis-clip .ph:nth-child(3)::after { animation-delay: 800ms; }
@keyframes fill { from { width: 0; } 70%, to { width: 100%; } }
.vis-clip .w { width: 46%; height: 158px; font-size: 36px; }
.vis-clip .s { width: 26%; height: 182px; font-size: 28px; }
.vis-clip .t { width: 21%; height: 254px; font-size: 24px; }
.vis-clip .lab {
  position: absolute;
  top: 9px;
  left: 11px;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--mist);
  letter-spacing: 0.06em;
}

.vis-look { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 266px; }
.vis-look .site {
  border-radius: 15px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.vis-look .before {
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.15), rgba(7, 8, 11, 0.82)), url('/img/tpl/fashion-boutique.jpg') center/cover;
  border: 1px solid var(--line);
  color: #fff;
}
.vis-look .after {
  background: var(--porcelain);
  color: var(--onyx);
}
.vis-look .tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.palette-dots { display: flex; gap: 6px; }
.palette-dots i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16); }
.preview-cta {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--onyx);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Scrolltide Step Cards (01 / 02 / 03) + Hairline Stats Grid ---------- */
.steps-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), var(--ink-2));
  padding: 28px;
  transition: transform 420ms var(--ease-out), border-color 420ms var(--ease-out);
}
.step-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.step-card .glow-corner {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--tide);
  filter: blur(48px);
  opacity: 0;
  transition: opacity 450ms var(--ease-out);
  pointer-events: none;
}
.step-card:hover .glow-corner { opacity: 0.18; }
.step-card .wm {
  position: absolute;
  top: -18px;
  right: 10px;
  font-family: var(--display);
  font-size: 104px;
  font-weight: 800;
  line-height: 1;
  color: rgba(70, 35, 80, 0.03);
  pointer-events: none;
  user-select: none;
}
.step-head { display: flex; align-items: center; gap: 12px; }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--foam);
  border: 1px solid rgba(184, 59, 121, 0.39);
  background: rgba(236, 140, 185, 0.12);
}
.step-rule { flex: 1; height: 1px; background: var(--line); transition: background-color 400ms; }
.step-card:hover .step-rule { background: rgba(236, 140, 185, 0.56); }
.step-card h3 {
  margin-top: 22px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bone);
}
.step-card p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--mist); }

.stats-band {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}
.stat-cell {
  background: var(--ink-2);
  padding: 26px 24px;
  transition: background-color 240ms;
}
.stat-cell:hover { background: var(--surface); }
.stat-val {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--bone);
}
.stat-cell:first-child .stat-val { color: var(--tide); }
.stat-lbl { margin-top: 8px; font-size: 13.5px; color: var(--mist); }

/* ---------- Real App Screens Fan ---------- */
.showcase { overflow: hidden; }
.shots {
  position: relative;
  max-width: 1200px;
  margin: 52px auto 0;
  padding: 0 24px;
  height: 610px;
}
.shot {
  position: absolute;
  width: 61%;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-float);
  transition: transform 650ms var(--ease-out), border-color 300ms;
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bone);
  padding: 6px 14px;
  border-radius: 999px;
}
.chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: #fbf6fa;
  border-bottom: 1px solid var(--line);
}
.chrome i { width: 8px; height: 8px; border-radius: 50%; background: rgba(70, 35, 80, 0.18); }
.chrome span { margin-left: 10px; font-family: var(--mono); font-size: 11px; color: var(--mist); }
.s1 { left: 24px; top: 42px; transform: rotate(-4deg); z-index: 1; }
.s2 { left: 19.5%; top: 0; transform: rotate(1.2deg); z-index: 2; }
.s3 { right: 24px; top: 68px; transform: rotate(4.5deg); z-index: 1; }
.shot:hover { z-index: 4; transform: rotate(0) translateY(-8px) scale(1.02); border-color: rgba(70, 183, 255, 0.55); }

/* ---------- Audience Bento ---------- */
.people {
  margin-top: 42px;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 16px;
}
.person {
  border-radius: 22px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.62;
  color: var(--mist);
  transition: transform 280ms var(--ease-out), border-color 280ms;
}
.person:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.person b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--bone);
  margin-bottom: 8px;
}
.person:first-child {
  grid-row: span 2;
  color: #e6ecf5;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 340px;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.08) 18%, rgba(7, 8, 11, 0.9)), url('/img/tpl/cafe-matcha.jpg') center/cover;
}
.person:first-child b { color: #fff; font-size: 30px; }

/* ---------- Pricing ---------- */
.price { display: grid; grid-template-columns: 1fr 1.08fr; gap: 18px; margin-top: 42px; }
.plan {
  border-radius: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.plan.pass {
  background:
    radial-gradient(480px 300px at 100% 0%, rgba(236, 140, 185, 0.34), transparent 65%),
    radial-gradient(420px 280px at 0% 100%, rgba(143, 220, 211, 0.30), transparent 65%),
    linear-gradient(180deg, #ffffff, #fdf1f7);
  border-color: rgba(184, 59, 121, 0.42);
  box-shadow: var(--shadow-float);
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan h4 { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--bone); }
.plan-badge {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(143, 220, 211, 0.22);
  border: 1px solid rgba(15, 150, 138, 0.45);
  color: var(--foam);
}
.plan .amt {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 5vw, 68px);
  letter-spacing: -0.05em;
  margin-top: 14px;
  line-height: 1;
  color: var(--bone);
}
.plan .amt small {
  display: block;
  margin-top: 8px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--mist);
}
.plan ul {
  list-style: none;
  margin-top: 24px;
  margin-bottom: 28px;
  display: grid;
  gap: 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--mist);
}
.plan.pass ul { color: var(--bone); }
.plan li { padding-left: 24px; position: relative; }
.plan li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(-45deg);
}
.plan.pass li::before { border-color: var(--foam); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.seats {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--foam);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.seats::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--foam); box-shadow: 0 0 10px var(--foam); }

/* ---------- FAQ ---------- */
.faq { margin-top: 34px; max-width: 840px; }
details { border-bottom: 1px solid var(--line); interpolate-size: allow-keywords; }
details::details-content { height: 0; overflow: clip; transition: height 340ms var(--ease-out), content-visibility 340ms allow-discrete; }
details[open]::details-content { height: auto; }
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-family: var(--display);
  font-size: 19.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bone);
}
summary::-webkit-details-marker { display: none; }
summary .pm {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  position: relative;
  transition: transform 300ms var(--ease-out), border-color 220ms, background-color 220ms;
}
summary .pm::before, summary .pm::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 1.8px;
  background: var(--bone);
  transform: translate(-50%, -50%);
}
summary .pm::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] summary .pm {
  transform: rotate(45deg);
  background: rgba(236, 140, 185, 0.22);
  border-color: rgba(15, 150, 138, 0.65);
}
details p { padding: 0 44px 22px 0; font-size: 15.5px; line-height: 1.65; color: var(--mist); }

/* ---------- Scrolltide Closing Wave CTA + Monumental Wordmark Footer ---------- */
footer.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.final {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 112px 24px 96px;
}
.final .tide-glow { opacity: 0.85; }
.final-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  width: 100%;
  height: 90px;
  opacity: 0.36;
  pointer-events: none;
}
.final h2 {
  margin: 14px auto 0;
  max-width: 15ch;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 0.96;
}
.final p {
  margin: 18px auto 0;
  max-width: 490px;
  font-size: 17px;
  color: var(--mist);
  line-height: 1.6;
}

.foot-cols {
  border-top: 1px solid var(--line);
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 24px 36px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 36px;
}
.foot-brand p {
  margin-top: 14px;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mist);
}
.foot-cols h5 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.foot-cols a, .foot-cols button.lnk {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 5px 0;
  cursor: pointer;
  text-align: left;
  color: var(--mist);
  font-size: 14px;
  transition: color 180ms;
}
.foot-cols a::before, .foot-cols button.lnk::before {
  content: '';
  height: 1px;
  width: 0;
  background: var(--tide);
  margin-right: 0;
  transition: width 240ms var(--ease-out), margin-right 240ms var(--ease-out);
}
.foot-cols a:hover, .foot-cols button.lnk:hover { color: var(--bone); }
.foot-cols a:hover::before, .foot-cols button.lnk:hover::before { width: 12px; margin-right: 8px; }

.foot-wordmark {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  pointer-events: none;
  user-select: none;
  text-align: center;
}
.foot-wordmark span {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(72px, 19vw, 250px);
  line-height: 0.82;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, rgba(184, 59, 121, 0.16), rgba(184, 59, 121, 0.02));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.foot-bar {
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.foot-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--dim);
}
.foot-bar-inner .mono { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 680ms var(--ease-out), transform 780ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* Vietnamese diacritics breathing room */
:lang(vi) .hero-title { line-height: 1.06; letter-spacing: -0.03em; }
:lang(vi) h2 { line-height: 1.1; }
:lang(vi) .tool h3 { line-height: 1.12; }

/* Responsive */
@media (max-width: 980px) {
  .win-grid { grid-template-columns: 1fr; }
  .win-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .modes { grid-template-columns: repeat(3, 1fr); }
  .mode { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .mode small, .win-foot-note { display: none; }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .tool, .price, .steps-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .people { grid-template-columns: 1fr 1fr; }
  .person:first-child { grid-column: 1 / -1; grid-row: auto; min-height: 260px; }
  .shots { height: auto; display: grid; gap: 16px; }
  .shot { position: relative; width: 100%; left: auto !important; right: auto !important; top: auto !important; transform: none !important; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .tab .sub-pill { display: none; }
}
@media (max-width: 640px) {
  .announce .sep, .announce .long { display: none; }
  .dock { grid-template-columns: 1fr auto; padding: 8px 10px 9px 12px; row-gap: 8px; border-radius: 26px; }
  .dock-shell { padding: 8px 10px 4px; }
  .tabs { order: 3; grid-column: 1 / -1; justify-content: space-between; }
  .tab { padding: 6px 11px; font-size: 12.5px; }
  .tab svg { display: none; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 48px; }
  .window-wrap { padding: 0 12px; }
  .win-main { padding: 14px; min-height: 390px; }
  .pg { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .tpl-grid, .people { grid-template-columns: 1fr; }
  .tool { padding: 22px; }
  .specimen { flex-direction: column; align-items: flex-start; }
  section.block { padding: 72px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
  .hero-title .w { opacity: 1; transform: none; filter: none; }
  .window { transform: none; }
}


/* ---------- Phone polish: thumb-sized targets, clip mock-ups that fit ---------- */
@media (max-width: 640px) {
  .tab { min-height: 36px; }
  .lang a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; }
  .site-footer a, .foot-cols a { display: inline-flex; align-items: center; min-height: 40px; }
  .vis-clip { gap: 8px; }
  .vis-clip .ph { min-width: 0; padding: 0 4px; }
  .vis-clip .w { font-size: 28px; }
  .vis-clip .s { font-size: 22px; }
  .vis-clip .t { font-size: 18px; }
  .vis-clip .lab { max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


/* ---------- Friendly "tool is not reachable" panel (replaces the browser's error page inside the hub) ---------- */
.tool-error {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(249, 216, 230, 0.8), transparent 70%),
    radial-gradient(60% 50% at 85% 20%, rgba(226, 218, 248, 0.8), transparent 70%),
    var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms var(--ease-out), visibility 0s linear 260ms;
}
.tool-error.on { opacity: 1; visibility: visible; transition: opacity 260ms var(--ease-out), visibility 0s; }
.te-card {
  max-width: 440px;
  text-align: center;
  padding: 34px 30px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
}
.te-ic {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center;
  background: var(--pastel); color: var(--tide); box-shadow: 0 10px 20px -12px rgba(184, 59, 121, 0.6);
}
.te-ic svg { width: 26px; height: 26px; }
.te-card h3 { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.04em; line-height: 1.15; color: var(--bone); }
.te-card p { margin-top: 10px; font-size: 15.5px; line-height: 1.6; color: var(--mist); }
.te-actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.te-actions .btn[disabled] { opacity: 0.6; pointer-events: none; }


/* ---------- Navbar shrinks on scroll. The shell keeps its height, so nothing below it moves. ---------- */
.dock-shell { height: 78px; }
.dock { transition: max-width 320ms var(--ease-out), padding 320ms var(--ease-out), box-shadow 260ms var(--ease-out), background 260ms; }
.dock-shell.scrolled .dock { max-width: 900px; padding-top: 4px; padding-bottom: 4px; }
.brand-mark { transition: transform 420ms var(--ease-spring), width 320ms var(--ease-out), height 320ms var(--ease-out); }
.dock-shell.scrolled .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
.dock-shell.scrolled .brand-mark img { width: 20px; height: 20px; }
.brand-word { transition: font-size 320ms var(--ease-out); }
.dock-shell.scrolled .brand-word { font-size: 18px; }
.tab .sub-pill { transition: max-width 320ms var(--ease-out), opacity 220ms, padding 320ms, margin 320ms; max-width: 120px; overflow: hidden; white-space: nowrap; }
.dock-shell.scrolled .tab .sub-pill { max-width: 0; opacity: 0; padding-left: 0; padding-right: 0; margin-left: -7px; }
.dock-shell.scrolled .tab { padding-top: 5px; padding-bottom: 5px; }
.dock-shell.scrolled .nav-cta { padding-top: 7px; padding-bottom: 7px; }
@media (max-width: 600px) { .dock-shell { height: 118px; } .dock-shell.scrolled .dock { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .dock, .brand-mark, .brand-word, .tab .sub-pill { transition: none; } }

#view-home { scrollbar-gutter: stable; }
