/* =============================================================
   Algrow Landing — R2-inspired design system
   Scoped under .r2-page so it doesn't fight hero_page.css.
   Brand palette kept: black bg + blue rgb(0, 115, 255) accent.
   ============================================================= */

.r2-page {
    /* Design tokens */
    --bg: #000000;
    --bg-card: #0a0a0a;
    --bg-card-soft: #0d0d0d;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --border-accent: rgba(0, 115, 255, 0.40);
    --fg: #ffffff;
    --fg-dim: rgba(255, 255, 255, 0.72);
    --fg-soft: rgba(255, 255, 255, 0.55);
    --fg-mute: rgba(255, 255, 255, 0.35);
    --accent: rgb(0, 115, 255);
    --accent-soft: rgba(0, 115, 255, 0.10);
    --accent-glow: rgba(0, 115, 255, 0.28);
    --good: #3eddae;
    --bad: #ff6b6b;
    --warn: #ffb84d;

    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --section-pad-x: clamp(20px, 5vw, 56px);
    --section-pad-y: clamp(56px, 9vw, 112px);
    --container: 1240px;

    --font-display: "DM Sans", "Inter", sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background dots are now per-section inline SVGs (see .r2-dots) — gives
   pixel-perfect parity with cloudflare.com/products/r2 (12px grid, 0.75 radius). */

.r2-page * { box-sizing: border-box; }
.r2-page main { position: relative; z-index: 1; }

/* -------- R2 Dots: <svg><pattern><circle> background ---------- */
.r2-dots {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    --decor-dots: rgba(255, 255, 255, 0.08);
}
.r2-dots--bright { --decor-dots: rgba(0, 115, 255, 0.20); }
.r2-dots--mask-b {
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
            mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}
.r2-dots--mask-radial {
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
            mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* -------- R2 Corner Ticks: the 4 little 14px squares "punched" through
   the card border at each corner. THIS is the R2 visual signature.
   Parent must have position:relative (we add that to every card class). ---------- */
.r2-tick {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    z-index: 5;
    pointer-events: none;
    display: block;
}
.r2-tick--tl { left: -7px; top: -7px; }
.r2-tick--tr { right: -7px; top: -7px; }
.r2-tick--bl { left: -7px; bottom: -7px; }
.r2-tick--br { right: -7px; bottom: -7px; }

/* -------- R2 Corner Lines: full-viewport dashed horizontal lines extending
   beyond the section edges (16,16 dash like the original). ---------- */
.r2-cornerlines {
    position: relative;
}
.r2-cornerlines::before,
.r2-cornerlines::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200vw;
    height: 1px;
    background-image: linear-gradient(to right, var(--border) 50%, transparent 50%);
    background-size: 16px 1px;
    background-repeat: repeat-x;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 2000ms ease-out;
}
.r2-cornerlines::before { top: 0; }
.r2-cornerlines::after { bottom: 0; }
.r2-cornerlines.visible::before,
.r2-cornerlines.visible::after { opacity: 1; }

/* Generic section primitives */
.r2-section {
    position: relative;
    padding: var(--section-pad-y) var(--section-pad-x);
}

.r2-container {
    max-width: var(--container);
    margin: 0 auto;
}

.r2-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 20px;
    padding: 6px 12px;
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    background: var(--accent-soft);
}

.r2-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* Typography — exact R2 scale: h1 32→64px, h2 32→56px, h3 24→48px, weight 500,
   tracking -0.025em, leading 0.99-1.0. */
.r2-h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    line-height: 0.99;
    letter-spacing: -0.025em;
    color: var(--fg);
    text-wrap: balance;
    margin: 0 0 24px 0;
}
@media (min-width: 768px) { .r2-h1 { font-size: 4rem; } }

.r2-h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--fg);
    text-wrap: balance;
    margin: 0 0 20px 0;
}
@media (min-width: 768px) { .r2-h2 { font-size: 3.5rem; } }

.r2-h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--fg);
    margin: 0 0 12px 0;
}
@media (min-width: 768px) { .r2-h3 { font-size: 1.75rem; } }

/* Hero subtitle — R2 uses h5 sizing: 1.05rem mobile / 1.2rem desktop, weight 400 */
.r2-lead {
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--fg-dim);
    max-width: 760px;
    margin: 0 0 32px 0;
    font-weight: 400;
    letter-spacing: -0.015em;
}
@media (min-width: 768px) { .r2-lead { font-size: 1.2rem; line-height: 1.45; } }

.r2-body {
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg-dim);
    margin: 0 0 16px 0;
}

.r2-accent { color: var(--accent); }

