/* Reach2.ai landing — brand tokens + section styles over UIkit */

:root {
    --r2-bg-deep: #0a0a12;
    --r2-bg-base: #12111f;
    --r2-bg-card: #1a1830;
    --r2-purple: #7c3aed;
    --r2-purple-glow: #a78bfa;
    --r2-green: #a3e635;
    --r2-green-soft: #d9f99d;
    --r2-text: #e2e0f0;
    --r2-text-muted: #9896b0;
    --r2-border: #2d2b44;
    /* ContextCore accent for product card */
    --cc-primary: #00d4ff;
}

.r2-page {
    background-color: var(--r2-bg-deep);
    color: var(--r2-text);
}

body.r2-body {
    background-color: var(--r2-bg-deep);
    color: var(--r2-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Section backgrounds */
.r2-section-base {
    background-color: var(--r2-bg-base);
}

.r2-section-deep {
    background-color: var(--r2-bg-deep);
}

.r2-section-card {
    background-color: var(--r2-bg-card);
}

/* Hero: radial gradient + CSS grid overlay — height follows content (no uk-height-viewport) */
.r2-hero {
    position: relative;
    background: radial-gradient(ellipse 80% 70% at 50% 40%, var(--r2-bg-card) 0%, var(--r2-bg-deep) 65%, var(--r2-bg-deep) 100%);
    overflow: hidden;
}

/* Tight top: avoids double-padding from uk-section + keeps headline near the nav */
.r2-hero-stack {
    padding-top: 0.35rem;
    padding-bottom: 2.75rem;
}

@media (min-width: 960px) {
    .r2-hero-stack {
        padding-top: 0.5rem;
        padding-bottom: 3.25rem;
    }
}

.r2-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(45, 43, 68, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 43, 68, 0.35) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    opacity: 0.55;
}

.r2-hero-inner {
    position: relative;
    z-index: 1;
}

/* UIkit defaults .uk-button to uppercase — hero CTAs use normal casing (ContextCore camelCase, sentence labels) */
.r2-hero-cta .uk-button {
    text-transform: none !important;
    letter-spacing: normal;
}

.r2-text-lead {
    color: var(--r2-green-soft) !important;
}

.r2-logo-mark {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--r2-text);
}

.r2-logo-mark .r2-logo-two {
    color: var(--r2-purple);
}

/* Navbar */
.uk-navbar-container.r2-navbar {
    background: transparent;
}

.uk-navbar-container.r2-navbar.uk-navbar-sticky {
    background: rgba(10, 10, 18, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--r2-border);
}

/* Buttons */
.r2-btn-primary {
    background-color: var(--r2-purple) !important;
    color: #fff !important;
    font-weight: 600;
    border: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.r2-btn-primary:hover {
    background-color: var(--r2-purple-glow) !important;
    color: #0a0a12 !important;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.45);
}

.r2-btn-outline {
    background: transparent !important;
    color: var(--r2-text) !important;
    border: 1px solid var(--r2-border) !important;
    font-weight: 600;
}

.r2-btn-outline:hover {
    border-color: var(--r2-purple) !important;
    color: var(--r2-purple-glow) !important;
}

/* Hero CTA — lime release button */
.r2-btn-green {
    background-color: var(--r2-green) !important;
    color: #0a0a12 !important;
    font-weight: 600;
    border: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.r2-btn-green:hover {
    background-color: var(--r2-green-soft) !important;
    color: #0a0a12 !important;
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.35);
}

/* Product cards */
.r2-product-card {
    background: var(--r2-bg-card);
    border: 1px solid var(--r2-border);
    border-radius: 8px;
    border-top-width: 4px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.r2-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.r2-accent-cc {
    border-top-color: var(--cc-primary);
}

/* ContextCore card on Reach2 — large PNG as soft background + raster icon (see context-core/ui/) */
.r2-product-card-cc-bg {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.r2-product-card-cc-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../context-core/ui/ContextCore.png");
    background-size: cover;
    background-position: 72% center;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.r2-product-card-cc-bg > * {
    position: relative;
    z-index: 1;
}

/* Legibility over the PNG — stronger stacked shadows + soft glow behind glyphs */
.r2-product-card-cc-bg .uk-card-title,
.r2-product-card-cc-bg p {
    text-shadow:
        0 0 3px rgba(0, 0, 0, 1),
        0 1px 0 rgba(0, 0, 0, 0.95),
        0 1px 2px rgba(0, 0, 0, 1),
        0 2px 8px rgba(0, 0, 0, 0.85),
        0 4px 20px rgba(0, 0, 0, 0.7),
        0 0 28px rgba(10, 10, 18, 0.95);
}

.r2-product-card-cc-bg .r2-link-product {
    text-shadow:
        0 0 3px rgba(0, 0, 0, 0.95),
        0 1px 0 rgba(0, 0, 0, 0.9),
        0 1px 3px rgba(0, 0, 0, 1),
        0 3px 14px rgba(0, 0, 0, 0.75),
        0 0 22px rgba(10, 10, 18, 0.9);
}

.r2-product-card-cc-bg .r2-badge-ready {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.95),
        0 2px 6px rgba(0, 0, 0, 0.65);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.45),
        0 2px 12px rgba(0, 0, 0, 0.25);
}

.r2-cc-product-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
}

.r2-product-card-cc-bg .r2-cc-product-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85)) drop-shadow(0 3px 10px rgba(0, 0, 0, 0.55));
}

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

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

