/* ============================================================
   Thalassys — design system
   Aligned with demonstration.thalassys.net (navy + blue→violet).
   ============================================================ */
:root {
    --bg:        #070b14;   /* page background        */
    --bg-2:      #0b1220;   /* deeper panels          */
    --surface:   #0f1726;   /* cards                  */
    --surface-2: #141f33;   /* raised cards           */
    --fg:        #eaf1fb;   /* primary text           */
    --fg-dim:    rgba(234,241,251,0.66);  /* body text */
    --fg-faint:  rgba(234,241,251,0.34);  /* labels    */
    --rule:      rgba(255,255,255,0.08);  /* hairlines */
    --accent:    #5b9dff;   /* primary blue           */
    --accent-2:  #8b5cf6;   /* violet (gradient pair) */
    --signal:    #7fe3d2;   /* cyan — HUD numbers      */
    --grad:      linear-gradient(120deg, #5b9dff, #8b5cf6);

    --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --display: 'Space Grotesk', system-ui, -apple-system, "Segoe UI", sans-serif;
    --body:    'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius: 12px;
    --radius-sm: 8px;
    --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #8fbcff; }

img { max-width: 100%; }

h1, h2, h3, h4 {
    font-family: var(--display);
    color: var(--fg);
    margin: 0 0 .6em;
    line-height: 1.1;
    font-weight: 600;
}
h1 { font-size: clamp(40px, 6vw, 86px); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -.02em; }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
small { color: var(--fg-dim); font-weight: 400; font-size: .9rem; }

/* gradient-clipped emphasis word */
.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ─── Motifs ─────────────────────────────────────────────── */
/* faint fractal-noise grain over the whole page */
.grain {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: .035; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* reveal-on-scroll — only hidden when JS is available (graceful no-JS fallback) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ─── Layout primitives ──────────────────────────────────── */
.section { padding: 104px 24px; position: relative; }
.section + .section { border-top: 1px solid var(--rule); }
.section.bg-dim { background: var(--bg-2); }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-inner.center { text-align: center; }

.eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--accent);
    margin-bottom: 1.1rem;
}
.eyebrow .dash { color: var(--fg-faint); }

.lede {
    font-weight: 300;
    font-size: clamp(16.5px, 1.4vw, 18px);
    color: var(--fg-dim);
    max-width: 62ch;
    margin: 0 0 1rem;
    line-height: 1.65;
}
.lede.center { margin-left: auto; margin-right: auto; }

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 60;
    background: rgba(7, 11, 20, .72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
}
.navbar-inner {
    max-width: var(--max); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 24px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--fg); }