/* ------------------------------------------------------------------
   HERO — exact R2 spec: dot pattern background, bottom-fade mask,
   subtle blue radial glow (much softer than before), centered on desktop,
   left-aligned on mobile.
   ------------------------------------------------------------------ */
.r2-hero {
    position: relative;
    padding: 120px var(--section-pad-x) 80px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 768px) {
    .r2-hero { padding: 160px var(--section-pad-x) 100px; min-height: 600px; }
}

.r2-hero-inner {
    max-width: 1080px;
    margin: 0 auto;
    text-align: left;
    position: relative;
    z-index: 3;
}
@media (min-width: 768px) { .r2-hero-inner { text-align: center; } }

.r2-hero .r2-h1 { margin-left: 0; margin-right: 0; max-width: 1080px; }
.r2-hero .r2-lead { margin-left: 0; margin-right: 0; max-width: 760px; }
@media (min-width: 768px) {
    .r2-hero .r2-h1 { margin-left: auto; margin-right: auto; }
    .r2-hero .r2-lead { margin-left: auto; margin-right: auto; }
}

/* Subtle ambient blue glow — much softer than before; sits behind the dots. */
.r2-hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1200px;
    height: 500px;
    max-width: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 115, 255, 0.10) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

.r2-cta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* Buttons — exact R2 spec: square-ish on mobile (12px) → full pill on desktop,
   solid bg + same-color border, NO glow shadow, hover = white border (no movement),
   active = scale(0.98). The R2 visual signature is the border-color flip. */
.r2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    transition:
        background 160ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 160ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 160ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    white-space: nowrap;
    line-height: 1.2;
}
@media (min-width: 768px) { .r2-btn { border-radius: 100px; } }

.r2-btn:active { transform: scale(0.98); }

.r2-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.r2-btn-primary:hover {
    border-color: #ffffff;
    background: var(--accent);
}

.r2-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-strong);
    color: var(--fg);
}
.r2-btn-secondary:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

/* Button inside a card (final-CTA, pricing) shouldn't have stretched width */
.r2-btn i { font-size: 13px; }

/* Ticker / feature pill row under hero */
.r2-ticker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    margin-top: 40px;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.r2-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fg-soft);
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
}

.r2-ticker-item i {
    color: var(--accent);
    font-size: 11px;
}

/* ------------------------------------------------------------------
   THE BIG WIDGET-VS-DUMP SHOWCASE
   This is THE section. Has to be visceral.
   ------------------------------------------------------------------ */
.r2-showcase {
    padding: var(--section-pad-y) var(--section-pad-x);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.r2-showcase-header {
    max-width: 860px;
    margin: 0 auto 56px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.r2-vs-grid {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: visible;
    background: var(--bg-card);
    position: relative;
    z-index: 2;
}

.r2-vs-side {
    padding: 40px 36px 36px;
    display: flex;
    flex-direction: column;
}

.r2-vs-bad { background: rgba(255, 80, 80, 0.02); }
.r2-vs-good { background: rgba(0, 115, 255, 0.04); border-left: 1px solid var(--border); }

.r2-vs-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 18px;
    align-self: flex-start;
}
.r2-vs-tag-bad { background: rgba(255, 107, 107, 0.10); color: var(--bad); border: 1px solid rgba(255, 107, 107, 0.25); }
.r2-vs-tag-good { background: rgba(62, 221, 174, 0.10); color: var(--good); border: 1px solid rgba(62, 221, 174, 0.25); }

.r2-vs-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--fg);
    margin: 0 0 8px 0;
}

.r2-vs-sub {
    font-size: 14px;
    color: var(--fg-soft);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* Image slot — placeholder until user drops a real screenshot */
.r2-vs-image-slot {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg-card-soft);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 24px;
}

.r2-vs-image-slot.has-image {
    border-style: solid;
    border-color: var(--border);
    background: transparent;
    padding: 0;
}

.r2-vs-image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.r2-vs-image-placeholder {
    color: var(--fg-mute);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
}
.r2-vs-image-placeholder strong {
    display: block;
    color: var(--fg-soft);
    font-family: var(--font-body);
    font-size: 14px;
    margin-bottom: 6px;
}

.r2-vs-points {
    list-style: none;
    padding: 0;
    margin: auto 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.r2-vs-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--fg-dim);
}

.r2-vs-points li i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 13px;
}

.r2-vs-bad i { color: var(--bad); }
.r2-vs-good i { color: var(--good); }

.r2-vs-divider {
    width: 1px;
    background: var(--border);
    position: relative;
}
.r2-vs-divider::after {
    content: 'VS';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    color: var(--fg-mute);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 10px 6px;
    border: 1px solid var(--border);
    border-radius: 100px;
    line-height: 1;
}

