/* ==========================================================================
   Strata Markets SFUNA Inc. — design system
   --------------------------------------------------------------------------
   Deep institutional navy, a single restrained emerald accent, and a serif
   display face. The old build leaned on neon glow; the look here is meant to
   read like a firm that holds money rather than a landing page that wants it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    /* Surfaces — a deliberate ladder, not arbitrary greys */
    --ink-950: #05080F;
    --ink-900: #080D18;
    --ink-850: #0C1322;
    --ink-800: #111A2C;
    --ink-750: #16223A;
    --ink-700: #1D2C49;

    --line:      #1B2740;
    --line-soft: rgba(255, 255, 255, .06);
    --line-hard: rgba(255, 255, 255, .12);

    --text:   #E9EEF7;
    --text-2: #97A6BE;
    --text-3: #63728C;

    /* Brand — emerald, used sparingly enough that it still means something */
    --brand:      #10B981;
    --brand-lift: #34D399;
    --brand-deep: #0A7D57;
    --brand-ink:  #03150E;
    --brand-soft: rgba(16, 185, 129, .10);
    --brand-edge: rgba(16, 185, 129, .28);

    --gold:      #C9A96A;
    --gold-soft: rgba(201, 169, 106, .12);

    --danger:      #F2566E;
    --danger-soft: rgba(242, 86, 110, .10);
    --warn:        #E7A33C;
    --warn-soft:   rgba(231, 163, 60, .10);
    --info:        #6E8BF5;
    --info-soft:   rgba(110, 139, 245, .10);

    /* Type */
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
    --font-display: 'Source Serif 4', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Space & shape */
    --r-sm: 8px;
    --r:    12px;
    --r-lg: 18px;
    --r-xl: 26px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow:    0 8px 24px -8px rgba(0, 0, 0, .6);
    --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, .75);

    --wrap: 1180px;
    --wrap-tight: 940px;

    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    font-family: var(--font-ui);
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--text);
    background: var(--ink-950);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; }

::selection { background: var(--brand); color: var(--brand-ink); }

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5 {
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -.018em;
    color: var(--text);
}

.display {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -.022em;
    line-height: 1.1;
    /* Even line lengths beat a hand-placed <br>, which only ever looks
       right at the one width it was tuned against. */
    text-wrap: balance;
}

/* Capped at 3.7rem rather than 4.35: past that the hero headline no longer
   fits enough words per line and balancing leaves stub lines. */
.d1 { font-size: clamp(2.35rem, 4.6vw, 3.7rem); }
.d2 { font-size: clamp(1.95rem, 3.6vw, 2.75rem); }
.d3 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); }

.lede {
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    color: var(--text-2);
    line-height: 1.7;
    max-width: 62ch;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-3);
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--brand);
    opacity: .8;
}

.eyebrow.is-plain::before { display: none; }

.muted   { color: var(--text-2); }
.faint   { color: var(--text-3); }
.pos     { color: var(--brand-lift); }
.neg     { color: var(--danger); }
.num     { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mono    { font-family: var(--font-mono); font-size: .88em; }

.small   { font-size: .85rem; }
.tiny    { font-size: .76rem; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 24px;
}

.wrap-tight { max-width: var(--wrap-tight); }

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-sm { padding-block: clamp(2.75rem, 5vw, 4.25rem); }

.section-head { max-width: 66ch; margin-bottom: 3rem; }
.section-head .d2 { margin-block: .85rem .9rem; }

.rule { height: 1px; background: var(--line); border: 0; }

.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.row { display: flex; align-items: center; gap: .75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.spacer { flex: 1; }

.main { flex: 1; }

/* --------------------------------------------------------------------------
   5. Ambient background
   -------------------------------------------------------------------------- */

.aura {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.aura::before,
.aura::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
}

.aura::before {
    width: 780px; height: 780px;
    top: -340px; left: -180px;
    background: radial-gradient(circle, rgba(16, 185, 129, .17), transparent 68%);
}

.aura::after {
    width: 640px; height: 640px;
    top: 8%; right: -260px;
    background: radial-gradient(circle, rgba(78, 106, 220, .13), transparent 70%);
}

/* Faint engraved grid — the texture a terminal has and a template does not */
.aura .mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 78%);
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    --btn-bd: var(--line-hard);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .72rem 1.25rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--btn-bd);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: .93rem;
    font-weight: 550;
    letter-spacing: -.005em;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s var(--ease), border-color .18s var(--ease),
                transform .18s var(--ease), opacity .18s var(--ease);
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: .42;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    --btn-bg: linear-gradient(180deg, var(--brand-lift), var(--brand));
    --btn-fg: var(--brand-ink);
    --btn-bd: transparent;
    font-weight: 600;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset,
                0 10px 26px -12px rgba(16, 185, 129, .8);
}

