/* Empire OS — marketing page. Parchment design language: the same colour
   system, type pairing, and restraint as the product itself. */

:root {
    --background: #F6F4F0;
    --surface: #FFFFFF;
    --surface-subtle: #FAF9F6;
    --border: #ECEAE5;
    --border-subtle: #F5F3EF;
    --text-primary: #2A2A28;
    --text-secondary: #4A4A48;
    --text-tertiary: #8A8A85;
    --text-muted: #B0ADA6;
    --header-bg: #211F1D;
    --header-text: #E8E4DC;
    --green: #5C6B4F;
    --green-bright: #8BA879;
    --blue: #3D5A73;
    --clay: #A0714F;
    --plum: #6B5A7B;
    --error: #A85454;
    --honey: #C0923A;

    --display: "Cormorant Garamond", Georgia, serif;
    --body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;

    --radius: 14px;
    --radius-sm: 8px;
    --max: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--body);
    background: var(--background);
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--text-primary); font-weight: 600; }
h1, h2 { font-family: var(--display); }

a { color: inherit; }

/* ---------- Reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Nav ---------- */

.nav {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--background) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px;
}
.wordmark {
    font-family: var(--display); font-weight: 700; font-size: 20px;
    color: var(--text-primary); letter-spacing: .3px;
}
.wordmark .crown { color: var(--green); font-size: 17px; }
.wordmark.small { font-size: 17px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
    text-decoration: none; font-size: 13.5px; font-weight: 500;
    color: var(--text-tertiary); transition: color .15s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
    color: var(--header-text) !important; background: var(--text-primary);
    padding: 7px 16px; border-radius: 9px;
}
.nav-cta:hover { background: #000; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    max-width: var(--max); margin: 0 auto;
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px;
    align-items: center; padding: 88px 28px 96px;
}
.hero-glow {
    position: absolute; inset: -120px -300px 0;
    background:
        radial-gradient(640px 420px at 72% 38%, rgba(92, 107, 79, .10), transparent 70%),
        radial-gradient(520px 380px at 18% 18%, rgba(107, 90, 123, .07), transparent 70%);
    pointer-events: none;
}
.trust-word { position: relative; display: inline-block; }
.trust-underline {
    position: absolute; left: -2%; bottom: -6px; width: 104%; height: 12px;
    color: var(--green); opacity: .8;
}
.trust-underline path {
    stroke-dasharray: 130; stroke-dashoffset: 130;
    animation: draw-line 1s ease .7s forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.eyebrow {
    font-size: 11px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px;
}
.eyebrow.light { color: rgba(232, 228, 220, .45); }
.hero h1 {
    font-size: clamp(40px, 5.2vw, 58px); line-height: 1.06;
    font-weight: 600; letter-spacing: -.5px; margin-bottom: 22px;
}
.hero h1 em { font-style: italic; color: var(--green); }
.lede { font-size: 17.5px; color: var(--text-secondary); max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }

.btn-primary {
    display: inline-block; text-decoration: none;
    background: var(--text-primary); color: var(--header-text);
    font-weight: 600; font-size: 14.5px;
    padding: 13px 26px; border-radius: 11px;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 8px 24px rgba(42, 42, 40, .18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(42, 42, 40, .24); }
.btn-light { background: var(--header-text); color: var(--header-bg); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.btn-ghost {
    text-decoration: none; font-weight: 500; font-size: 14.5px;
    color: var(--text-tertiary); padding: 13px 10px;
}
.btn-ghost:hover { color: var(--text-primary); }
.hero-fineprint { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Hero mock dashboard ---------- */

.hero-visual { display: flex; justify-content: center; position: relative; }
.mock-window {
    width: 100%; max-width: 430px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 30px 70px rgba(42, 42, 40, .14), 0 4px 16px rgba(42, 42, 40, .06);
    overflow: hidden;
    transform: rotate(1.2deg);
}
.floaty { animation: floaty 7s ease-in-out infinite; }
.floaty.d2 { animation-delay: -3.2s; }
@keyframes floaty {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -9px; }
}

/* Menu-bar popover peeking over the window */
.mock-menubar {
    position: absolute; right: -8px; top: -26px; width: 168px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 13px;
    box-shadow: 0 18px 44px rgba(42, 42, 40, .16);
    transform: rotate(-2deg);
    display: flex; flex-direction: column; gap: 8px;
}
.mock-menubar-head {
    font-size: 8px; font-weight: 700; letter-spacing: 1.6px;
    color: var(--text-muted);
}
.mock-menubar-head .crown-sm { color: var(--green); margin-right: 2px; }
.mock-titlebar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); }
.mock-titlebar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.mock-briefing {
    display: flex; gap: 12px; background: var(--surface-subtle);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px; overflow: hidden; position: relative;
}
.mock-briefing-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--plum); }
.mock-briefing-copy { flex: 1; padding-left: 6px; }
.mock-label { font-size: 8.5px; font-weight: 700; letter-spacing: 1.4px; color: var(--plum); margin-bottom: 8px; }

