/* ===== Retide Studio (retide.ai) ===== */
:root {
  --bg: #070a16;
  --bg-alt: #0b1022;
  --surface: #111831;
  --surface-2: #161f3d;
  --border: #222c4e;
  --text: #eef1fb;
  --muted: #98a1c2;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --ok: #34d399;
  --max: 1120px;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(124,92,255,.16), transparent 60%),
    radial-gradient(700px 400px at 0% 0%, rgba(34,211,238,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
code { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; }
a { color: inherit; }

/* Overflow safety: let grid/flex children shrink so wide content can't push past the viewport */
html, body { overflow-x: hidden; max-width: 100%; }
.hero-inner > *, .ide-grid > *, .show-row > *, .footer-grid > * { min-width: 0; }
.editor, .panel, .ide, .ide-chat, .ide-preview { max-width: 100%; }
.editor-code { overflow-x: auto; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; text-decoration: none; padding: 12px 22px; border-radius: 11px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  white-space: nowrap; cursor: pointer; font-size: .98rem;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #060912; box-shadow: 0 10px 28px rgba(124,92,255,.32); }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(124,92,255,.46); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--brand); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,10,22,.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 18px rgba(124,92,255,.6);
}
.brand-name { font-size: 1.15rem; letter-spacing: .2px; }
.brand-accent { color: var(--brand-2); }
.nav-links { list-style: none; display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ===== Section primitives ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kicker { color: var(--brand-2); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: .78rem; margin-bottom: 14px; }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: -.6px; line-height: 1.15; margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 44px; max-width: 640px; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 84px 0 92px; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; font-size: .85rem; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; margin-bottom: 22px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -1.4px; margin-bottom: 22px; font-weight: 800; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-points { list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: .96rem; }
.hero-glow { position: absolute; top: -200px; right: -120px; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.28), transparent 65%); z-index: 1; }

/* ===== Editor mockup ===== */
.editor {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.editor-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.dotr { width: 11px; height: 11px; border-radius: 50%; }
.dotr.red { background: #ff5f57; } .dotr.amber { background: #febc2e; } .dotr.green { background: #28c840; }
.editor-title { margin-left: 10px; color: var(--muted); font-size: .82rem; }
.editor-body { display: grid; grid-template-columns: 110px 1fr; min-height: 250px; position: relative; }
.editor-side { border-right: 1px solid var(--border); padding: 14px 0; display: flex; flex-direction: column; gap: 4px; background: rgba(0,0,0,.15); }
.editor-side .file { padding: 6px 16px; color: var(--muted); font-size: .82rem; }
.editor-side .file.active { color: var(--text); background: rgba(124,92,255,.14); border-left: 2px solid var(--brand); }
.editor-code { padding: 16px 18px; font-size: .86rem; line-height: 1.8; color: #cdd4f0; overflow-x: auto; }
.editor-code .ln { display: inline-block; width: 22px; color: #4b5680; user-select: none; }
.editor-code .kw { color: #c792ea; } .editor-code .fn { color: #82aaff; }
.editor-code .st { color: #c3e88d; } .editor-code .cm { color: #5f6b94; font-style: italic; }
.ai-chip { position: absolute; right: 14px; bottom: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #060912; font-size: .78rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; box-shadow: 0 8px 20px rgba(124,92,255,.4); }

/* ===== Cards (capabilities) ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--brand); }
.card-num { font-family: ui-monospace, monospace; font-size: .85rem; font-weight: 700; color: var(--brand-2); margin-bottom: 16px; letter-spacing: 1px; }
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { color: var(--muted); }

/* ===== Feature grid ===== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; transition: border-color .2s; }
.feature:hover { border-color: var(--brand-2); }
.f-ic { font-size: 1.5rem; display: block; margin-bottom: 12px; }
.feature h4 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ===== Privacy ===== */
.privacy-lede { color: var(--muted); font-size: 1.15rem; max-width: 720px; margin-bottom: 28px; }
.privacy-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 28px; }
.privacy-list li { color: var(--text); }

/* ===== Download ===== */
.download-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; max-width: 760px; }
.download-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.dl-platform { display: flex; flex-direction: column; gap: 4px; }
.dl-os { font-size: 1.2rem; font-weight: 700; }
.dl-meta { color: var(--muted); font-size: .9rem; }
.download-sub { color: var(--muted); font-size: .92rem; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.download-sub a { color: var(--brand-2); text-decoration: none; }
.download-sub a:hover { text-decoration: underline; }

/* ===== FAQ ===== */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 20px; transition: border-color .2s; }
.faq details[open] { border-color: var(--brand); }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--brand-2); font-size: 1.3rem; transition: transform .2s; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); padding: 0 0 18px; }

/* ===== CTA band ===== */
.cta-band { padding: 80px 0; background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(34,211,238,.10)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -.6px; margin-bottom: 28px; }

/* ===== Footer ===== */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.footer-tag { color: var(--muted); font-size: .92rem; max-width: 280px; }
.footer-contact { margin-top: 10px; font-size: .92rem; font-weight: 600; }
.footer-contact a { color: var(--brand-2); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-head { color: var(--text); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; transition: color .2s; }
.footer-nav a:hover { color: var(--brand-2); }
.footer-base { padding-top: 24px; }
.footer-base p { color: var(--muted); font-size: .82rem; max-width: 760px; }

/* ============================================================
   PREMIUM MOTION LAYER
   ============================================================ */

/* --- Animated aurora background (hero) --- */
.aurora { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.aurora .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.aurora .b1 { width: 460px; height: 460px; top: -120px; left: -60px; background: radial-gradient(circle, #7c5cff, transparent 70%); animation: drift1 18s ease-in-out infinite; }
.aurora .b2 { width: 420px; height: 420px; top: -80px; right: -80px; background: radial-gradient(circle, #22d3ee, transparent 70%); animation: drift2 22s ease-in-out infinite; }
.aurora .b3 { width: 380px; height: 380px; bottom: -160px; left: 30%; background: radial-gradient(circle, #4f46e5, transparent 70%); animation: drift3 26s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(60px,40px) scale(1.15)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-50px,50px) scale(1.1)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(40px,-40px) scale(1.2)} }

/* Subtle grid overlay */
.grid-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%); }

/* Animated gradient text */
.grad-animate { background: linear-gradient(90deg, #7c5cff, #22d3ee, #818cf8, #7c5cff); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gradslide 6s linear infinite; }
@keyframes gradslide { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .grad-animate { animation: none; } .aurora .blob { animation: none; } }

/* Hero badge pulse dot */
.eyebrow .dot { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(52,211,153,.6)} 50%{box-shadow:0 0 0 6px rgba(52,211,153,0)} }

/* Button shine on hover */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content:""; position:absolute; top:0; left:-120%; width:60%; height:100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.btn-primary:hover::after { left: 140%; }

/* Card spotlight (mouse-follow glow) */
.card, .feature, .plan { position: relative; }
.card::before, .feature::before, .plan::before { content:""; position:absolute; inset:0; border-radius:inherit; opacity:0; transition:opacity .3s;
  background: radial-gradient(380px circle at var(--mx,50%) var(--my,50%), rgba(124,92,255,.14), transparent 60%); pointer-events:none; }
.card:hover::before, .feature:hover::before, .plan:hover::before { opacity:1; }

/* --- SVG line icons --- */
.svg-ic { width: 30px; height: 30px; display: block; margin-bottom: 16px; stroke: url(#icgrad); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.feature .svg-ic { width: 26px; height: 26px; margin-bottom: 12px; }

/* --- Tech marquee --- */
.marquee-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); padding: 22px 0; overflow: hidden; }
.marquee-label { text-align: center; color: var(--muted); font-size: .8rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 16px; }
.marquee { display: flex; gap: 56px; width: max-content; animation: marquee 26s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee span { color: var(--muted); font-weight: 600; font-size: 1.05rem; white-space: nowrap; opacity: .7; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Count-up stats --- */
.metric-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { text-align: center; padding: 36px 16px; border-right: 1px solid var(--border); }
.metric:last-child { border-right: none; }
.metric .num { font-size: 2.4rem; font-weight: 800; letter-spacing: -1px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.metric .lbl { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* Typing caret */
.type-caret { display:inline-block; width:7px; height:1.05em; background: var(--brand-2); margin-left:1px; vertical-align:-2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* --- Honest social-proof band --- */
.proof-band { padding: 56px 0 10px; text-align: center; }
.proof-head { color: var(--muted); font-size: 1.05rem; font-weight: 500; max-width: 640px; margin: 0 auto 26px; }
.proof-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.proof-tag { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 9px 18px; color: var(--text); font-weight: 600; font-size: .92rem; opacity: .85; transition: border-color .2s, transform .2s; }
.proof-tag:hover { border-color: var(--brand); transform: translateY(-2px); }

/* --- Feature showcase (alternating) --- */
.show-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 56px 0; }
.show-row.rev .show-visual { order: -1; }
.show-text .kicker { margin-bottom: 12px; }
.show-text h3 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.5px; margin-bottom: 14px; line-height: 1.2; }
.show-text p { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; }
.show-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.show-list li { color: var(--muted); padding-left: 26px; position: relative; }
.show-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-2); font-weight: 700; }

/* Mockup panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.panel-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.panel-bar .dotr { width: 10px; height: 10px; }
.panel-bar .pt { margin-left: 8px; color: var(--muted); font-size: .8rem; }
.panel-body { padding: 18px; font-size: .9rem; }

/* Prompt mockup */
.prompt-bar { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.prompt-bar .pk { font-size: .72rem; color: var(--brand-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-weight: 600; }
.prompt-bar .pq { color: var(--text); font-family: ui-monospace, monospace; font-size: .85rem; }
.codeline { font-family: ui-monospace, monospace; font-size: .82rem; line-height: 1.9; padding: 0 4px; border-radius: 5px; }
.codeline.add { background: rgba(52,211,153,.12); color: #b9f5d8; }
.codeline.add::before { content: "+ "; color: var(--ok); }
.codeline.ctx { color: #9aa3c4; }

/* Local-model mockup */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .tl { color: var(--text); font-size: .92rem; }
.toggle-row .tl small { display: block; color: var(--muted); font-size: .78rem; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.switch.off { background: var(--border); }
.switch.off::after { right: auto; left: 3px; }
.offline-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: .82rem; font-weight: 600; margin-top: 12px; }
.offline-badge .ring { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* Deploy mockup */
.deploy-step { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.deploy-step:last-child { border-bottom: none; }
.deploy-step .chk { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .7rem; background: rgba(52,211,153,.15); color: var(--ok); border: 1px solid rgba(52,211,153,.4); }
.deploy-step.run .chk { background: rgba(124,92,255,.15); color: var(--brand-2); border-color: rgba(124,92,255,.5); animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.deploy-bar { height: 6px; border-radius: 999px; background: var(--bg); margin-top: 16px; overflow: hidden; }
.deploy-bar i { display: block; height: 100%; width: 72%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; animation: fill 2.6s ease-in-out infinite; }
@keyframes fill { 0%{width:8%} 50%{width:82%} 100%{width:8%} }
@media (prefers-reduced-motion: reduce) { .deploy-step.run .chk, .deploy-bar i { animation: none; } }

/* ============================================================
   INTERACTIVE PRODUCT DEMO (agent in action)
   ============================================================ */
.demo-section { padding: 84px 0; position: relative; overflow: hidden; }
.centered { text-align: center; margin-left: auto; margin-right: auto; }
.demo-wrap { max-width: 1200px; margin: 44px auto 0; padding: 0 24px; }

.ide { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 50px 120px rgba(0,0,0,.6); position: relative; }
.ide-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ide-top .pt { margin-left: 10px; color: var(--muted); font-size: .82rem; }
.ide-grid { display: grid; grid-template-columns: 232px 1.05fr 1fr; min-height: 460px; }

/* Task sidebar */
.ide-tasks { border-right: 1px solid var(--border); padding: 14px 12px; background: rgba(0,0,0,.18); }
.tasks-head { color: var(--muted); font-size: .68rem; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.tasks-head .badge { background: rgba(124,92,255,.2); color: var(--brand-2); border-radius: 999px; padding: 1px 8px; font-size: .7rem; font-weight: 700; }
.task { padding: 9px 10px; border-radius: 10px; margin-bottom: 4px; }
.task.active { background: rgba(124,92,255,.12); }
.task .t-top { display: flex; align-items: center; gap: 8px; }
.task .t-check { width: 16px; height: 16px; border-radius: 50%; background: rgba(52,211,153,.16); color: var(--ok); display: grid; place-items: center; font-size: .58rem; border: 1px solid rgba(52,211,153,.4); flex: none; }
.task .t-title { font-size: .84rem; font-weight: 600; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .t-time { color: var(--muted); font-size: .7rem; }
.task .t-sub { color: var(--muted); font-size: .73rem; margin-top: 3px; margin-left: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-diff .add { color: var(--ok); } .t-diff .del { color: #f87171; }

/* Chat / composer */
.ide-chat { border-right: 1px solid var(--border); padding: 18px; display: flex; flex-direction: column; gap: 11px; overflow: hidden; }
.chat-prompt { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: .9rem; color: var(--text); }
.seq { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; }
.seq.in { opacity: 1; transform: none; }
.chat-step { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .85rem; }
.chat-step .ic { color: var(--brand-2); flex: none; }
.chat-step .fname { color: var(--text); font-family: ui-monospace, monospace; font-size: .82rem; }
.chat-msg { font-size: .88rem; color: var(--text); line-height: 1.6; }
.chat-msg.done { color: #b9f5d8; }
.diff-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-family: ui-monospace, monospace; font-size: .82rem; color: var(--text); }
.diff-chip .fic { color: var(--muted); } .diff-chip .add { color: var(--ok); } .diff-chip .del { color: #f87171; }
.thinking { display: inline-flex; gap: 4px; align-items: center; }
.thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-2); animation: bounce 1.2s infinite; }
.thinking i:nth-child(2){animation-delay:.15s} .thinking i:nth-child(3){animation-delay:.3s}
@keyframes bounce { 0%,100%{opacity:.3;transform:translateY(0)} 50%{opacity:1;transform:translateY(-3px)} }

/* Live browser preview */
.ide-preview { display: flex; flex-direction: column; background: var(--bg); }
.prev-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.prev-bar .nav { color: #4b5680; font-size: .9rem; }
.prev-url { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 4px 10px; color: var(--muted); font-size: .76rem; font-family: ui-monospace, monospace; }
.prev-canvas { flex: 1; padding: 30px 26px; }
.prev-canvas .pv { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.prev-canvas .pv.in { opacity: 1; transform: none; }
.pv-logo { font-weight: 800; font-size: 1rem; letter-spacing: -.3px; margin-bottom: 22px; background: linear-gradient(135deg,var(--brand),var(--brand-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pv-h1 { font-size: 1.7rem; line-height: 1.15; letter-spacing: -.6px; margin-bottom: 12px; font-weight: 800; }
.pv-p { color: var(--muted); font-size: .9rem; margin-bottom: 18px; max-width: 280px; }
.pv-btn { display: inline-block; background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #060912; font-weight: 700; font-size: .82rem; padding: 9px 16px; border-radius: 8px; }
.pv-glow { position: absolute; }

@media (max-width: 980px) {
  .ide-grid { grid-template-columns: 1fr 1fr; }
  .ide-tasks { display: none; }
}
@media (max-width: 680px) {
  .ide-grid { grid-template-columns: 1fr; }
  .ide-preview { display: none; }
}

/* ===== Logo image ===== */
.logo-img { width: 26px; height: 26px; border-radius: 7px; display: block; box-shadow: 0 0 16px rgba(124,92,255,.4); }

/* ===== Scroll progress bar ===== */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--brand), var(--brand-2)); box-shadow: 0 0 12px rgba(124,92,255,.6); transition: width .08s linear; }

/* ===== Header scrolled state ===== */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.site-header.scrolled { box-shadow: 0 10px 30px rgba(0,0,0,.35); background: rgba(7,10,22,.9); }

/* ===== Mobile nav toggle ===== */
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; align-items: center; justify-content: center; background: none; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Reveal on scroll ===== */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ===== Sub-page hero ===== */
.page-hero { position: relative; overflow: hidden; padding: 84px 0 56px; border-bottom: 1px solid var(--border); }
.page-hero .lede { margin-bottom: 0; }
.breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

/* ===== Pricing ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; position: relative; }
.plan.popular { border-color: var(--brand); box-shadow: 0 20px 50px rgba(124,92,255,.18); }
.plan-tag { position: absolute; top: -12px; right: 24px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #060912; font-size: .72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: .5px; }
.plan h3 { font-size: 1.25rem; margin-bottom: 6px; }
.plan .plan-desc { color: var(--muted); font-size: .92rem; margin-bottom: 20px; min-height: 40px; }
.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 22px; }
.price .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -1px; }
.price .per { color: var(--muted); font-size: .9rem; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 26px; flex: 1; }
.plan ul li { color: var(--muted); font-size: .94rem; padding-left: 26px; position: relative; }
.plan ul li::before { content: "✔"; position: absolute; left: 0; color: var(--brand-2); }
.plan .btn { width: 100%; }
.billing-note { color: var(--muted); font-size: .9rem; margin-top: 28px; text-align: center; }

/* ===== Docs layout ===== */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 6px; }
.docs-nav .docs-head { color: var(--text); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .6px; margin: 18px 0 6px; }
.docs-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; padding: 5px 10px; border-radius: 8px; transition: background .2s, color .2s; }
.docs-nav a:hover { color: var(--text); background: var(--surface); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; letter-spacing: -.4px; padding-top: 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.18rem; margin: 26px 0 8px; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose ul, .prose ol { color: var(--muted); margin: 0 0 16px 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--brand-2); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose code { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; font-size: .88rem; color: var(--brand-2); }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin-bottom: 18px; }
.prose pre code { background: none; border: none; padding: 0; color: #cdd4f0; }
.callout { background: rgba(124,92,255,.08); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; color: var(--muted); }

/* ===== Changelog ===== */
.timeline { max-width: 760px; border-left: 2px solid var(--border); margin-left: 8px; padding-left: 28px; display: flex; flex-direction: column; gap: 34px; }
.release { position: relative; }
.release::before { content: ""; position: absolute; left: -36px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 0 0 4px var(--bg); }
.release .rel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.release h3 { font-size: 1.2rem; }
.rel-date { color: var(--muted); font-size: .85rem; }
.rel-badge { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--brand-2); }
.release ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.release ul li { color: var(--muted); padding-left: 22px; position: relative; }
.release ul li::before { content: "›"; position: absolute; left: 0; color: var(--brand-2); }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .editor { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 28px; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .docs-nav .docs-head { width: 100%; margin: 0; }
  .show-row { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .show-row .show-visual { order: 2 !important; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 4px;
    background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 12px 24px 18px;
    margin-left: 0; max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height .3s ease, opacity .2s ease, padding .3s ease;
  }
  .nav-links.open { max-height: 360px; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 10px 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .download-main { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: none; }
  .metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: none; border-bottom: 1px solid var(--border); }
}