.btn-primary:hover {
    --btn-bg: linear-gradient(180deg, #4CE0AF, var(--brand-lift));
}

.btn-ghost { --btn-bg: rgba(255, 255, 255, .03); }
.btn-ghost:hover { --btn-bg: rgba(255, 255, 255, .07); --btn-bd: var(--line-hard); }

.btn-quiet { --btn-bd: transparent; color: var(--text-2); }
.btn-quiet:hover { color: var(--text); --btn-bg: rgba(255, 255, 255, .05); }

.btn-danger {
    --btn-bg: var(--danger-soft);
    --btn-fg: var(--danger);
    --btn-bd: rgba(242, 86, 110, .32);
}

.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }
.btn-sm { padding: .45rem .85rem; font-size: .82rem; border-radius: 7px; }
.btn-block { width: 100%; }

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--brand-lift);
    font-weight: 550;
    font-size: .93rem;
}

.btn-link:hover { color: var(--brand); }
.btn-link svg { transition: transform .2s var(--ease); }
.btn-link:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   7. Surfaces
   -------------------------------------------------------------------------- */

.panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, 0) 42%),
        var(--ink-850);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.panel-pad { padding: clamp(1.35rem, 2.6vw, 2rem); }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--line);
}

.panel-head h3 {
    font-size: .96rem;
    font-weight: 600;
    letter-spacing: -.005em;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.panel-head h3 svg { color: var(--text-3); }

.panel-body { padding: clamp(1.25rem, 2.4vw, 1.75rem); }

.panel-foot {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, .18);
}

.panel-hover { transition: border-color .22s var(--ease), transform .22s var(--ease); }
.panel-hover:hover { border-color: var(--line-hard); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   8. Header / navigation
   -------------------------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(5, 8, 15, .72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line-soft);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 600;
    letter-spacing: -.02em;
    font-size: 1.02rem;
    flex-shrink: 0;
}

/* Green glyph on a dark tile, matching the printed mark rather than
   inverting it into an app icon. */
.brand-mark {
    width: 33px;
    height: 33px;
    border-radius: 9px;
    background: linear-gradient(155deg, rgba(16, 185, 129, .17), rgba(16, 185, 129, .03));
    border: 1px solid var(--brand-edge);
    display: grid;
    place-items: center;
    color: var(--brand-lift);
    flex-shrink: 0;
    transition: border-color .2s var(--ease), color .2s var(--ease);
}

.brand:hover .brand-mark { border-color: var(--brand); color: #4CE0AF; }
.brand-word b { font-weight: 600; }
.brand-word span { color: var(--text-2); font-weight: 400; }

.navwrap {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-left: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.nav a {
    padding: .5rem .8rem;
    border-radius: 7px;
    font-size: .9rem;
    color: var(--text-2);
    transition: color .16s, background .16s;
}

.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.is-active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    align-items: center;
    justify-content: center;
    color: var(--text-2);
}

/* --------------------------------------------------------------------------
   9. Announcement strip
   -------------------------------------------------------------------------- */

.strip {
    background: linear-gradient(90deg, rgba(16, 185, 129, .12), rgba(16, 185, 129, .03));
    border-bottom: 1px solid var(--line-soft);
    font-size: .82rem;
    color: var(--text-2);
}

.strip-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 38px;
    text-align: center;
    flex-wrap: wrap;
}

.strip b { color: var(--text); font-weight: 600; }

.pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .6);
    animation: pulse 2.4s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --------------------------------------------------------------------------
   10. Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem); }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.hero h1 { margin-block: 1.1rem 1.35rem; }
.hero .lede { margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.25rem; }