/* Plain-english translation banner */
.r2-plain-english {
    max-width: 940px;
    margin: 48px auto 0;
    padding: 28px 32px;
    background: linear-gradient(180deg, rgba(0, 115, 255, 0.06), rgba(0, 115, 255, 0.02));
    border: 1px solid var(--border-accent);
    border-radius: 0;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
}

.r2-plain-english-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.r2-plain-english p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg-dim);
}
.r2-plain-english p strong { color: var(--fg); font-weight: 600; }
.r2-plain-english p .tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

@media (max-width: 820px) {
    .r2-vs-grid {
        grid-template-columns: 1fr;
        border-radius: 0;
    }
    .r2-vs-divider { display: none; }
    .r2-vs-good { border-left: none; border-top: 1px solid var(--border); }
    .r2-vs-side { padding: 28px 24px; }
    .r2-plain-english { flex-direction: column; padding: 24px; gap: 16px; margin: 32px 16px 0; }
}

/* ------------------------------------------------------------------
   BENEFITS — 6-up corner-tick grid (R2 signature)
   ------------------------------------------------------------------ */
.r2-benefits-section { padding: var(--section-pad-y) var(--section-pad-x); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }

.r2-benefits-header {
    max-width: 860px;
    margin: 0 auto 64px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.r2-benefits-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    /* Square corners — corner ticks ARE the corner treatment (R2 signature). */
    border-radius: 0;
    background: var(--bg-card-soft);
    position: relative;
    overflow: visible;
    z-index: 2;
}

.r2-benefit {
    padding: 32px 28px 36px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.r2-benefit:nth-child(3n) { border-right: none; }
.r2-benefit:nth-child(n+4) { /* second row */ }
.r2-benefits-grid .r2-benefit:nth-last-child(-n+3) { border-bottom: none; }

.r2-benefit:hover {
    background: rgba(0, 115, 255, 0.025);
}

.r2-benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 20px;
}

.r2-benefit-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 500;
    color: var(--fg);
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.r2-benefit-desc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--fg-dim);
    margin: 0;
}

@media (max-width: 900px) {
    .r2-benefits-grid { grid-template-columns: repeat(2, 1fr); }
    .r2-benefit:nth-child(3n) { border-right: 1px solid var(--border); }
    .r2-benefit:nth-child(2n) { border-right: none; }
    .r2-benefits-grid .r2-benefit:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
    .r2-benefits-grid .r2-benefit:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 600px) {
    .r2-benefits-grid { grid-template-columns: 1fr; }
    .r2-benefit { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
    .r2-benefits-grid .r2-benefit:last-child { border-bottom: none !important; }
}

/* ------------------------------------------------------------------
   COMPARISON TABLE
   ------------------------------------------------------------------ */
.r2-compare-section { padding: var(--section-pad-y) var(--section-pad-x); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }

.r2-compare-header {
    max-width: 860px;
    margin: 0 auto 56px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.r2-compare-card {
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: visible;
    background: var(--bg-card);
    position: relative;
    z-index: 2;
}

.r2-compare-table { width: 100%; border-collapse: collapse; }
.r2-compare-table th,
.r2-compare-table td {
    padding: 18px 24px;
    text-align: left;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}
.r2-compare-table thead th {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-soft);
    background: rgba(255, 255, 255, 0.02);
    padding-top: 22px;
    padding-bottom: 22px;
}
.r2-compare-table th.us, .r2-compare-table td.us {
    background: rgba(0, 115, 255, 0.04);
    color: var(--fg);
}
.r2-compare-table th.us { color: var(--accent); }
.r2-compare-table tr:last-child td { border-bottom: none; }
.r2-compare-table td.us { font-weight: 500; }
.r2-compare-table .feat { color: var(--fg); font-weight: 500; }
.r2-compare-table .yes { color: var(--good); }
.r2-compare-table .no { color: var(--fg-mute); }
.r2-compare-table .no::before { content: '— '; }
.r2-compare-table .yes i { margin-right: 6px; }

@media (max-width: 720px) {
    .r2-compare-table th, .r2-compare-table td {
        padding: 14px 14px;
        font-size: 13px;
    }
}

/* ------------------------------------------------------------------
   USE CASES — 4 cards
   ------------------------------------------------------------------ */
.r2-use-section { padding: var(--section-pad-y) var(--section-pad-x); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }

.r2-use-header {
    max-width: 860px;
    margin: 0 auto 56px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.r2-use-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
}

.r2-use-card {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg-card-soft);
    transition: border-color 0.2s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.r2-use-card:hover {
    border-color: var(--border-accent);
    background: rgba(0, 115, 255, 0.02);
}

.r2-use-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 14px;
}

