/* ==========================================================================
   Lago — shared design system
   Brand: glossy gold "L" + ascending blue bars + rising gold trend-line.
   Palette: sunny gold + brand blue on light, with a deep-navy band where the
   dark app screenshots glow. Type: Space Grotesk (display) / Inter (body) /
   JetBrains Mono (ledger figures & eyebrows).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

/* ------------------------------- Tokens --------------------------------- */
:root {
    /* Gold — the "L" and the trend-line */
    --gold-50: #FFF7E6;
    --gold-100: #FFEFCC;
    --gold-200: #FFE3A3;
    --gold-400: #FFC845;
    --gold-500: #F5A623;
    --gold-600: #E08A0B;

    /* Blue — the bars */
    --blue-50: #EEF5FF;
    --blue-100: #DCEBFF;
    --blue-300: #9CC4FB;
    --blue-400: #5AA0F2;
    --blue-500: #2D74E6;
    --blue-600: #1B57C6;
    --blue-700: #123F94;

    /* Ink — the dark band */
    --ink-900: #0A1020;
    --ink-800: #0F1828;
    --ink-700: #16233C;
    --ink-600: #22314e;

    /* Surfaces & text */
    --paper: #ffffff;
    --paper-2: #F4F7FC;
    --paper-3: #E9F1FB;
    --text: #0E1525;
    --text-muted: #55617a;
    --text-faint: #8A94A8;
    --on-dark: #EAF1FB;
    --on-dark-muted: #9DB0D0;
    --line: #E4EAF3;
    --line-dark: rgba(255, 255, 255, 0.10);

    /* Gradients */
    --grad-word: linear-gradient(100deg, var(--gold-600) 0%, var(--gold-500) 26%, var(--blue-400) 68%, var(--blue-500) 100%);
    --grad-gold: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    --grad-cta: linear-gradient(120deg, var(--gold-50), var(--blue-100));

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(13, 28, 60, 0.05), 0 4px 14px rgba(13, 28, 60, 0.05);
    --shadow-md: 0 10px 30px rgba(13, 28, 60, 0.10);
    --shadow-lg: 0 34px 64px rgba(8, 18, 45, 0.20);
    --shadow-gold: 0 24px 60px rgba(245, 166, 35, 0.28);

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 28px;
    --pill: 999px;

    --maxw: 1160px;
    --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

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

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

a {
    color: var(--blue-600);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--blue-500);
}

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

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ------------------------------ Eyebrow --------------------------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-600);
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-gold);
}

.eyebrow--center {
    justify-content: center;
}

.eyebrow--on-dark {
    color: var(--gold-400);
}

/* gradient text used on one phrase in headlines */
.grad-text {
    background: var(--grad-word);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ------------------------------ Buttons --------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    padding: 14px 26px;
    border-radius: var(--pill);
    border: 1px solid transparent;
    cursor: pointer;
    /* default appearance = primary, so a bare .btn still looks right */
    color: #3a2600;
    background: var(--grad-gold);
    box-shadow: 0 10px 26px rgba(245, 166, 35, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}

.btn:hover {
    color: #3a2600;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(245, 166, 35, 0.45);
}

.btn--primary {
    color: #3a2600;
    background: var(--grad-gold);
}

.btn--ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--line);
}

.btn--ghost:hover {
    color: var(--text);
    border-color: var(--blue-300);
    transform: translateY(-2px);
}

.btn--sm {
    padding: 9px 18px;
    font-size: 14px;
}

/* ------------------------------ Header ---------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
}

.site-header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: var(--text);
}

.brand:hover {
    color: var(--text);
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    box-shadow: var(--shadow-sm);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a:not(.btn) {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
}

.nav-links a:not(.btn):hover {
    color: var(--blue-600);
}

.lang-selector {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-muted);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.lang-selector:hover {
    border-color: var(--blue-300);
}

/* ------------------------------- Hero ----------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 84px 0 92px;
    background:
        radial-gradient(58% 48% at 14% 2%, rgba(245, 166, 35, 0.16), transparent 62%),
        radial-gradient(54% 46% at 92% 8%, rgba(45, 116, 230, 0.16), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, var(--paper-2) 100%);
}

.hero__inner {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    max-width: 16ch;
    margin: 20px auto 0;
}

.hero__sub {
    font-size: clamp(17px, 2.4vw, 21px);
    color: var(--text-muted);
    max-width: 56ch;
    margin: 22px auto 0;
}

.store-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.store-badge {
    height: 52px;
    width: auto;
    transition: transform 0.2s ease;
}

.store-badge:hover {
    transform: translateY(-2px) scale(1.03);
}

/* signature: rising trend-line under the hero copy */
.ledger-line {
    display: block;
    width: min(680px, 86%);
    height: 90px;
    margin: 30px auto 4px;
    overflow: visible;
}