/* A grid, not a wrapping flex row: four figures that reflow to two clean
   columns rather than leaving a single orphan on its own line. */
.hero-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 1.5rem 1.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}

.trust-item .k {
    font-size: 1.35rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.trust-item .v {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-3);
    margin-top: .1rem;
}

/* Hero side card — a portfolio snapshot, not a stock photo */
.snapshot {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 46%),
        var(--ink-850);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.snapshot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--line);
}

.snapshot-dots { display: flex; gap: 6px; }
.snapshot-dots i {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--ink-700);
}

.snapshot-body { padding: 1.6rem 1.35rem 1.35rem; }

.snapshot-value {
    font-size: 2.3rem;
    font-weight: 600;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.spark { width: 100%; height: 108px; margin: 1.25rem 0 .4rem; }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.spark-area { fill: url(#sparkFill); }
.spark-grid { stroke: var(--line); stroke-width: 1; }

.snapshot-legs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
}

.snapshot-legs div {
    background: var(--ink-850);
    padding: .9rem 1rem;
}

.snapshot-legs .k {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-3);
}

.snapshot-legs .v {
    font-size: .95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-top: .15rem;
}

/* --------------------------------------------------------------------------
   11. Marketing blocks
   -------------------------------------------------------------------------- */

.logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 2.75rem;
    padding-block: 2.25rem;
    border-block: 1px solid var(--line);
    opacity: .62;
}

.logos span {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* Numbered steps */
.steps { counter-reset: step; }

.step {
    position: relative;
    padding: 1.75rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent 55%);
    transition: border-color .22s var(--ease);
}

.step:hover { border-color: var(--brand-edge); }

.step::before {
    counter-increment: step;
    content: '0' counter(step);
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--brand);
    letter-spacing: .08em;
}

.step h3 { font-size: 1.06rem; margin-block: .85rem .5rem; }
.step p { color: var(--text-2); font-size: .93rem; }

/* Feature list with hairline icons */
.feature { display: flex; gap: 1rem; }

.feature-icon {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    border: 1px solid var(--brand-edge);
    color: var(--brand-lift);
}

.feature-icon svg { width: 18px; height: 18px; }
.feature h4 { font-size: .98rem; margin-bottom: .3rem; }
.feature p { color: var(--text-2); font-size: .9rem; }

/* Mandate (pricing) cards */
.mandate {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--ink-850);
    transition: border-color .22s var(--ease), transform .22s var(--ease);
}

.mandate:hover { border-color: var(--line-hard); transform: translateY(-3px); }

.mandate.is-featured {
    border-color: var(--brand-edge);
    background:
        linear-gradient(180deg, rgba(16, 185, 129, .07), transparent 40%),
        var(--ink-850);
    box-shadow: var(--shadow);
}

/* Taken out of flow so the featured card's heading still lines up with its
   neighbours' — in flow it pushed every row of that column down. */
.mandate-tag {
    position: absolute;
    top: 1.15rem;
    right: 1.15rem;
    font-size: .62rem;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .22rem .5rem;
    border-radius: 5px;
    background: var(--brand-soft);
    color: var(--brand-lift);
    border: 1px solid var(--brand-edge);
}

.mandate.is-featured h3 { padding-right: 6.5rem; }

.mandate h3 { font-size: 1.15rem; }

.mandate-min {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    margin-block: .75rem .25rem;
}

.mandate-min b {
    font-size: 1.95rem;
    font-weight: 600;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.mandate-min span { color: var(--text-3); font-size: .85rem; }

.mandate-obj {
    margin-block: 1rem;
    padding: .7rem .85rem;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line);
    font-size: .84rem;
    color: var(--text-2);
}

.mandate-obj b { color: var(--text); font-variant-numeric: tabular-nums; }

.mandate p.blurb {
    color: var(--text-2);
    font-size: .9rem;
    margin-bottom: 1.15rem;
}

.checklist { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .875rem;
    color: var(--text-2);
}

.checklist svg { color: var(--brand); margin-top: 4px; width: 13px; height: 13px; }

.mandate .btn { margin-top: auto; }