.brand-logo { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.nav-links a {
    color: var(--fg-dim); font-size: .92rem; font-weight: 500;
    padding: .3rem 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.lang-switcher { margin: 0; }
.lang-switcher select {
    background: var(--surface); color: var(--fg);
    border: 1px solid var(--rule); border-radius: var(--radius-sm);
    padding: .4rem .55rem; font-size: .8rem; cursor: pointer;
    font-family: var(--mono); letter-spacing: .06em;
}
.nav-toggle {
    display: none; background: transparent; border: 1px solid var(--rule);
    border-radius: var(--radius-sm); color: var(--fg); cursor: pointer;
    width: 40px; height: 38px; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: 13px 26px; border-radius: var(--radius-sm);
    font-family: var(--body); font-weight: 600; font-size: .95rem;
    border: 1px solid transparent; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: var(--grad); color: #fff;
    box-shadow: 0 6px 22px rgba(91,157,255,.28);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 30px rgba(91,157,255,.4); }
.btn-ghost {
    background: rgba(255,255,255,.04); border-color: var(--rule); color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--fg); }
.btn-nav { padding: 9px 16px; font-size: .85rem; }

/* ─── Hero (shared, secondary pages) ─────────────────────── */
.hero {
    position: relative; overflow: hidden;
    padding: 120px 24px 92px;
    border-bottom: 1px solid var(--rule);
    background:
        radial-gradient(820px circle at 18% 8%, rgba(91,157,255,.16), transparent 42%),
        radial-gradient(720px circle at 82% 14%, rgba(139,92,246,.15), transparent 44%),
        linear-gradient(180deg, var(--bg-2), var(--bg) 70%);
}
.hero-inner { max-width: var(--max); margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero-cta { margin-top: 2.4rem; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.cta-section {
    text-align: center;
    background:
        radial-gradient(680px circle at 50% 40%, rgba(139,92,246,.16), transparent 60%),
        var(--bg-2);
}

/* ─── Grids ──────────────────────────────────────────────── */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }

/* ─── Cards ──────────────────────────────────────────────── */
.card, .step, .plan, .bullet {
    background: var(--surface); border: 1px solid var(--rule);
    border-radius: var(--radius); padding: 1.6rem;
    transition: transform .2s ease, border-color .2s ease;
}
.card:hover, .bullet:hover { transform: translateY(-4px); border-color: var(--accent); }
.card h3, .bullet h4 { color: var(--fg); }
.card p, .step p, .bullet p { color: var(--fg-dim); margin: 0; }

/* feature icon (46px rounded gradient square) */
.feat-icon {
    width: 46px; height: 46px; border-radius: 11px;
    background: var(--grad); display: inline-flex;
    align-items: center; justify-content: center; margin-bottom: 1.1rem;
    box-shadow: 0 6px 18px rgba(91,157,255,.25);
}
.feat-icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.7; }

/* numbered steps */
.step { position: relative; padding-left: 4.2rem; }
.step h3 { color: var(--fg); }
.step-num {
    position: absolute; left: 1.4rem; top: 1.5rem;
    width: 2.1rem; height: 2.1rem; display: inline-flex;
    align-items: center; justify-content: center;
    background: var(--grad); color: #fff;
    border-radius: 9px; font-weight: 700; font-family: var(--mono);
}

/* ─── Plans (pricing) ────────────────────────────────────── */
.plan { display: flex; flex-direction: column; gap: .7rem; position: relative; }
.plan:hover { transform: translateY(-4px); border-color: var(--accent); }
.plan h3 { font-size: 1.5rem; margin: .3rem 0; }
.plan-highlight {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 16px 40px rgba(91,157,255,.16);
}
.badge {
    display: inline-block; padding: .22rem .65rem;
    background: rgba(91,157,255,.14); color: var(--accent);
    border: 1px solid rgba(91,157,255,.28);
    border-radius: 999px; font-size: .72rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; font-family: var(--mono);
}
.badge-alt { background: rgba(139,92,246,.16); color: #b39bff; border-color: rgba(139,92,246,.3); }
.badge-premium { background: rgba(127,227,210,.14); color: var(--signal); border-color: rgba(127,227,210,.3); }
.plan-desc { color: var(--fg-dim); font-size: .92rem; }
.plan-features { list-style: none; padding: 0; margin: 0 0 1rem; }
.plan-features li { padding: .45rem 0; border-bottom: 1px solid var(--rule); font-size: .9rem; color: var(--fg-dim); }
.plan-features li:last-child { border-bottom: none; }
.price { font-size: 2rem; font-weight: 700; font-family: var(--display); color: var(--fg); margin-top: auto; }
.price span { font-size: .9rem; font-weight: 400; color: var(--fg-dim); }
.price-yearly { color: var(--fg-faint); font-size: .85rem; font-family: var(--mono); }

.callout {
    margin-top: 2.6rem; padding: 1.6rem;
    background: var(--surface-2); border: 1px solid var(--rule);
    border-left: 3px solid var(--accent); border-radius: var(--radius);
}
.callout strong { color: var(--fg); display: block; margin-bottom: .4rem; }
.callout .muted { color: var(--fg-dim); font-size: .85rem; margin: 0; }

.addon-price { margin-top: .8rem; font-weight: 600; color: var(--fg); font-family: var(--display); }
.addon-price span { font-size: .8rem; color: var(--fg-dim); font-weight: 400; font-family: var(--body); }

.bullet h4 { margin: 0 0 .4rem; }
.muted { color: var(--fg-dim); }
.center { text-align: center; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--rule);
    background: var(--bg-2);
    padding: 3.4rem 24px 1.6rem;
    position: relative; z-index: 2;
}
.footer-inner {
    max-width: var(--max); margin: 0 auto;
    display: grid; gap: 2rem;
    grid-template-columns: 1.4fr repeat(3, 1fr);
}
.footer-col strong { display: block; margin-bottom: .7rem; color: var(--fg); font-family: var(--display); }
.footer-col a { display: block; color: var(--fg-dim); padding: .22rem 0; font-size: .9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { color: var(--fg-dim); font-size: .9rem; margin: 0; max-width: 34ch; }
.footer-bottom {
    max-width: var(--max); margin: 2.4rem auto 0;
    padding-top: 1.4rem; border-top: 1px solid var(--rule);
    color: var(--fg-faint); font-size: .82rem; text-align: center;
    font-family: var(--mono); letter-spacing: .04em;
}
.footer-bottom a { color: var(--fg-dim); }
.footer-bottom a:hover { color: var(--accent); }
.lang-list { color: var(--fg-dim); font-size: .9rem; font-family: var(--mono); }

/* ─── Forms ──────────────────────────────────────────────── */
.form-card {
    max-width: 640px; margin: 2.4rem auto 0;
    background: var(--surface); border: 1px solid var(--rule);
    padding: 2rem; border-radius: var(--radius);
}
.form-card label { display: block; margin: 1rem 0 .35rem; color: var(--fg-dim); font-size: .85rem; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.form-card input, .form-card textarea, .form-card select {
    width: 100%; padding: .75rem .9rem;
    background: var(--bg); color: var(--fg);
    border: 1px solid var(--rule); border-radius: var(--radius-sm);
    font-family: inherit; font-size: .95rem;
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,157,255,.18); }
.form-card textarea { min-height: 140px; resize: vertical; }
.form-card .form-actions { margin-top: 1.5rem; display: flex; justify-content: flex-end; }
.form-feedback { margin: 1rem 0; padding: 1rem; border-radius: var(--radius-sm); }
.form-feedback.ok { background: rgba(127,227,210,.1); border: 1px solid rgba(127,227,210,.3); color: var(--signal); }
.form-feedback.err { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #f87171; }

/* ─── Prose (legal / about) ──────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; color: var(--fg); line-height: 1.75; }
.prose h1 { margin-bottom: 1.4rem; }
.prose h2 { margin-top: 2.6rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.4rem; color: var(--fg-dim); }
.prose li { margin: .4rem 0; }
.prose p { color: var(--fg-dim); }

/* ─── Founders ───────────────────────────────────────────── */
.founders { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 2rem; }
.founder {
    background: var(--surface); border: 1px solid var(--rule);
    padding: 1.6rem; border-radius: var(--radius);
}
.founder h3 { color: var(--fg); margin-bottom: .2rem; }
.founder .role { color: var(--accent); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem; display: block; font-family: var(--mono); }
.founder p { color: var(--fg-dim); margin: 0; }

/* ─── Accessibility ──────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .section { padding: 72px 18px; }
    .hero { padding: 88px 18px 64px; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: flex-start; gap: 0;
        background: var(--bg-2); border-bottom: 1px solid var(--rule); padding: .5rem 24px 1rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
    .nav-toggle { display: inline-flex; order: 3; }
    .btn-nav { display: none; }
    .footer-inner { grid-template-columns: 1fr; }
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .btn:hover, .card:hover, .bullet:hover, .plan:hover { transform: none; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
