/* ============================================================
   TSUNAMI — Design System v3
   Mobile-first. One breakpoint (900px). No orbs, no heavy blur.
   Shared by index.html, terms.html, privacy.html
   ============================================================ */

:root {
    /* Brand */
    --blue: #2F7DFF;
    --blue-deep: #0066FF;
    --cyan: #00D9FF;
    --grad-brand: linear-gradient(100deg, #2F7DFF 0%, #00D9FF 100%);

    /* Surfaces */
    --ink-950: #060B14;
    --ink-900: #0A1220;
    --ink-800: #101B2E;
    --ink-750: #14213A;
    --line: rgba(148, 178, 255, 0.14);
    --line-strong: rgba(148, 178, 255, 0.26);

    /* Text */
    --text: #E9EFF8;
    --text-soft: #C3CFE0;
    --muted: #93A2B8;

    --success: #34D399;

    /* Type */
    --font-display: 'Archivo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Rhythm */
    --container: 1140px;
    --gutter: clamp(20px, 5vw, 48px);
    --section-pad: clamp(64px, 10vw, 112px);
    --radius: 16px;
    --radius-lg: 24px;

    --header-h: 84px;

    --shadow-card: 0 10px 30px rgba(3, 8, 18, 0.45);
    --shadow-glow: 0 8px 40px rgba(0, 132, 255, 0.22);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--ink-950);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* Static ambient backdrop — painted once, no animation, no blur filters */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1000px 520px at 82% -8%, rgba(0, 120, 255, 0.16), transparent 65%),
        radial-gradient(820px 460px at -12% 22%, rgba(0, 217, 255, 0.07), transparent 60%),
        var(--ink-950);
}

img, svg, video { display: block; max-width: 100%; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Signature: the tideline — brand gradient rule */
.tideline {
    height: 2px;
    border: 0;
    background: var(--grad-brand);
    opacity: 0.85;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(6, 11, 20, 0.92);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
}

.site-header::after {
    /* tideline pinned under the header */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.site-header.is-scrolled::after { opacity: 0.9; }

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand img {
    height: 66px;
    width: auto;
}

/* Hamburger — 48px tap target, precise position */
.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    margin-right: -8px;
    background: none;
    border: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu: full-width sheet under the header */
.site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
}

.site-nav.is-open { display: block; }

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.nav-links a {
    display: block;
    padding: 14px 4px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-soft);
    border-bottom: 1px solid var(--line);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    text-decoration: none;
}

.nav-cta {
    display: inline-flex;
    margin-top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    min-height: 48px;
    padding: 14px 26px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    color: #fff;
    background: var(--grad-brand);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-primary svg { transition: transform 0.15s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-large {
    font-size: 17px;
    min-height: 54px;
    padding: 16px 32px;
}

.btn-ghost {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line-strong);
}

.btn-ghost:hover { border-color: var(--cyan); }

/* ---------- Type helpers ---------- */
.eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 14px;
}

.gradient-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-header {
    max-width: 680px;
    margin: 0 auto clamp(36px, 6vw, 56px);
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin-bottom: 14px;
}

.section-subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--muted);
}

section { padding-block: var(--section-pad); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding-top: calc(var(--header-h) + clamp(48px, 9vw, 96px));
    padding-bottom: 0;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: min(100%, 100vh);
    z-index: 0;
    pointer-events: none;
}

.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}

.hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 11, 20, 0.2) 0%, rgba(6, 11, 20, 0.55) 60%, var(--ink-950) 100%);
}

.hero > .container,
.hero .wave-divider {
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    gap: clamp(40px, 6vw, 64px);
    padding-bottom: clamp(56px, 8vw, 88px);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px;
    margin-bottom: 22px;
}

.hero-badge svg { color: var(--cyan); flex-shrink: 0; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(38px, 7.5vw, 64px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 17.5px);
    color: var(--text-soft);
    max-width: 56ch;
    margin-bottom: 30px;
}

.hero-subtitle + .hero-subtitle { margin-top: -16px; }

.qualify-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--cyan);
    margin-bottom: 12px;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-soft);
}

.trust-item svg { color: var(--success); flex-shrink: 0; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(20, 33, 58, 0.75), rgba(16, 27, 46, 0.75));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow-card);
}


.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--cyan);
    background: rgba(0, 217, 255, 0.09);
    border: 1px solid rgba(0, 217, 255, 0.22);
    margin-bottom: 14px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
}

/* Hero wave divider — signature brand moment */
.wave-divider {
    display: block;
    width: 100%;
    height: clamp(48px, 8vw, 110px);
    color: var(--ink-900);
}

/* ---------- Cards & grids ---------- */
.alt-band { background: var(--ink-900); }

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.card {
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    color: var(--cyan);
    background: rgba(0, 217, 255, 0.09);
    border: 1px solid rgba(0, 217, 255, 0.22);
    margin-bottom: 18px;
}

.card h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card p { font-size: 15.5px; color: var(--muted); }

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.service-card { position: relative; padding: 30px 26px; }