/* FAQ */
.faq details {
    border-bottom: 1px solid var(--line);
    padding-block: 1.15rem;
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 550;
    font-size: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: '';
    width: 9px; height: 9px;
    border-right: 1.6px solid var(--text-3);
    border-bottom: 1.6px solid var(--text-3);
    transform: rotate(45deg);
    transition: transform .22s var(--ease);
    flex-shrink: 0;
    margin-right: 4px;
}

.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details[open] summary { color: var(--brand-lift); }

.faq p {
    color: var(--text-2);
    font-size: .93rem;
    margin-top: .8rem;
    max-width: 74ch;
}

/* Call to action band */
.cta-band {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--brand-edge);
    border-radius: var(--r-xl);
    background:
        radial-gradient(ellipse 70% 130% at 12% 0%, rgba(16, 185, 129, .16), transparent 62%),
        var(--ink-850);
    padding: clamp(2.25rem, 5vw, 3.75rem);
    text-align: center;
}

/* Risk disclosure — deliberately plain, never styled to be skipped */
.disclosure {
    border: 1px solid var(--line);
    border-left: 2px solid var(--warn);
    border-radius: var(--r-sm);
    background: rgba(231, 163, 60, .04);
    padding: 1.1rem 1.25rem;
    font-size: .84rem;
    color: var(--text-2);
    line-height: 1.65;
}

.disclosure b { color: var(--text); }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */

.footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: var(--ink-900);
    padding-block: 3.25rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
}

.footer h5 {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: var(--text-3);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links { display: flex; flex-direction: column; gap: .6rem; }
.footer-links a { color: var(--text-2); font-size: .89rem; }
.footer-links a:hover { color: var(--brand-lift); }

.footer-legal {
    padding-top: 1.75rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--text-3);
}

.footer-note {
    margin-top: 1.5rem;
    font-size: .76rem;
    line-height: 1.7;
    color: var(--text-3);
    max-width: 92ch;
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */

.field { margin-bottom: 1.15rem; }

.label {
    display: block;
    font-size: .82rem;
    font-weight: 550;
    color: var(--text-2);
    margin-bottom: .45rem;
}

.hint { font-size: .78rem; color: var(--text-3); margin-top: .4rem; }

.input {
    width: 100%;
    padding: .78rem .9rem;
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: .95rem;
    transition: border-color .16s, box-shadow .16s, background .16s;
}

.input::placeholder { color: var(--text-3); }

.input:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(0, 0, 0, .42);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.input:disabled, .input[readonly] {
    background: rgba(255, 255, 255, .02);
    color: var(--text-3);
    cursor: not-allowed;
}

select.input {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
        linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
    background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.4rem;
}

/* Input with a leading adornment ($, +254, …) */
.input-affix { position: relative; }

.input-affix .affix {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: .95rem;
    pointer-events: none;
}

.input-affix .input { padding-left: 2.3rem; }
.input-affix.is-wide .input { padding-left: 4.1rem; }

.input-lg { padding-block: 1rem; font-size: 1.25rem; font-weight: 550; }
.input-affix .input-lg { padding-left: 2.6rem; }
.input-affix .input-lg + .affix, .input-affix .affix.affix-lg { font-size: 1.15rem; }

/* Selectable tiles (mandate / method / amount) */
.choice-grid { display: grid; gap: .75rem; }

.choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255, 255, 255, .015);
    cursor: pointer;
    text-align: left;
    transition: border-color .18s var(--ease), background .18s var(--ease),
                transform .18s var(--ease);
}

.choice:hover { border-color: var(--line-hard); transform: translateY(-1px); }

.choice.is-on {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.choice.is-on::after {
    content: '';
    position: absolute;
    top: 10px; right: 10px;
    width: 15px; height: 15px;
    border-radius: 50%;
    background: var(--brand);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303150E' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
}

/* display:block, not the flex column: in .choice-inline these sit inside a
   wrapper span, where flex-direction on the parent no longer reaches them. */
.choice .t { display: block; font-weight: 600; font-size: .95rem; }
.choice .s { display: block; font-size: .8rem; color: var(--text-3); line-height: 1.45; }

.choice-inline {
    flex-direction: row;
    align-items: center;
    gap: .8rem;
}

.choice-inline .choice-mark {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .05);
    color: var(--text-2);
    flex-shrink: 0;
}