/* Green “Ready” pill on product cards — may be a link */
.r2-badge-ready {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(163, 230, 53, 0.15);
    color: var(--r2-green-soft);
    border: 1px solid rgba(163, 230, 53, 0.35);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

a.r2-badge-ready:hover {
    color: var(--r2-green-soft);
    background: rgba(163, 230, 53, 0.28);
    border-color: rgba(163, 230, 53, 0.55);
}

.r2-badge-muted {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(152, 150, 176, 0.12);
    color: var(--r2-text-muted);
    border: 1px solid var(--r2-border);
}

.r2-link-product {
    color: var(--r2-purple-glow);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.r2-link-product:hover {
    color: var(--r2-text);
    border-bottom-color: var(--r2-purple-glow);
}

/*
 * UIkit’s .uk-light a { color: #fff } has higher specificity than lone .r2-link-product / .r2-badge-ready,
 * so product-card links read as white unless we scope under body.r2-body (same page, beats .uk-light a).
 */
body.r2-body .r2-product-card a.r2-badge-ready {
    color: var(--r2-green-soft);
}

body.r2-body .r2-product-card a.r2-badge-ready:hover {
    color: var(--r2-green-soft);
}

body.r2-body .r2-product-card a.r2-link-product:not(.r2-link-coming-soon) {
    color: var(--r2-purple-glow);
}

body.r2-body .r2-product-card a.r2-link-product:not(.r2-link-coming-soon):hover {
    color: var(--r2-text);
    border-bottom-color: var(--r2-purple-glow);
}

a.r2-link-coming-soon,
a.r2-link-coming-soon:hover {
    color: var(--r2-text-muted);
    cursor: not-allowed;
    pointer-events: none;
    border-bottom: none;
    opacity: 0.55;
}

/* Synergic mini-cards */
.r2-synergy-card {
    background: var(--r2-bg-card);
    border: 1px solid var(--r2-border);
    border-radius: 8px;
    height: 100%;
}

/* Local-first two-column accent — native CSS Grid (UIkit uk-grid uses negative margin-left; overflow:hidden on the box clipped the first column) */
.r2-pillars-row {
    border: 1px solid var(--r2-border);
    border-radius: 8px;
    overflow: hidden;
}

.r2-pillars-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 960px) {
    .r2-pillars-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 2rem;
    }
}

.r2-pillars-cell {
    padding: 1.35rem 1.5rem 1.5rem;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 960px) {
    .r2-pillars-cell {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}

.r2-pillars-cell--accent {
    background: rgba(26, 24, 48, 0.6);
}

@media (min-width: 960px) {
    .r2-pillars-cell--accent {
        border-right: 1px solid var(--r2-border);
    }
}

@media (max-width: 959px) {
    .r2-pillars-cell--accent {
        border-right: none;
        border-bottom: 1px solid var(--r2-border);
    }
}

/* CTA gradient band */
.r2-cta-band {
    background: linear-gradient(180deg, var(--r2-bg-card) 0%, var(--r2-bg-deep) 100%);
}

/* Showcase parallax band (between sections) */
.r2-showcase-band {
    position: relative;
    overflow: hidden;
}

.r2-showcase-band-inner {
    min-height: 72px;
}

.r2-showcase-parallax {
    min-height: 72px;
    background: linear-gradient(135deg, rgba(26, 24, 48, 0.95) 0%, rgba(10, 10, 18, 0.98) 50%, rgba(124, 58, 237, 0.12) 100%);
}

/* Less padding below the synergy paragraph + above the four-column band */
.r2-section-tight-after-copy {
    padding-bottom: 1.25rem !important;
}

/* Vision → Products: same background; default uk-section-large stacks a lot of padding */
.r2-section-vision-before-products {
    padding-bottom: 1.5rem !important;
}

.r2-section-products-after-vision {
    padding-top: 1.5rem !important;
}

.r2-section-tight-after-showcase {
    padding-top: 1.5rem !important;
}

.r2-showcase-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(45, 43, 68, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 43, 68, 0.2) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.4;
}

/* Footer */
.r2-footer {
    border-top: 1px solid var(--r2-border);
}

.r2-footer a {
    color: var(--r2-text-muted);
    text-decoration: none;
}

.r2-footer a:hover {
    color: var(--r2-purple-glow);
}

.r2-footer .r2-social a {
    color: var(--r2-text);
}

.r2-footer .uk-icon-button {
    background: rgba(26, 24, 48, 0.6);
    border: 1px solid var(--r2-border);
    color: var(--r2-text);
}

.r2-footer .uk-icon-button:hover {
    background: rgba(124, 58, 237, 0.25);
    border-color: var(--r2-purple);
    color: var(--r2-purple-glow);
}

/* Utility: muted text matches spec */
.r2-muted {
    color: var(--r2-text-muted);
}

/* Emphasis in vision copy */
.r2-em {
    font-style: italic;
}

/* Vision — emphasized product name (ContextCore cyan, extra weight + size) */
.r2-vision-cc-name {
    font-weight: 800;
    font-size: 1.12em;
    color: var(--cc-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.35);
}

.r2-vision-cc-name:hover {
    color: #5cefff;
    border-bottom-color: rgba(0, 212, 255, 0.65);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .r2-product-card,
    .r2-btn-primary,
    .r2-btn-outline,
    .r2-btn-green {
        transition: none;
    }

    .r2-product-card:hover {
        transform: none;
    }

    [uk-parallax],
    [uk-scrollspy] {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .r2-showcase-parallax {
        transform: none !important;
    }
}