.r2-use-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--fg);
    margin: 0 0 10px 0;
}

.r2-use-card p {
    font-size: 15px;
    line-height: 1.55;
    color: var(--fg-dim);
    margin: 0;
}

@media (max-width: 700px) {
    .r2-use-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   PRICING TEASER
   ------------------------------------------------------------------ */
.r2-price-section { padding: var(--section-pad-y) var(--section-pad-x); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }

.r2-price-card {
    max-width: 880px;
    margin: 0 auto;
    padding: 56px 48px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(0, 115, 255, 0.04), rgba(0, 115, 255, 0.01));
    text-align: center;
    position: relative;
    z-index: 2;
}

.r2-price-tag {
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 500;
    color: var(--fg);
    letter-spacing: -0.025em;
    line-height: 1;
    margin-bottom: 12px;
}
.r2-price-tag .pertag {
    font-size: 16px;
    color: var(--fg-soft);
    font-weight: 400;
}

.r2-price-card p {
    color: var(--fg-dim);
    font-size: 16px;
    max-width: 580px;
    margin: 0 auto 28px;
    line-height: 1.55;
}

@media (max-width: 600px) {
    .r2-price-card { padding: 40px 24px; }
}

/* ------------------------------------------------------------------
   FINAL CTA
   ------------------------------------------------------------------ */
.r2-final {
    padding: var(--section-pad-y) var(--section-pad-x);
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at center, rgba(0, 115, 255, 0.10) 0%, transparent 70%);
}

.r2-final-inner { position: relative; max-width: 760px; margin: 0 auto; z-index: 2; }

.r2-final .r2-h2 { margin-bottom: 16px; }
.r2-final .r2-lead { margin-left: auto; margin-right: auto; margin-bottom: 28px; }

/* ------------------------------------------------------------------
   FOOTER (mirrors hero design but namespaced)
   ------------------------------------------------------------------ */
.r2-footer {
    padding: 56px var(--section-pad-x) 32px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
}

.r2-footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 48px;
}

.r2-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.r2-footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
}
.r2-footer-brand .logo img { width: 24px; height: 24px; }
.r2-footer-brand p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--fg-soft);
    margin: 0;
    max-width: 240px;
}

.r2-footer-col h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-soft);
    margin: 0 0 16px 0;
}
.r2-footer-col a {
    display: block;
    font-size: 14px;
    color: var(--fg-dim);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.15s ease;
}
.r2-footer-col a:hover { color: var(--fg); }

.r2-footer-bottom {
    max-width: var(--container);
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--fg-mute);
    text-align: center;
}

@media (max-width: 900px) {
    .r2-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .r2-footer-brand { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------
   NAV (slim, R2-style — replaces the pill nav)
   ------------------------------------------------------------------ */
.r2-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 14px var(--section-pad-x);
}

.r2-nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.r2-nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.r2-nav .brand img { width: 26px; height: 26px; }

.r2-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.r2-nav-links a {
    font-size: 14px;
    color: var(--fg-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.r2-nav-links a:hover { color: var(--fg); }

.r2-nav-cta { display: flex; align-items: center; gap: 8px; }

.r2-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--fg);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

@media (max-width: 880px) {
    .r2-nav-links { display: none; }
    .r2-mobile-toggle { display: block; }
    .r2-nav-cta .r2-btn-secondary { display: none; }
}

.r2-mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 24px var(--section-pad-x);
    z-index: 99;
}
.r2-mobile-menu.open { display: block; }
.r2-mobile-menu a {
    display: block;
    padding: 14px 0;
    color: var(--fg);
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
}

/* ------------------------------------------------------------------
   FADE-IN — pure CSS, runs once on page paint. No JS, no observer,
   no risk of content staying invisible. Sections fade in over 600ms
   ease-out on load and stay visible. Hero gets a slight stagger.
   ------------------------------------------------------------------ */
@keyframes r2-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.r2-fade {
    opacity: 1;
    transform: translateY(0);
    animation: r2-fade-up 600ms ease-out both;
}

/* Hero stagger — title first, then subtitle, then CTAs. */
.r2-hero .r2-h1 { animation: r2-fade-up 700ms ease-out 0ms both; }
.r2-hero .r2-lead { animation: r2-fade-up 700ms ease-out 120ms both; }
.r2-hero .r2-cta-row { animation: r2-fade-up 700ms ease-out 240ms both; }

@media (prefers-reduced-motion: reduce) {
    .r2-fade,
    .r2-hero .r2-h1,
    .r2-hero .r2-lead,
    .r2-hero .r2-cta-row {
        animation: none;
    }
}