.choice.is-on .choice-mark { background: var(--brand-soft); color: var(--brand-lift); }

/* Quick amount chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.chip {
    padding: .42rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .82rem;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
    transition: all .16s var(--ease);
}

.chip:hover { border-color: var(--line-hard); color: var(--text); }
.chip.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-lift); }

/* Copy row for a wallet address */
.copyrow {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(0, 0, 0, .32);
    overflow: hidden;
}

.copyrow code {
    flex: 1;
    min-width: 0;
    padding: .8rem .9rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--brand-lift);
    word-break: break-all;
    line-height: 1.5;
}

.copyrow button {
    padding-inline: 1.1rem;
    border-left: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-2);
    transition: background .16s, color .16s;
}

.copyrow button:hover { background: var(--brand); color: var(--brand-ink); }

/* --------------------------------------------------------------------------
   14. Alerts
   -------------------------------------------------------------------------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1.1rem;
    border-radius: var(--r-sm);
    border: 1px solid;
    font-size: .89rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.alert svg { flex-shrink: 0; margin-top: 2px; width: 17px; height: 17px; }

.alert-ok    { background: var(--brand-soft);  border-color: var(--brand-edge);        color: var(--brand-lift); }
.alert-bad   { background: var(--danger-soft); border-color: rgba(242, 86, 110, .32);  color: var(--danger); }
.alert-warn  { background: var(--warn-soft);   border-color: rgba(231, 163, 60, .3);   color: var(--warn); }
.alert-info  { background: var(--info-soft);   border-color: rgba(110, 139, 245, .3);  color: #A9BAFF; }

.alert a { text-decoration: underline; }

/* --------------------------------------------------------------------------
   15. Badges & pills
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .22rem .6rem;
    border-radius: 999px;
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .01em;
    border: 1px solid;
    white-space: nowrap;
    text-transform: capitalize;
}

.badge svg { width: 11px; height: 11px; }

.badge-ok      { background: var(--brand-soft);  border-color: var(--brand-edge);       color: var(--brand-lift); }
.badge-pending { background: var(--warn-soft);   border-color: rgba(231, 163, 60, .3);  color: var(--warn); }
.badge-bad     { background: var(--danger-soft); border-color: rgba(242, 86, 110, .3);  color: var(--danger); }
.badge-info    { background: var(--info-soft);   border-color: rgba(110, 139, 245, .3); color: #A9BAFF; }
.badge-mute    { background: rgba(255, 255, 255, .04); border-color: var(--line);       color: var(--text-3); }

.delta {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.delta svg { width: 12px; height: 12px; }
.delta.up { color: var(--brand-lift); }
.delta.down { color: var(--danger); }

/* --------------------------------------------------------------------------
   16. Money pair (USD primary, KES beneath)
   -------------------------------------------------------------------------- */

.money { display: inline-flex; flex-direction: column; line-height: 1.25; }
.money-primary { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -.015em; }
.money-alt { font-size: .74em; color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 450; }

.money-inline { flex-direction: row; align-items: baseline; gap: .45rem; }
.money-inline .money-alt::before { content: '·'; margin-right: .45rem; }

.money-xl .money-primary { font-size: 2.15rem; }
.money-lg .money-primary { font-size: 1.5rem; }

/* --------------------------------------------------------------------------
   17. App shell (signed-in pages)
   -------------------------------------------------------------------------- */

.app-nav {
    border-bottom: 1px solid var(--line-soft);
    background: rgba(5, 8, 15, .8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 60;
}

.app-nav-inner { display: flex; align-items: center; gap: 1rem; height: 64px; }

.app-links {
    display: flex;
    align-items: center;
    gap: .15rem;
    margin-left: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.app-links::-webkit-scrollbar { display: none; }

.app-links a {
    position: relative;
    padding: .5rem .8rem;
    border-radius: 7px;
    font-size: .89rem;
    color: var(--text-2);
    white-space: nowrap;
    transition: color .16s, background .16s;
}

.app-links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.app-links a.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, .06);
}

