/* ============================================================
   YANGOT Studio — built on Vercel's Geist design system (Light)
   Neutral surfaces · gray-scale text hierarchy · one blue accent ·
   tight radii · subtle shadows · Geist Sans/Mono.
   Motion: custom ease-out, scale-on-press, staggered reveals.
   ============================================================ */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg-100: #ffffff;
  --bg-200: #fafafa;

  /* Gray scale — text & fills */
  --gray-100: #f2f2f2;
  --gray-200: #ebebeb;
  --gray-300: #e6e6e6;
  --gray-400: #eaeaea;
  --gray-500: #c9c9c9;
  --gray-600: #a8a8a8;
  --gray-700: #8f8f8f;
  --gray-800: #7d7d7d;
  --gray-900: #4d4d4d;
  --gray-1000: #171717;

  /* Translucent grays — borders, dividers, hovers */
  --ga-100: #0000000d;
  --ga-200: #00000015;
  --ga-400: #00000014;
  --ga-500: #00000036;
  --ga-600: #0000003d;

  /* Accent — blue for links, focus, the single key action */
  --blue-100: #f0f7ff;
  --blue-400: #cae7ff;
  --blue-700: #006bff;
  --blue-800: #0059ec;

  --primary: #171717;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 9999px;

  /* Elevation */
  --shadow-card: 0 2px 2px rgba(0,0,0,.04);
  --shadow-pop: 0 1px 1px rgba(0,0,0,.02), 0 4px 8px -4px rgba(0,0,0,.04), 0 16px 24px -8px rgba(0,0,0,.06);
  --shadow-modal: 0 1px 1px rgba(0,0,0,.02), 0 8px 16px -4px rgba(0,0,0,.04), 0 24px 32px -8px rgba(0,0,0,.06);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-geist: cubic-bezier(0.175, 0.885, 0.32, 1.1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 1120px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-100);
  color: var(--gray-1000);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
img { max-width: 100%; display: block; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gray-700);
  margin: 0 0 20px;
}
.eyebrow.accent { color: var(--blue-700); }

.display {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.05em;
  margin: 0 0 22px;
}
.h2 {
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}
.h3 { font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 8px; }

.lead {
  font-size: clamp(18px, 2.1vw, 21px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--gray-900);
  margin: 0 auto 34px;
  max-width: 34ch;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ga-200);
}
.nav .brand { display: flex; align-items: center; gap: 9px; color: var(--gray-1000); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.nav .brand:hover { text-decoration: none; }
.nav .brand .mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--gray-1000); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.nav .links { display: flex; align-items: center; gap: 28px; }
.nav .links a { color: var(--gray-900); font-size: 14px; letter-spacing: -0.01em; transition: color .15s var(--ease-out); }
.nav .links a:hover { color: var(--gray-1000); text-decoration: none; }
@media (max-width: 640px) { .nav .links .link { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .15s var(--ease-out), border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-100), 0 0 0 4px var(--blue-700); }
.btn.lg { height: 48px; padding: 0 20px; font-size: 16px; border-radius: var(--r-sm); }