.ledger-line__path {
    fill: none;
    stroke: url(#ledgerGrad);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: ledger-draw 2.1s cubic-bezier(0.4, 0, 0.1, 1) 0.25s forwards;
}

.ledger-line__node {
    fill: var(--gold-500);
    stroke: #fff;
    stroke-width: 2;
    opacity: 0;
    animation: ledger-node 0.4s ease forwards;
}

.ledger-line__node:nth-of-type(1) { animation-delay: 0.7s; }
.ledger-line__node:nth-of-type(2) { animation-delay: 1.05s; }
.ledger-line__node:nth-of-type(3) { animation-delay: 1.4s; }
.ledger-line__node:nth-of-type(4) { animation-delay: 1.75s; fill: var(--blue-500); }

@keyframes ledger-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes ledger-node {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

/* hero device */
.hero-figure {
    position: relative;
    width: min(320px, 78vw);
    margin: 18px auto 0;
}

.hero-figure .img-load {
    border-radius: 38px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(13, 28, 60, 0.04);
    border: 8px solid #0b0f18;
    background: #0b0f18;
}

.hero-figure .img-load img {
    border-radius: 30px;
}

/* floating ledger chip overlapping the device */
.stat-chip {
    position: absolute;
    top: 16%;
    right: -14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px);
    animation: float-chip 5s ease-in-out infinite;
}

.stat-chip__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--gold-50);
    color: var(--gold-600);
    flex-shrink: 0;
}

.stat-chip__label {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

.stat-chip__value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
    color: var(--blue-600);
}

@keyframes float-chip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

/* ----------------------------- Features --------------------------------- */
.section {
    padding: 96px 0;
}

.section--tint {
    background: var(--paper-2);
}

.section-head {
    text-align: center;
    margin-bottom: 56px;
}

.section-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-top: 14px;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}

.feature-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 34px 32px 36px;
    text-align: left;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--grad-word);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gold-50), var(--blue-50));
    color: var(--blue-600);
    margin-bottom: 22px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 11px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
}

/* ----------------------------- Showcase (dark) -------------------------- */
.showcase {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    background: var(--ink-900);
    color: var(--on-dark);
}

.showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(50% 40% at 20% 0%, rgba(245, 166, 35, 0.16), transparent 60%),
        radial-gradient(55% 45% at 85% 100%, rgba(45, 116, 230, 0.20), transparent 60%);
    pointer-events: none;
}

.showcase .container {
    position: relative;
    z-index: 1;
}

.showcase .section-head h2 {
    color: var(--on-dark);
}

.showcase__lead {
    text-align: center;
    color: var(--on-dark-muted);
    max-width: 52ch;
    margin: -36px auto 50px;
    font-size: 17px;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 26px;
}

.showcase-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--ink-700);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.showcase-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 166, 35, 0.25), var(--shadow-gold);
}

.showcase .img-load {
    background: var(--ink-700);
}

.showcase .img-load__ph {
    background: linear-gradient(100deg, var(--ink-700) 0%, var(--ink-600) 45%, var(--ink-700) 90%);
    background-size: 200% 100%;
}

/* -------------------------------- CTA ----------------------------------- */
.cta {
    padding: 90px 0;
    background: var(--grad-cta);
    text-align: center;
}

.cta__card {
    max-width: 760px;
    margin: 0 auto;
}

.cta h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4.4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-top: 12px;
}

.cta p {
    color: var(--text-muted);
    font-size: 18px;
    margin-top: 14px;
}

/* ------------------------------ Footer ---------------------------------- */
.site-footer {
    background: var(--ink-900);
    color: var(--on-dark-muted);
    padding: 70px 0 34px;
    font-size: 14px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 44px;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand .brand {
    color: var(--on-dark);
}

.footer-brand .brand:hover {
    color: var(--on-dark);
}

.footer-brand p {
    margin-top: 14px;
    color: var(--on-dark-muted);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 56px;
    flex-wrap: wrap;
}

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-400);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: var(--on-dark-muted);
    margin-bottom: 9px;
}