.app-links a.is-active::after {
    content: '';
    position: absolute;
    left: .8rem; right: .8rem;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .76rem;
    font-weight: 650;
    letter-spacing: .02em;
    background: linear-gradient(145deg, rgba(16, 185, 129, .28), rgba(16, 185, 129, .07));
    border: 1px solid var(--brand-edge);
    color: var(--brand-lift);
    flex-shrink: 0;
}

.avatar-lg { width: 76px; height: 76px; font-size: 1.6rem; border-radius: 20px; }

/* Page header */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.page-head h1 { font-size: 1.55rem; letter-spacing: -.022em; }
.page-head p { color: var(--text-2); font-size: .92rem; margin-top: .25rem; }

/* Stat tiles */
.stat {
    padding: 1.35rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 55%),
        var(--ink-850);
    transition: border-color .22s var(--ease);
}

.stat:hover { border-color: var(--line-hard); }

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .9rem;
}

.stat-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .11em;
    color: var(--text-3);
    font-weight: 600;
}

.stat-icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .04);
    color: var(--text-2);
}

.stat-icon svg { width: 16px; height: 16px; }
.stat-icon.tint-brand { background: var(--brand-soft); color: var(--brand-lift); }
.stat-icon.tint-info  { background: var(--info-soft);  color: #A9BAFF; }
.stat-icon.tint-gold  { background: var(--gold-soft);  color: var(--gold); }
.stat-icon.tint-bad   { background: var(--danger-soft); color: var(--danger); }

.stat-foot { margin-top: .55rem; font-size: .8rem; color: var(--text-3); }

/* Live accrual — a slow breath, not a blink. The figure beside it changes
   every second on its own; a hard flashing dot next to that reads as an
   alarm rather than as "this is current". */
.live-dot {
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: .3rem;
    border-radius: 50%;
    background: var(--brand);
    vertical-align: middle;
    animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 1;  box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); }
    50%      { opacity: .45; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

/* Direction of travel on each tick. Deliberately brief and low-contrast:
   the number is updating once a second, so anything stronger turns the
   dashboard into a strobe. */
.tick-up, .tick-down { animation: tick .55s ease-out; }

@keyframes tick {
    0%   { color: var(--brand-lift); }
    100% { color: inherit; }
}

.tick-down { animation-name: tick-down; }

@keyframes tick-down {
    0%   { color: var(--danger); }
    100% { color: inherit; }
}

/* --------------------------------------------------------------------------
   18. Tables
   -------------------------------------------------------------------------- */

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

table.data th {
    text-align: left;
    padding: .8rem 1.5rem;
    font-size: .69rem;
    font-weight: 650;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--text-3);
    background: rgba(255, 255, 255, .015);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

table.data td {
    padding: .95rem 1.5rem;
    border-bottom: 1px solid var(--line-soft);
    font-size: .9rem;
    vertical-align: middle;
}

table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .14s; }
table.data tbody tr:hover td { background: rgba(255, 255, 255, .018); }

.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.num-cell .money { align-items: flex-end; }

.tx-cell { display: flex; align-items: center; gap: .8rem; }

.tx-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.tx-icon svg { width: 15px; height: 15px; }
.tx-in    { background: var(--brand-soft);  color: var(--brand-lift); }
.tx-out   { background: var(--danger-soft); color: var(--danger); }
.tx-pnl   { background: var(--info-soft);   color: #A9BAFF; }

.tx-title { font-weight: 550; font-size: .9rem; }
.tx-sub { font-size: .78rem; color: var(--text-3); }

.empty {
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: var(--text-3);
}

.empty svg { margin: 0 auto .9rem; color: var(--ink-700); width: 34px; height: 34px; }
.empty p { font-size: .9rem; }

/* --------------------------------------------------------------------------
   19. Auth pages
   -------------------------------------------------------------------------- */

.auth {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: clamp(2rem, 6vw, 4rem) 1.25rem;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: rgba(12, 19, 34, .82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-lg);
}

.auth-card h1 { font-size: 1.6rem; margin-bottom: .45rem; }
.auth-card > p.sub { color: var(--text-2); font-size: .92rem; margin-bottom: 1.85rem; }

.auth-foot {
    margin-top: 1.6rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: .89rem;
    color: var(--text-2);
}

.auth-foot a { color: var(--brand-lift); font-weight: 550; }
.auth-foot a:hover { text-decoration: underline; }

.auth-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-top: 1.5rem;
    font-size: .76rem;
    color: var(--text-3);
}

