/* ===========================================================
   Ideafolia — Landing
   antigravity.google language: white, monochrome ink, gradient
   accent only on the mark; per-card dot grids that ripple to the
   pointer.
   =========================================================== */

:root {
  --bg: #FFFFFF;
  --ink: #111111;
  --ink-2: #5F6368;
  --ink-3: #9AA0A6;
  --line: #ECECEC;
  --line-2: #E0E0E0;

  --g1: #4F7CFF;
  --g2: #9B6CFF;
  --g3: #FF8FB1;

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1120px;

  --font: "Google Sans", "Google Sans Text", "Inter",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font);
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; letter-spacing: -0.01em;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- per-card dot field ---------- */
/* any element that hosts dots becomes a positioning context */
.has-dots { position: relative; isolation: isolate; }
.has-dots > .dotcanvas {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit;
}
.has-dots > .dot-content { position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .25s;
}
.nav.scrolled { border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand .mark { width: 24px; height: 24px; }
.nav-mid { display: flex; gap: 30px; }
.nav-mid a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-mid a:hover { color: var(--ink); }
@media (max-width: 820px){ .nav-mid { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1;
  padding: 11px 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, background .18s, border-color .18s;
}
.btn:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #000; box-shadow: 0 8px 22px rgba(0,0,0,.16); border-color: #000; }
.nav .btn { padding: 9px 18px; }

/* ---------- hero (card with its own dot field) ---------- */
.hero {
  position: relative; text-align: center; margin: 40px auto 0; max-width: var(--maxw);
  padding: 100px 24px 96px; border-radius: 32px; overflow: hidden;
  background:
    radial-gradient(120% 120% at 50% 0%, #fbfbff 0%, #ffffff 60%);
  border: 1px solid var(--line);
}
.hero .mini-mark { width: 56px; height: 56px; margin: 0 auto 30px; display: block; }
.hero .mini-mark svg { width: 100%; height: 100%; }
.hero h1 {
  font-size: clamp(40px, 6.6vw, 80px); line-height: 1.04; font-weight: 600;
  letter-spacing: -0.04em; color: var(--ink); margin: 0 auto 24px; max-width: 16ch;
}
.hero p.lead {
  font-size: clamp(16px, 1.9vw, 20px); color: var(--ink-2); font-weight: 400;
  line-height: 1.55; max-width: 60ch; margin: 0 auto 38px; letter-spacing: -0.01em;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.subnote { margin-top: 22px; font-size: 13px; color: var(--ink-3); }

/* ---------- section scaffolding ---------- */
section { position: relative; padding: 96px 0; }
.sec-head { text-align: center; max-width: 60ch; margin: 0 auto 56px; }
.sec-eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 16px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 46px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; margin: 0 0 16px; }
.sec-head p { font-size: 17px; color: var(--ink-2); line-height: 1.6; margin: 0; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- how: diagram card (dots + growth) ---------- */
/* scroll-zoom: the card scales up as it scrolls toward viewport center,
   settling to its standard size (driven by --zoom set from app.js) */
.diagram {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; overflow: hidden; height: 440px;
  box-shadow: 0 24px 60px -44px rgba(0,0,0,.25);
  transform: scale(var(--zoom, 1));
  transform-origin: center 60%;
  will-change: transform;
}
.diagram .diasvg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.diagram .dotcanvas { z-index: 0; }
.dnode {
  position: absolute; transform: translate(-50%,-50%); z-index: 2;
  font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-2); color: var(--ink);
  white-space: nowrap; opacity: 0; box-shadow: 0 4px 14px -6px rgba(0,0,0,.2);
  animation: rise .55s cubic-bezier(.22,1,.36,1) forwards;
}
.dnode.seed { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; padding: 12px 22px; font-size: 15px; }
.dnode.mod { border-color: #d9d9d9; color: var(--ink-2); }
.dresult {
  position: absolute; transform: translate(-50%,-50%); width: 88px; height: 64px; z-index: 2;
  border-radius: 12px; border: 2px solid #fff; opacity: 0;
  background: linear-gradient(135deg, var(--g1), var(--g2) 60%, var(--g3));
  box-shadow: 0 12px 28px -10px rgba(79,124,255,.5);
  animation: rise .6s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes rise { to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

/* ---------- steps row ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--line); }
.steps .s { padding: 32px 26px 8px; border-right: 1px solid var(--line); }
.steps .s:last-child { border-right: 0; }
.steps .s .k { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 14px; }
.steps .s h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
.steps .s p { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 0; }
@media (max-width: 820px){ .steps { grid-template-columns: 1fr 1fr; } .steps .s:nth-child(2){ border-right:0; } .steps .s:nth-child(-n+2){ border-bottom:1px solid var(--line);} }
@media (max-width: 520px){ .steps { grid-template-columns: 1fr; } .steps .s { border-right:0; border-bottom:1px solid var(--line);} }

/* ---------- modules: cards WITH per-card dot fields ---------- */
.panels { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
/* OUTER frame: holds a clean, very pale pastel gradient CONTAINED inside it.
   blue/periwinkle (left) -> lavender (top) -> peach/yellow-green (right). */
.panel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 18px;                 /* gap that reveals the colored frame */
  min-height: 230px;
  background:
    linear-gradient(135deg,
      #E4ECFB 0%,                /* pale periwinkle — top-left */
      #ECE6F7 32%,               /* pale lavender   */
      #F8ECEC 58%,               /* pale pink/peach */
      #FBF3DC 80%,               /* pale yellow     */
      #EAF4E6 100%);             /* pale green — bottom-right */
  box-shadow: 0 18px 44px -34px rgba(80,90,140,.30);
  transition: transform .28s ease, box-shadow .28s ease;
}
/* INNER white panel: sits inside the frame with uniform gap (the padding) */
.panel > .dot-content {
  position: relative; z-index: 1;
  background: #FCFCFD;
  border-radius: calc(var(--radius-lg) - 8px);
  padding: 28px;
  height: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.panel:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -38px rgba(80,90,140,.42); }
.panel .pico {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 22px;
  border: 1px solid var(--line-2); background: #fff; display: grid; place-items: center; color: var(--ink);
}
.panel .pico svg { width: 22px; height: 22px; }
.panel h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 9px; }
.panel p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; margin: 0; }
@media (max-width: 820px){ .panels { grid-template-columns: 1fr; } }

/* ---------- path-as-prompt ---------- */
.path { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.path-box { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 40px 34px; overflow: hidden; }
.chain { display: flex; flex-direction: column; align-items: flex-start; }
.chain .pill { padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.chain .pill.seed { background: var(--ink); color: #fff; border-color: var(--ink); }
.chain .pill.mod { color: var(--ink-2); }
.chain .conn { width: 1px; height: 20px; margin-left: 24px; background: var(--line-2); }
.path-eq { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); line-height: 1.65; }
.path-eq b { color: var(--ink); font-weight: 600; }
.path-eq .grad { background: linear-gradient(100deg, var(--g1), var(--g2), var(--g3)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.path-txt h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.12; margin: 0 0 18px; }
.path-txt p { font-size: 16px; color: var(--ink-2); line-height: 1.65; margin: 0 0 14px; }
.path-txt p b { color: var(--ink); font-weight: 600; }
@media (max-width: 880px){ .path { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- CTA (card with dots) ---------- */
.cta {
  position: relative; text-align: center; margin: 0 auto; max-width: var(--maxw);
  padding: 96px 24px; border-radius: 32px; overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 50% 100%, #fbfbff 0%, #ffffff 60%);
}
.cta h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 600; letter-spacing: -0.04em; margin: 0 0 16px; }
.cta p { font-size: 17px; color: var(--ink-2); margin: 0 0 32px; }
.waitlist { display: flex; gap: 10px; justify-content: center; max-width: 440px; margin: 0 auto; flex-wrap: wrap; }
.waitlist input { flex: 1; min-width: 220px; font-family: inherit; font-size: 15px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); outline: none; transition: border-color .2s; }
.waitlist input:focus { border-color: var(--ink); }
.cta-note { margin-top: 16px; font-size: 13px; color: var(--ink-3); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 80px; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot .brand { font-size: 15px; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--ink-3); text-decoration: none; font-size: 13.5px; transition: color .2s; }
.foot-links a:hover { color: var(--ink); }
.copy { font-size: 13px; color: var(--ink-3); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