.footer-col a:hover {
    color: var(--gold-400);
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 22px;
    border-top: 1px solid var(--line-dark);
    color: var(--on-dark-muted);
    font-size: 12.5px;
}

/* --------------------- Image loader (shared, JS-driven) ----------------- */
.img-load {
    position: relative;
    width: 100%;
    aspect-ratio: 1242 / 2688;
    background: var(--paper-2);
    overflow: hidden;
}

.img-load__ph {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, var(--paper-2) 0%, #e7ecf5 45%, var(--paper-2) 90%);
    background-size: 200% 100%;
    animation: img-load-shimmer 1.15s ease-in-out infinite;
}

.img-load--loaded .img-load__ph {
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.img-load--error .img-load__ph {
    animation: none;
    background: #e7ecf5;
}

.img-load img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Only hide-until-loaded when JS is present, so content never vanishes without it */
.js .img-load img {
    opacity: 0;
}

.js .img-load--loaded img {
    opacity: 1;
}

@keyframes img-load-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* --------------------------- Scroll reveal ------------------------------ */
/* Gated behind .js so content stays visible if JavaScript is unavailable */
.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

/* ===================== Document pages (support / privacy / terms) ======= */
.doc {
    background: var(--paper-2);
    min-height: 100vh;
}

.doc-wrap {
    max-width: 840px;
    margin: 0 auto;
    padding: 44px 24px 80px;
}

.doc-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.doc-back:hover {
    color: var(--blue-600);
}

.doc-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 56px 56px 60px;
}

.doc-card header {
    text-align: center;
    margin-bottom: 14px;
}

.doc-card h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(30px, 5vw, 42px);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-top: 12px;
}

.doc-card header > p,
.doc-card .last-updated {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 16px;
}

.doc-card .last-updated {
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 8px;
}

.doc-card h2 {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 44px;
    margin-bottom: 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.doc-card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 46px;
    height: 3px;
    border-radius: 2px;
    background: var(--grad-gold);
}

.doc-card h3 {
    font-family: var(--font-display);
    font-size: 17.5px;
    font-weight: 600;
    margin-top: 26px;
    margin-bottom: 11px;
}

.doc-card p {
    margin-bottom: 18px;
    font-size: 16.5px;
    color: var(--text);
}

.doc-card ul {
    margin: 0 0 20px;
    padding-left: 22px;
}

.doc-card li {
    margin-bottom: 9px;
    font-size: 16px;
}

.doc-card strong {
    color: var(--text);
}

.doc-card a {
    color: var(--blue-600);
    font-weight: 500;
}

.doc-card a:hover {
    text-decoration: underline;
}

.doc-card hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 40px 0;
}

.summary-box {
    background: linear-gradient(180deg, var(--gold-50), #fff);
    border: 1px solid var(--gold-200);
    border-left: 4px solid var(--gold-500);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 40px;
}

.summary-box h3 {
    margin-top: 0;
}

.summary-box ul {
    margin-bottom: 0;
    list-style: none;
    padding-left: 0;
}

.summary-box li {
    position: relative;
    padding-left: 28px;
    font-weight: 500;
}

.summary-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--gold-600);
    font-weight: 700;
}

.contact-box {
    margin-top: 40px;
    padding: 32px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
}

.contact-box h2 {
    border: 0;
    margin-top: 0;
    padding: 0;
}

.contact-box h2::after {
    display: none;
}

/* ----------------------------- Responsive ------------------------------- */
@media (max-width: 820px) {
    .footer-top {
        gap: 32px;
    }

    .footer-links {
        gap: 36px;
    }
}

@media (max-width: 680px) {
    .section {
        padding: 70px 0;
    }

    .hero {
        padding: 56px 0 68px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a:not(.btn):not(.brand) {
        display: none;
    }

    .brand {
        font-size: 18px;
        gap: 9px;
    }

    .brand img {
        width: 30px;
        height: 30px;
    }

    .btn--sm {
        padding: 8px 14px;
        font-size: 13px;
    }

    .lang-selector {
        padding: 6px 8px;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 0.1em;
        max-width: 100%;
    }

    .store-badge {
        height: 46px;
    }

    .doc-card {
        padding: 34px 24px 40px;
    }

    .stat-chip {
        right: -6px;
        padding: 10px 12px;
    }
}

/* --------------------------- Reduced motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .ledger-line__path {
        stroke-dashoffset: 0;
    }

    .ledger-line__node {
        opacity: 1;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }

    .img-load__ph {
        animation: none;
        background: var(--paper-2);
    }
}