.auth-trust svg { width: 13px; height: 13px; color: var(--brand); }

/* --------------------------------------------------------------------------
   20. Deposit flow
   -------------------------------------------------------------------------- */

.stepper {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 2rem;
}

.stepper .node {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .82rem;
    color: var(--text-3);
    white-space: nowrap;
}

.stepper .node i {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-style: normal;
    font-weight: 650;
    background: var(--ink-850);
    transition: all .22s var(--ease);
}

.stepper .node.is-on { color: var(--text); }
.stepper .node.is-on i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stepper .node.is-done i {
    background: var(--brand-soft);
    border-color: var(--brand-edge);
    color: var(--brand-lift);
}

.stepper .bar {
    flex: 1;
    height: 1px;
    background: var(--line);
    min-width: 12px;
}

.pane { display: none; }
.pane.is-on { display: block; animation: rise .3s var(--ease); }

@keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* Live conversion readout */
.convert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .9rem 1.05rem;
    margin-top: .85rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .02);
    font-size: .86rem;
}

.convert .k { color: var(--text-3); }
.convert .v { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--brand-lift); }

/* Waiting-for-STK state */
.waiting { text-align: center; padding: 1.5rem 0 .5rem; }

.waiting-ring {
    width: 76px; height: 76px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    border: 2px solid var(--line);
    border-top-color: var(--brand);
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.waiting h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.waiting p { color: var(--text-2); font-size: .92rem; max-width: 46ch; margin-inline: auto; }

.waiting-phone {
    display: inline-block;
    margin-top: 1rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    font-family: var(--font-mono);
    font-size: .88rem;
    letter-spacing: .04em;
}

.result-mark {
    width: 66px; height: 66px;
    margin: 0 auto 1.35rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.result-mark svg { width: 30px; height: 30px; }
.result-ok  { background: var(--brand-soft);  color: var(--brand-lift); border: 1px solid var(--brand-edge); }
.result-bad { background: var(--danger-soft); color: var(--danger);     border: 1px solid rgba(242, 86, 110, .3); }

.receipt {
    margin-top: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .72rem 1rem;
    font-size: .86rem;
    border-bottom: 1px solid var(--line-soft);
}

.receipt-row:last-child { border-bottom: 0; }
.receipt-row .k { color: var(--text-3); }
.receipt-row .v { font-weight: 550; font-variant-numeric: tabular-nums; text-align: right; }

/* --------------------------------------------------------------------------
   21. Utilities
   -------------------------------------------------------------------------- */

.center { text-align: center; }
.right  { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.25rem; }
.mb-1 { margin-bottom: .75rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 2.25rem; }
.mx-auto { margin-inline: auto; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   22. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .snapshot { max-width: 520px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .g3 { grid-template-columns: 1fr; }

    .navwrap { display: none; }
    .nav-toggle { display: flex; }

    /* One dropdown holding both the links and the actions. .topbar is
       position:sticky, which is a containing block, so this anchors to it. */
    .topbar.is-open .navwrap {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .85rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        padding: .5rem 24px 1.35rem;
        background: var(--ink-900);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .topbar.is-open .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .topbar.is-open .nav a {
        padding: .8rem .4rem;
        border-bottom: 1px solid var(--line-soft);
        border-radius: 0;
    }

    .topbar.is-open .nav-actions { flex-direction: column; align-items: stretch; }
    .topbar.is-open .nav-actions .btn { width: 100%; }
}

@media (max-width: 720px) {
    body { font-size: 15px; }
    .wrap { padding-inline: 18px; }
    .g2, .g4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; }

    table.data th, table.data td { padding: .8rem 1rem; }

    .stepper .node span { display: none; }
    .stepper .node i { width: 26px; height: 26px; }

    .hero-trust { gap: 1rem 1.75rem; }
    .trust-item .k { font-size: 1.15rem; }

    .snapshot-legs { grid-template-columns: 1fr; }
    .money-xl .money-primary { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media print {
    .topbar, .app-nav, .footer, .aura, .strip { display: none !important; }
    body { background: #fff; color: #000; }
}
