/* ============================================================================
   Practal — landing page styles
   Self-contained port of the Symphony design system (colors, type, spacing,
   components) + the landing-specific rules. No product runtime required.
   ========================================================================== */

/* ── color tokens (daylight palette) ───────────────────────────────────── */
:root {
  color-scheme: light;

  --paper: #E9E4D7;
  --paper-2: #E1DCCB;

  --surface: #F4F0E5;
  --surface-2: #FBF9F2;
  --surface-3: #ECE7D8;

  --ink: #33302A;
  --ink-2: #575145;
  --ink-3: #79715F;
  --ink-soft: #A39A86;

  --line: rgba(51, 48, 42, .13);
  --line-2: rgba(51, 48, 42, .20);
  --line-soft: rgba(51, 48, 42, .08);

  --accent: #2E4A3D;
  --accent-2: #21382D;
  --accent-soft: rgba(46, 74, 61, .10);
  --on-accent: #F2F1E8;

  --gold: #9C7B3A;
  --gold-soft: rgba(156, 123, 58, .12);
  --star: #9C7B3A;

  --danger: #9C3A3A;
  --danger-soft: rgba(156, 58, 58, .10);

  --glass: rgba(251, 249, 242, .78);
  --grad: linear-gradient(135deg, #E8B98A 0%, #D9926B 45%, #B8C49A 100%);

  --avatar-bg: #C89B6E;
  --avatar-ink: #2C2620;

  --selection: rgba(154, 120, 55, .22);

  /* the real brand mark drives the agent avatar + monogram squares */
  --brand-mark: url("assets/practal-mark.png");
}

/* ── typography tokens ─────────────────────────────────────────────────── */
:root {
  --font-serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* hero / editorial body — the "Lora" reading face chosen for this doc */
  --hero-stack: "Lora", Georgia, serif;
  --hero-size: 19px;

  --text-doc-title: 36px;
  --text-h1: 28.5px;
  --text-h2: 23px;
  --text-h3: 19.5px;
  --text-prose: 18.5px;
  --lh-prose: 1.66;

  --text-panel-title: 16px;
  --text-chat: 13.5px;
  --text-take: 15px;

  --text-ui: 12.5px;
  --text-ui-lg: 13.5px;
  --text-ui-sm: 11.5px;
  --text-meta: 10.5px;

  --text-eyebrow: 10px;
  --ls-eyebrow: .14em;
  --ls-eyebrow-wide: .18em;
  --ls-tight: -.01em;
}

/* ── spacing / radii / shadows / motion ────────────────────────────────── */
:root {
  --r-xs: 6px;  --r-sm: 9px; --r-md: 13px; --r-lg: 18px; --r-xl: 24px; --r-2xl: 32px; --r-pill: 999px;
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, .2, .2, 1);
  --dur: .34s;
  --dur-mid: .18s;
  --dur-fast: .13s;

  --shadow-sm: 0 1px 2px rgba(40, 32, 20, .06), 0 1px 1px rgba(40, 32, 20, .04);
  --shadow-md: 0 4px 16px rgba(40, 32, 20, .09), 0 1px 3px rgba(40, 32, 20, .06);
  --shadow-lg: 0 18px 50px rgba(40, 32, 20, .16), 0 4px 12px rgba(40, 32, 20, .08);
}

/* ── reset / base ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--selection); }
button { font-family: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

@keyframes symBlink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes symSpin { to { transform: rotate(360deg); } }
@keyframes pcSpin { to { transform: rotate(360deg); } }
@keyframes chorusFloaty { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(var(--r, 0deg)); } }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; border: none; background: var(--accent); color: var(--on-accent); border-radius: 11px; padding: 12px 16px; font-family: var(--font-sans); font-size: var(--text-ui-lg); font-weight: 600; cursor: pointer; text-decoration: none; transition: background var(--dur-fast); }
.btn-primary:hover { background: var(--accent-2); }

/* ── sidebar rows ──────────────────────────────────────────────────────── */
.sb-newdoc { display: flex; align-items: center; gap: 9px; width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 8px 11px; font-family: var(--font-sans); font-size: var(--text-ui); font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 0 1px 2px rgba(60, 50, 35, .05); transition: all .15s; }
.sb-newdoc .kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); }
.sb-doc { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 25px; border-radius: 7px; font-family: var(--font-sans); font-size: var(--text-ui); color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.sb-doc.active { background: rgba(51, 48, 42, .08); color: var(--ink); font-weight: 600; }
.sb-doc svg { flex-shrink: 0; color: var(--ink-soft); }
.sb-doc.active svg { color: var(--gold); }
.sb-proj { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; font-family: var(--font-sans); font-size: var(--text-ui); font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; }

/* ── chat messages ─────────────────────────────────────────────────────── */
.at-msg { font-size: var(--text-chat); line-height: 1.62; }
.at-msg.user { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 6px 16px; padding: 11px 14px; box-shadow: var(--shadow-sm); color: var(--ink); }
.at-msg.atelier { color: var(--ink-2); }
.at-msg.atelier .who { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 8px; }
.at-msg.atelier .who i { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-mark, var(--grad)); background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); display: inline-grid; place-items: center; }
.at-msg.atelier .who b { font-family: var(--font-serif); font-size: 14px; font-weight: 500; color: var(--ink); }

