/* ============================================================
   DotAIOS — landing page (dark, Silicon-Valley dev-tool style)
   Gradient-mesh aurora hero, editorial serif (Fraunces) + Hanken
   Grotesk body + IBM Plex Mono, warm coral accent on near-black.
   Static: HTML + this CSS + ~1KB vanilla JS. No framework.
   ============================================================ */

:root {
  --bg:          #0a0a0b;
  --bg-soft:     #101012;
  --card:        #141417;
  --card-2:      #18181c;
  --border:      #262629;
  --border-bright:#3a3a40;
  --text:        #f5f3ef;
  --text-soft:   #a6a39c;
  --text-faint:  #6e6b65;

  --coral:       #ff7a4d;
  --coral-soft:  #ff9d78;
  --coral-deep:  #e85f30;

  --display: "Fraunces", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 24px 60px -30px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: -.015em; margin: 0; }
p { margin: 0; }
a { color: var(--coral-soft); text-decoration: none; }
a:hover { color: var(--coral); }
code, .mono { font-family: var(--mono); }
strong { color: var(--text); font-weight: 600; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--coral); color: #1a0d05; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 600; }
.skip-link:focus { left: 0; }

.muted { color: var(--text-faint); }
code { font-size: .9em; background: #ffffff10; border: 1px solid var(--border); padding: .08em .42em; border-radius: 6px; color: #e9e6df; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(10,10,11,.7); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 15px; height: 15px; border-radius: 4px; background: linear-gradient(135deg, var(--coral), var(--coral-deep)); box-shadow: 0 0 14px -2px var(--coral); }
.brand-name { font-family: var(--display); font-size: 1.2rem; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 26px); }
.nav-links > a { color: var(--text-soft); font-size: .92rem; font-weight: 500; }
.nav-links > a:hover { color: var(--text); }
.nav-cta { background: var(--text); color: var(--bg) !important; padding: 8px 16px; border-radius: 999px; font-weight: 600; transition: transform .15s ease, background .2s ease, box-shadow .2s ease; }
.nav-cta:hover { background: var(--coral); color: #1a0d05 !important; transform: translateY(-1px); box-shadow: 0 8px 26px -10px var(--coral); }
@media (max-width: 600px) { .nav-links > a:not(.nav-cta) { display: none; } }

/* ---------- mesh aurora ---------- */
.mesh {
  position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 55% at 72% 18%, #ff6b4a55 0%, transparent 60%),
    radial-gradient(36% 48% at 88% 30%, #d6409f4d 0%, transparent 62%),
    radial-gradient(46% 60% at 60% 8%, #7c5cff40 0%, transparent 60%),
    radial-gradient(40% 50% at 95% 8%, #f5a62340 0%, transparent 60%),
    radial-gradient(50% 60% at 80% 40%, #3b82f633 0%, transparent 65%);
  filter: blur(36px) saturate(135%);
  opacity: .9;
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-3%, 2%, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .mesh { animation: none; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 10vw, 120px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 72px); }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: .8rem; color: var(--text-soft); letter-spacing: .02em; margin: 0; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px #ff7a4d22, 0 0 12px var(--coral); }

h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); margin: 22px 0 0; max-width: 16ch; }
h1 .ital { font-style: italic; color: var(--coral); }

.lede { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.24rem); max-width: 60ch; color: var(--text-soft); }
.lede code { color: #f3efe8; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem; transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease; }
.btn-primary { background: var(--coral); color: #1a0d05 !important; box-shadow: 0 12px 36px -14px var(--coral); }
.btn-primary:hover { background: var(--coral-soft); transform: translateY(-2px); }
.btn-ghost { color: var(--text) !important; border: 1px solid var(--border-bright); background: #ffffff08; }
.btn-ghost:hover { border-color: var(--text-soft); background: #ffffff12; transform: translateY(-2px); }

/* hero card */
.hero-card { margin-top: 48px; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-width: 860px; }
.hero-card-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #ffffff06; border-bottom: 1px solid var(--border); }
.tdot { width: 10px; height: 10px; border-radius: 50%; background: #3a3a40; }
.tdot:nth-child(1) { background: var(--coral); }
.tpath { margin-left: 8px; font-family: var(--mono); font-size: .82rem; color: var(--text-soft); }
.tbadge { margin-left: auto; font-family: var(--mono); font-size: .7rem; color: var(--text-faint); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; }
.hero-card-body { display: grid; grid-template-columns: 1.3fr .9fr; gap: 0; }
@media (max-width: 720px) { .hero-card-body { grid-template-columns: 1fr; } }

.tree { list-style: none; margin: 0; padding: 18px 20px; font-family: var(--mono); font-size: .86rem; border-right: 1px solid var(--border); }
@media (max-width: 720px) { .tree { border-right: 0; border-bottom: 1px solid var(--border); } }
.tree li { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; color: var(--text); }
.tree li.indent { padding-left: 20px; }
.tree li.dir { color: var(--coral-soft); }
.tree li.dir::before { content: "▸"; color: var(--coral); font-size: .7em; }
.tree li.file::before { content: "·"; color: var(--text-faint); }
.tree li.indent::before { content: ""; }
.tree .ann { margin-left: auto; color: var(--text-faint); font-family: var(--sans); font-size: .76rem; }

.reads { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; gap: 12px; background: #00000030; }
.reads-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.agent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-chips span { font-size: .82rem; font-weight: 500; color: var(--text); background: #ffffff0a; border: 1px solid var(--border-bright); border-radius: 999px; padding: 6px 12px; }

/* ---------- agent cloud ---------- */
.cloud { max-width: var(--maxw); margin: 0 auto; padding: clamp(34px, 5vw, 52px) clamp(16px, 4vw, 40px); text-align: center; border-bottom: 1px solid var(--border); }
.cloud-label { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.cloud-row { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(16px, 4vw, 40px); }
.cloud-row li { font-family: var(--display); font-size: clamp(1.05rem, 2vw, 1.45rem); color: var(--text-soft); letter-spacing: -.01em; }
.cloud-row li .muted { font-family: var(--sans); font-size: .85rem; }

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 40px); }
.section.alt { max-width: none; background: var(--bg-soft); border-block: 1px solid var(--border); }
.section.alt > * { max-width: var(--maxw); margin-inline: auto; }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); margin: 0 0 16px; }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 18ch; }
.section-lede { margin-top: 18px; color: var(--text-soft); font-size: 1.1rem; max-width: 56ch; }

/* ---------- card grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } .grid-2 { grid-template-columns: 1fr; } }

.card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--border-bright); background: var(--card-2); }
.card-eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); }
.card h3 { font-size: 1.4rem; margin: 12px 0 10px; }
.card > p { color: var(--text-soft); font-size: .98rem; }
.card-figure { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border); font-size: .82rem; color: var(--text-soft); display: grid; gap: 6px; }
.card-figure.mono { font-family: var(--mono); }
.card-figure .add { color: var(--coral); } .card-figure .ok { color: #4ade80; } .card-figure .dim { color: var(--text-faint); }
.card-figure .cmd { color: var(--coral-soft); }

/* steps */
.step .step-n { font-family: var(--mono); font-size: .8rem; color: var(--text-faint); }
.step h3 { margin-top: 8px; }

/* ---------- statement band ---------- */
.statement { text-align: center; max-width: 900px; margin: 0 auto; padding: clamp(70px, 11vw, 150px) clamp(16px, 4vw, 40px); }
.statement > p:first-child { font-family: var(--display); font-size: clamp(1.8rem, 4.6vw, 3.4rem); line-height: 1.12; letter-spacing: -.02em; }
.statement .strike { color: var(--text-faint); text-decoration: line-through; text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.statement-sub { margin-top: 22px; color: var(--text-soft); font-size: 1.12rem; }

/* ---------- trust ---------- */
.trust-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: border-color .2s ease; }
.trust-item:hover { border-color: var(--border-bright); }
.trust-item h3 { font-size: 1.25rem; }
.trust-item p { color: var(--text-soft); font-size: .96rem; margin-top: 10px; }

/* ---------- install band ---------- */
.install-band { position: relative; overflow: hidden; border-block: 1px solid var(--border); background: var(--bg-soft); }
.mesh-2 { inset: auto -10% -40% -10%; height: 90%; opacity: .6; }
.install-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; padding: clamp(70px, 10vw, 130px) clamp(16px, 4vw, 40px); text-align: center; }
.install-inner h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-top: 6px; }
.install-sub { color: var(--text-soft); margin: 16px auto 26px; max-width: 52ch; }

/* snippet */
.snippet { display: flex; align-items: center; gap: 10px; background: #000000; border: 1px solid var(--border-bright); border-radius: 12px; padding: 12px 12px 12px 14px; text-align: left; }
.snippet code { background: none; border: 0; padding: 0; display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; font-size: .88rem; line-height: 1.45; color: #ece9e2; }
.snippet .prompt { color: var(--coral); font-weight: 600; flex: none; }
.snippet .snippet-text { overflow-wrap: anywhere; }
.snippet .copy { flex: none; cursor: pointer; font-family: var(--sans); font-size: .82rem; font-weight: 600; color: #1a0d05; background: var(--coral); border: 0; border-radius: 8px; padding: 8px 14px; transition: transform .12s ease, background .2s ease; }
.snippet .copy:hover { transform: translateY(-1px); background: var(--coral-soft); }
.snippet .copy.copied { background: #4ade80; color: #07210f; }
.snippet-lg { max-width: 640px; margin: 0 auto; }
.snippet-sm { margin-top: 10px; }
.snippet-sm code { font-size: .84rem; }

.terminal-alt { margin-top: 20px; }
.terminal-alt summary { cursor: pointer; color: var(--text-soft); font-size: .92rem; font-weight: 500; list-style: none; display: inline-block; }
.terminal-alt summary::-webkit-details-marker { display: none; }
.terminal-alt summary::before { content: "+ "; color: var(--coral); font-family: var(--mono); }
.terminal-alt[open] summary::before { content: "– "; }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 20px; transition: border-color .2s ease; }
.faq details[open] { border-color: var(--border-bright); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--display); font-size: 1.15rem; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--coral); font-size: 1.3rem; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 0 18px; color: var(--text-soft); font-size: .98rem; }

/* ---------- final cta ---------- */
.final-cta { text-align: center; max-width: 820px; margin: 0 auto; padding: clamp(70px, 10vw, 130px) clamp(16px, 4vw, 40px); }
.final-cta h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); max-width: 18ch; margin-inline: auto; }
.final-cta .hero-actions { justify-content: center; margin-top: 28px; }
.final-cta .muted { margin-top: 20px; font-size: .92rem; }

/* ---------- footer ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--border); display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; max-width: var(--maxw); margin: 0 auto; padding: clamp(44px, 6vw, 68px) clamp(16px, 4vw, 40px); }
@media (max-width: 760px) { .footer { grid-template-columns: 1fr 1fr; } .footer-lead { grid-column: 1 / -1; } }
.footer-lead { display: flex; flex-direction: column; gap: 12px; max-width: 34ch; }
.footer-lead .brand-name { font-size: 1.25rem; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col b { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); font-weight: 600; margin-bottom: 3px; }
.footer-col a { color: var(--text-soft); font-size: .92rem; }
.footer-col a:hover { color: var(--coral); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero-inner .reveal:nth-child(1) { transition-delay: .03s; }
.js .hero-inner .reveal:nth-child(2) { transition-delay: .09s; }
.js .hero-inner .reveal:nth-child(3) { transition-delay: .15s; }
.js .hero-inner .reveal:nth-child(4) { transition-delay: .21s; }
.js .hero-inner .reveal:nth-child(5) { transition-delay: .27s; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