.service-number {
    position: absolute;
    top: 22px;
    right: 24px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.service-card .icon-chip { width: 52px; height: 52px; }

.service-card h3 { font-size: 21px; }

.service-features {
    list-style: none;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.service-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: var(--text-soft);
}

.service-features svg {
    color: var(--success);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Process */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
}

.process-step {
    position: relative;
    padding: 0 0 28px 58px;
}

.process-step:last-child { padding-bottom: 0; }

/* vertical connector on mobile */
.process-step::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: 4px;
    width: 2px;
    background: linear-gradient(180deg, var(--line-strong), var(--line));
}

.process-step:last-child::before { display: none; }

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    background: var(--grad-brand);
    box-shadow: var(--shadow-glow);
}

.process-step h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    padding-top: 7px;
    margin-bottom: 8px;
}

.process-step p { font-size: 15.5px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta-panel {
    position: relative;
    text-align: center;
    background:
        radial-gradient(600px 300px at 50% -40%, rgba(0, 150, 255, 0.22), transparent 70%),
        var(--ink-800);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: clamp(40px, 7vw, 72px) clamp(24px, 5vw, 64px);
    overflow: hidden;
}

.cta-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-brand);
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 4.5vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin-bottom: 14px;
}

.cta-text {
    max-width: 60ch;
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: clamp(15.5px, 2vw, 17px);
}

.cta-guarantee {
    margin-top: 22px;
    font-size: 14.5px;
    color: var(--text-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
}

.cta-guarantee span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cta-guarantee svg { color: var(--success); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ink-900);
    border-top: 1px solid var(--line);
    padding: clamp(48px, 7vw, 72px) 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--line);
}

.footer-brand img {
    height: 80px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    max-width: 44ch;
    font-size: 15px;
    color: var(--muted);
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.footer-col ul { list-style: none; }

.footer-col a {
    display: inline-block;
    padding: 8px 0;
    font-size: 15px;
    color: var(--text-soft);
}

.footer-col a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
    padding-top: 26px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ---------- Scroll to top ---------- */
.scroll-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--ink-800);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover { border-color: var(--cyan); }

/* ---------- Legal pages ---------- */
.page-hero {
    padding-top: calc(var(--header-h) + clamp(48px, 8vw, 88px));
    padding-bottom: clamp(40px, 6vw, 64px);
    text-align: center;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 6vw, 52px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 14px;
}

.page-description {
    max-width: 56ch;
    margin: 0 auto;
    color: var(--muted);
    font-size: clamp(15.5px, 2vw, 17px);
}

.legal-body { padding-top: 0; }

.legal-container {
    max-width: 820px;
    margin-inline: auto;
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(26px, 5vw, 56px);
    box-shadow: var(--shadow-card);
}

.content-block { margin-bottom: 38px; }
.content-block:last-child { margin-bottom: 0; }

.content-block h2 {
    font-family: var(--font-display);
    font-size: clamp(19px, 2.6vw, 23px);
    font-weight: 700;
    line-height: 1.3;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

/* neutralize the old emoji spans if any remain */
.content-block h2 span { display: none; }

.content-block h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    margin: 22px 0 8px;
}

.content-block p {
    font-size: 15.5px;
    color: var(--text-soft);
    margin-bottom: 12px;
}

.content-block ul {
    margin: 0 0 12px 20px;
    color: var(--text-soft);
    font-size: 15.5px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.content-block a { word-break: break-word; }

.highlight-box,
.warning-box {
    border-radius: 12px;
    padding: 16px 18px;
    margin: 16px 0;
    border: 1px solid;
}

.highlight-box {
    background: rgba(0, 150, 255, 0.07);
    border-color: rgba(47, 125, 255, 0.3);
}

.warning-box {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.3);
}

.highlight-box p:last-child,
.warning-box p:last-child { margin-bottom: 0; }

/* ---------- Desktop (single breakpoint) ---------- */
@media (min-width: 900px) {
    :root { --header-h: 96px; }

    .brand img { height: 76px; }

    .site-header {
        background: rgba(6, 11, 20, 0.78);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    .menu-toggle { display: none; }

    .site-nav {
        position: static;
        display: flex;
        align-items: center;
        gap: 8px;
        background: none;
        border: 0;
        padding: 0;
    }

    .nav-links {
        flex-direction: row;
        gap: 4px;
    }

    .nav-links a {
        padding: 10px 14px;
        font-size: 15px;
        border-bottom: 0;
        border-radius: 8px;
    }

    .nav-links a:hover { background: rgba(148, 178, 255, 0.08); }

    .nav-links a.active { color: var(--cyan); }

    .nav-cta { margin: 0 0 0 12px; }

    .hero-media { height: 100%; }

    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
    }

    .features-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }

    .services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }

    .process-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 28px;
    }

    .process-step { padding: 58px 0 0; }

    /* horizontal connector on desktop */
    .process-step::before {
        left: 52px;
        right: -28px;
        top: 19px;
        bottom: auto;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, var(--line-strong), var(--line));
    }

    .footer-grid { grid-template-columns: 1.3fr 1fr; }

    .footer-columns { grid-template-columns: 1fr 1fr; gap: 40px; }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .scroll-top { right: 28px; bottom: 28px; }
}

/* ---------- Motion & preference safety ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .hero-media { display: none !important; }
}