.sym-typing { display: inline-flex; align-items: center; gap: 4px; }
.sym-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); display: inline-block; animation: symBlink 1.2s infinite ease-in-out both; }
.sym-typing i:nth-child(2) { animation-delay: .18s; }
.sym-typing i:nth-child(3) { animation-delay: .36s; }

.cp-sbcomposer { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--surface-2); transition: border-color .15s; }

/* ── live variation block + glass cycle pill ───────────────────────────── */
.vblock { border-radius: 8px; transition: background .25s, box-shadow .25s; }
.vblock.live { background: var(--gold-soft); box-shadow: 0 0 0 8px var(--gold-soft); }
.vblock.media-live { border-radius: 14px; }

.gbar { position: absolute; top: 0; right: -18px; transform: translateY(-88%); display: inline-flex; align-items: center; gap: 1px; background: rgba(251, 249, 242, .68); backdrop-filter: blur(16px) saturate(1.05); -webkit-backdrop-filter: blur(16px) saturate(1.05); border: 1px solid rgba(255, 255, 255, .72); border-radius: var(--r-pill); padding: 3px; box-shadow: 0 5px 20px rgba(40, 36, 28, .13), inset 0 1px 0 rgba(255, 255, 255, .55); z-index: 40; white-space: nowrap; }
.gbar button { border: none; background: transparent; width: 26px; height: 26px; border-radius: 50%; color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .12s, color .12s; flex-shrink: 0; }
.gbar button:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.gbar button svg { width: 13px; height: 13px; }
.gbar .g-count { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); letter-spacing: .04em; padding: 0 6px; }
.gbar .g-sep { width: 1px; height: 15px; background: rgba(51, 48, 42, .12); margin: 0 2px; flex-shrink: 0; }
.gbar .g-keep.on { color: var(--gold); }

/* ── ambient drift card (brand variation motif) ────────────────────────── */
.drift { position: absolute; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; width: 250px; font-family: var(--font-serif); font-size: 13px; line-height: 1.55; color: var(--ink-3); box-shadow: 0 4px 18px rgba(40, 36, 28, .07); opacity: .55; animation: chorusFloaty 9s ease-in-out infinite; pointer-events: none; user-select: none; z-index: 1; }
.drift .dtag { font-family: var(--font-sans); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .drift { animation: none; } html { scroll-behavior: auto; } }

/* ── landing-specific ──────────────────────────────────────────────────── */
.hero-title { font-family: var(--font-serif); font-weight: 600; line-height: .99; letter-spacing: -.025em; font-size: clamp(52px, 8vw, 96px); margin: 0; text-wrap: balance; }
.sec-h2 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.04; margin: 0; text-wrap: balance; }

.docscroll::-webkit-scrollbar { width: 8px; }
.docscroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.docscroll::-webkit-scrollbar-track { background: transparent; }

/* desktop pin-and-scrub: a tall track holds a sticky, vertically-centered frame.
   JS sets the track height and scrubs the inner doc as the page scrolls. */
.studio-track { position: relative; }
.studio-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }

.studio-mobile { display: none; }

@media (max-width: 1080px) { .drift { display: none !important; } }
@media (max-width: 860px) {
  .nav { padding: 18px 20px !important; }
  .nav-links { display: none !important; }
  .signin { display: none !important; }
  .hero-head { padding: 32px 22px 26px !important; }
  .hero-head .hero-title { font-size: clamp(38px, 11vw, 52px) !important; }
  .hero-sub { font-size: 16.5px !important; margin-bottom: 24px !important; }
  .hero-cta { flex-direction: column !important; gap: 6px !important; }
  .hero-cta .btn-primary { width: 100% !important; }
  .studio-sec { padding: 0 16px 20px !important; }
  .studio-track { display: none !important; }
  .studio-mobile { display: block !important; }
  .thesis-sec > div { padding: 60px 24px !important; }
  .engine-sec > div { padding: 56px 20px !important; }
  .engine-grid { grid-template-columns: 1fr !important; grid-template-rows: none !important; }
  .engine-grid > div { grid-column: auto !important; grid-row: auto !important; min-height: 0 !important; }
  .closing-inner { padding: 90px 24px 70px !important; min-height: 0 !important; }
  .closing-inner .sec-h2 { font-size: clamp(40px, 12vw, 56px) !important; }
  .closing-inner .btn-primary { width: 100% !important; }
  .footer-row { padding: 22px 22px !important; }
}