.mock-line { height: 7px; border-radius: 4px; background: var(--border); margin-bottom: 7px; }
.w90 { width: 90%; } .w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; } .w50 { width: 50%; }

.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-card {
    background: var(--tint); border-radius: var(--radius-sm);
    padding: 12px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
}
.mock-mono {
    font-family: var(--display); font-weight: 700; font-size: 13px;
    color: var(--accent); background: rgba(255, 255, 255, .55);
    width: 26px; height: 26px; border-radius: 7px;
    display: grid; place-items: center;
}
@property --p {
    syntax: "<number>";
    inherits: false;
    initial-value: 0;
}
.mock-arc {
    --p: 0;
    width: 34px; height: 34px; border-radius: 50%;
    background:
        radial-gradient(closest-side, var(--tint) 72%, transparent 73% 100%),
        conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,.6) 0);
}
.mock-arc.draw { animation: arc-draw 1.4s cubic-bezier(.2,.7,.3,1) .5s forwards; }
.mock-arc.draw.d2 { animation-delay: .75s; }
.mock-arc.draw.d3 { animation-delay: 1s; }
@keyframes arc-draw { to { --p: var(--pct, 88); } }
.mock-card .mock-line { background: rgba(255, 255, 255, .65); margin: 0; }
.mock-card.lift { transition: transform .25s ease; }
.mock-window:hover .mock-card.lift { transform: translateY(-2px); }

.mock-feed { display: flex; flex-direction: column; gap: 9px; padding: 4px 2px 2px; }
.mock-feed-row { display: flex; align-items: center; gap: 9px; }
.mock-feed-row .mock-line { margin: 0; }
.pop { opacity: 0; animation: pop-in .5s ease forwards; }
.pop.d1 { animation-delay: 1.1s; } .pop.d2 { animation-delay: 1.35s; } .pop.d3 { animation-delay: 1.6s; }
@keyframes pop-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--green-bright); }
.dot.info { background: var(--blue); }
.dot.warn { background: var(--error); }
.dot.pulse { animation: dot-pulse 2.6s ease-in-out infinite; }
@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
    40% { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent); }
}
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.75) 50%, transparent 70%);
    translate: -100% 0; animation: shimmer 3.4s ease-in-out infinite;
}
.shimmer.d2::after { animation-delay: .5s; }
@keyframes shimmer { 60%, 100% { translate: 100% 0; } }

/* ---------- Marquee ---------- */