.btn.primary { background: var(--gray-1000); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.secondary { background: var(--bg-100); color: var(--gray-1000); border-color: var(--ga-400); }
.btn.secondary:hover { background: var(--gray-100); }
.btn.on-dark { background: #fff; color: var(--gray-1000); }
.btn.ghost { background: transparent; color: var(--gray-1000); }
.btn.ghost:hover { background: var(--ga-100); }
.btn .arrow { transition: transform .2s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Layout ---------- */
section { padding: clamp(72px, 10vw, 120px) 24px; }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.center { text-align: center; }
.alt { background: var(--bg-200); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .cta-row { justify-content: center; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(64px, 12vh, 120px); padding-bottom: clamp(56px, 9vw, 104px); }
.hero .display { max-width: 15ch; margin-left: auto; margin-right: auto; }
.hero .lead { max-width: 46ch; }

/* soft, restrained backdrop */
.hero-wrap { position: relative; }
.hero-glow {
  position: absolute; z-index: -1; top: -140px; left: 50%; transform: translateX(-50%);
  width: min(760px, 92vw); height: 420px; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 40%, rgba(0,107,255,.06), transparent 70%);
}

/* ---------- Cards / principles ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 52px; text-align: left; }
.card {
  background: var(--bg-100);
  border: 1px solid var(--ga-200);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card .ico {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--gray-100); color: var(--gray-1000);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--gray-900); font-size: 15px; line-height: 1.55; }

/* ---------- Frame showpiece ---------- */
.frame-head { display: flex; align-items: center; gap: 18px; justify-content: center; margin-bottom: 8px; }
.frame-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow-pop); }
.frame-tag { font-size: clamp(20px, 2.6vw, 26px); font-weight: 500; letter-spacing: -0.02em; color: var(--gray-900); margin: 6px auto 0; max-width: 30ch; }

.demo {
  margin: 56px auto 0;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
}
.panel {
  background: var(--bg-100);
  border: 1px solid var(--ga-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 22px;
}
.panel .cap { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--gray-700); margin: 0 0 16px; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 82%; padding: 10px 14px; font-size: 15px; line-height: 1.4; border-radius: 20px; }
.bubble.them { align-self: flex-start; background: var(--gray-100); color: var(--gray-1000); border-bottom-left-radius: 6px; }
.bubble.you { align-self: flex-end; background: var(--blue-700); color: #fff; border-bottom-right-radius: 6px; }
.chat .meta { font-family: var(--mono); font-size: 11px; color: var(--gray-600); text-align: center; margin: 4px 0; letter-spacing: .02em; }

/* read + move */
.read p { margin: 0 0 20px; font-size: 15.5px; line-height: 1.55; color: var(--gray-1000); }
.read .divider { height: 1px; background: var(--ga-200); margin: 20px -22px; }
.move-bubble {
  background: var(--blue-700); color: #fff; padding: 12px 15px; border-radius: 16px; border-bottom-right-radius: 6px;
  font-size: 15.5px; line-height: 1.45; margin: 0 0 14px;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: var(--r-sm);
  background: var(--bg-100); border: 1px solid var(--ga-400); color: var(--gray-1000);
  font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .15s var(--ease-out);
}
.copy-btn:hover { background: var(--gray-100); }
.copy-btn:active { transform: scale(0.96); }
.copy-btn svg { width: 14px; height: 14px; }

.frame-foot { margin-top: 40px; }
.soon {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--gray-700); background: var(--gray-100);
  border-radius: var(--r-full); padding: 7px 14px;
}
.soon .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-700); }
.frame-foot .links { margin-top: 16px; font-size: 14px; color: var(--gray-700); }
.frame-foot .links a { color: var(--gray-900); }
.frame-foot .links span { opacity: .4; margin: 0 10px; }

/* ---------- Company details ---------- */
.facts { margin: 44px auto 0; max-width: 640px; text-align: left; background: var(--bg-100); border: 1px solid var(--ga-200); border-radius: var(--r-md); padding: 26px 28px; box-shadow: var(--shadow-card); }
.facts .cap { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--gray-700); margin: 0 0 18px; }
.facts dl { margin: 0; display: grid; gap: 13px; }
.facts dl > div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; }
.facts dt { color: var(--gray-700); font-size: 14px; }
.facts dd { margin: 0; font-size: 14px; color: var(--gray-1000); }
.facts-link { margin: 18px 0 0; font-size: 14px; }

/* ---------- Contact ---------- */
.contact-email { font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; letter-spacing: -0.03em; margin: 18px 0 30px; }

/* ---------- Footer ---------- */
footer { background: var(--bg-200); border-top: 1px solid var(--ga-200); padding: 56px 24px 44px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
footer .brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; color: var(--gray-1000); letter-spacing: -0.02em; }
footer .brand .mark { width: 20px; height: 20px; border-radius: 6px; background: var(--gray-1000); color: #fff; display: grid; place-items: center; font-size: 12px; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
footer nav a { color: var(--gray-900); font-size: 13px; }
footer nav a:hover { color: var(--gray-1000); }
footer .legal { width: 100%; margin: 8px 0 0; color: var(--gray-700); font-size: 12px; line-height: 1.5; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px) scale(0.99); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
main.legal { max-width: 720px; margin: 0 auto; padding: 64px 24px 96px; }
main.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 600; line-height: 1.05; letter-spacing: -0.04em; margin: 0 0 14px; }
main.legal h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 44px 0 12px; }
main.legal h3 { font-size: 18px; font-weight: 600; margin: 28px 0 8px; }
main.legal p, main.legal li { font-size: 16px; line-height: 1.6; color: var(--gray-1000); }
main.legal li { margin: 6px 0; }
main.legal p.updated { color: var(--gray-700); font-size: 14px; margin: 0 0 32px; }
main.legal a { color: var(--blue-700); }
main.legal table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0; }
main.legal td, main.legal th { border: 1px solid var(--ga-200); padding: 10px 12px; text-align: left; vertical-align: top; }
main.legal th { color: var(--gray-700); font-weight: 600; background: var(--bg-200); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .demo { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .facts dl > div { grid-template-columns: 1fr; gap: 3px; }
  .facts dt { font-size: 13px; }
  .frame-head { flex-direction: column; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .copy-btn, .btn .arrow { transition: none; }
}