.marquee {
    border-block: 1px solid var(--border);
    background: var(--surface-subtle);
    overflow: hidden; padding: 13px 0;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
    display: flex; gap: 34px; align-items: center; width: max-content;
    animation: marquee 36s linear infinite;
}
.marquee-track span {
    font-size: 12px; font-weight: 600; letter-spacing: 1.6px;
    text-transform: uppercase; color: var(--text-muted); white-space: nowrap;
}
.marquee-track i { font-style: normal; color: var(--green); opacity: .5; font-size: 11px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Terminal ---------- */

.terminal {
    margin-top: 38px;
    background: #161513; border: 1px solid rgba(232, 228, 220, .12);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.4);
    max-width: 640px;
}
.terminal-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 11px 14px; border-bottom: 1px solid rgba(232, 228, 220, .08);
}
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(232, 228, 220, .14); }
.terminal-bar em {
    font-style: normal; margin-left: 10px;
    font-size: 11px; letter-spacing: 1px; color: rgba(232, 228, 220, .35);
}
.terminal-body {
    padding: 18px 20px; min-height: 218px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12.5px; line-height: 1.75;
    white-space: pre-wrap; color: rgba(232, 228, 220, .7);
}
.terminal-body .caret {
    display: inline-block; width: 7px; height: 13px;
    background: var(--green-bright); vertical-align: -2px;
    animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.tl-cmd { color: var(--header-text); font-weight: 600; }
.tl-tool { color: rgba(232, 228, 220, .5); }
.tl-ok { color: var(--green-bright); }
.tl-diff { color: #D2A958; }
.tl-dim { color: rgba(232, 228, 220, .38); font-style: italic; }

/* ---------- Stats ---------- */

.stats {
    max-width: var(--max); margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; padding: 0 28px 92px;
}
.stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 26px 24px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(42, 42, 40, .10); }
.stat-num {
    font-family: var(--display); font-weight: 700;
    font-size: 44px; line-height: 1; color: var(--green); margin-bottom: 10px;
}
.stat-label { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; }

/* ---------- Dark bands ---------- */

.band { background: var(--header-bg); color: rgba(232, 228, 220, .72); }
.band-inner { max-width: var(--max); margin: 0 auto; padding: 84px 28px; }
.band-title {
    font-size: clamp(28px, 3.6vw, 40px); color: var(--header-text);
    line-height: 1.15; margin-bottom: 18px; max-width: 760px;
}
.band-title .dim { color: rgba(232, 228, 220, .42); }
.band-text { font-size: 16.5px; max-width: 640px; }
.band-text strong { color: var(--header-text); }
.accent-green { color: var(--green-bright); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em; }

/* ---------- Sections ---------- */

.section { max-width: var(--max); margin: 0 auto; padding: 92px 28px; }
.section > h2 { font-size: clamp(30px, 3.8vw, 42px); margin-bottom: 44px; }
.section-tint { max-width: none; background: var(--surface-subtle); border-block: 1px solid var(--border); }
.section-tint .local { max-width: var(--max); margin: 0 auto; padding: 0 0; }

/* Concepts */
.concepts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px; margin-bottom: 64px;
}
.concept {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px 18px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.concept:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(42, 42, 40, .10);
    border-color: color-mix(in srgb, var(--text-muted) 50%, var(--border));
}
.concept-mono {
    font-family: var(--display); font-weight: 700; font-size: 15px;
    color: var(--accent); background: var(--tint);
    width: 36px; height: 36px; border-radius: 9px;
    display: grid; place-items: center; margin-bottom: 14px;
}
.concept h3 { font-size: 15.5px; margin-bottom: 7px; }
.concept p { font-size: 13.5px; color: var(--text-tertiary); line-height: 1.55; }

/* Loop */
.loop {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 34px 38px;
}
.loop-title { font-family: var(--display); font-size: 23px; margin-bottom: 18px; }
.loop-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.loop-steps li { counter-increment: step; font-size: 14px; color: var(--text-tertiary); }
.loop-steps li::before {
    content: counter(step);
    display: grid; place-items: center;
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--border); color: var(--text-secondary);
    font-weight: 600; font-size: 12.5px; margin-bottom: 10px;
    background: var(--surface-subtle);
}
.loop-steps strong { color: var(--text-primary); display: block; margin-bottom: 3px; }

/* Trust grid */
.trust-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px; margin-top: 40px;
}
.trust-item {
    border: 1px solid rgba(232, 228, 220, .12);
    border-radius: var(--radius-sm); padding: 20px 22px;
    background: rgba(255, 255, 255, .025);
}
.trust-item h4 { color: var(--header-text); font-size: 14.5px; font-weight: 600; margin-bottom: 7px; }
.trust-item p { font-size: 13.5px; line-height: 1.55; color: rgba(232, 228, 220, .55); }

/* Surfaces */
.surface-list { display: flex; flex-direction: column; gap: 12px; }
.surface {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 26px 30px;
    border-left: 3px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, border-left-color .2s ease;
}
.surface:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 34px rgba(42, 42, 40, .08);
    border-left-color: var(--accent, var(--green));
}
.surface h3 { font-family: var(--display); font-size: 22px; margin-bottom: 6px; }
.surface p { font-size: 14.5px; color: var(--text-tertiary); max-width: 720px; }
.surface-tag {
    flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px;
    text-transform: uppercase; color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    padding: 5px 12px; border-radius: 999px; margin-top: 6px;
}

/* Local-first */
.local {
    display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px;
    align-items: center; padding: 92px 28px !important;
}
.local h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 16px; }
.local-text { font-size: 15.5px; color: var(--text-tertiary); max-width: 540px; }
.local-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.local-list li {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 13px 18px;
    font-size: 14px; color: var(--text-secondary); font-weight: 500;
}
.local-list li::before { content: "✓  "; color: var(--green); font-weight: 700; }

/* AI settings mock */
.ai-mock {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px 24px;
    box-shadow: 0 20px 50px rgba(42, 42, 40, .10);
    display: flex; flex-direction: column; gap: 13px;
    max-width: 360px; justify-self: end; width: 100%;
}
.ai-mock-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
    color: var(--text-muted); margin-bottom: 2px;
}
.ai-mock-row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13.5px; color: var(--text-secondary); font-weight: 500;
    padding-bottom: 12px; border-bottom: 1px solid var(--border-subtle);
}
.ai-mock-row:last-child { border-bottom: none; padding-bottom: 0; }
.ai-pill {
    font-size: 11.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}
.ai-pill.claude { color: var(--clay); background: color-mix(in srgb, var(--clay) 12%, transparent); }
.ai-pill.gemini { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.ai-cost {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px; color: var(--green); font-weight: 600;
}

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq details {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 18px 22px;
}
.faq summary {
    cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text-primary);
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: "+"; color: var(--text-muted); font-size: 19px; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; font-size: 14px; color: var(--text-tertiary); }

/* CTA + footer */
.cta .band-inner { text-align: center; padding: 96px 28px; }
.cta .band-text { margin: 0 auto 30px; }
.footer { border-top: 1px solid var(--border); }
.footer-inner {
    max-width: var(--max); margin: 0 auto; padding: 28px;
    display: flex; align-items: center; justify-content: space-between;
}
.footer p { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; padding-top: 56px; gap: 44px; }
    .hero-visual { order: 2; }
    .mock-window { transform: none; }
    .mock-menubar { right: 4px; top: -18px; }
    .local { grid-template-columns: 1fr; gap: 32px; }
    .nav-links a:not(.nav-cta) { display: none; }
    .surface { flex-direction: column; gap: 10px; }
    .surface-tag { margin-top: 0; }
}

/* All theatre off under reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .floaty, .pop, .dot.pulse, .shimmer::after, .marquee-track,
    .mock-arc.draw, .trust-underline path, .terminal-body .caret {
        animation: none !important;
    }
    .pop { opacity: 1; }
    .mock-arc { --p: var(--pct, 88); }
    .trust-underline path { stroke-dashoffset: 0; }
    .concept:hover, .surface:hover, .stat:hover { transform: none; }
}
