/* Agrogat — velkomstside (uautentiserte brukere) */
:root {
    --ag-bg: #0d1117;
    --ag-surface: #161b22;
    --ag-border: #30363d;
    --ag-text: #c9d1d9;
    --ag-muted: #8b949e;
    --ag-accent: #58a6ff;
    --ag-green: #3fb950;
    --ag-amber: #d29922;
}

html { scroll-behavior: smooth; }

body.welcome-page {
    background: var(--ag-bg);
    color: var(--ag-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.welcome-nav {
    background: rgba(22, 27, 34, 0.92);
    border-bottom: 1px solid var(--ag-border);
    backdrop-filter: blur(8px);
}

/* Subtle text-only nav link for secondary nav items */
.nav-link-plain {
    font-size: .8125rem;
    font-weight: 500;
    color: #8b949e;
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
}
.nav-link-plain:hover,
.nav-link-plain.active { color: #f0f6fc; }

.welcome-hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 4.5rem;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(88, 166, 255, 0.12), transparent),
        radial-gradient(ellipse 50% 40% at 100% 50%, rgba(63, 185, 80, 0.08), transparent),
        var(--ag-bg);
}

.welcome-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(48, 54, 61, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 54, 61, 0.35) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 85%);
    pointer-events: none;
}

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

.welcome-headline {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.welcome-sub {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: var(--ag-muted);
    max-width: 42rem;
}

.welcome-badge-edge {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--ag-green);
    color: var(--ag-green);
    background: rgba(63, 185, 80, 0.1);
}

.segment-card {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: 0.75rem;
    height: 100%;
    transition: border-color 0.2s, transform 0.2s;
}

.segment-card:hover {
    border-color: var(--ag-accent);
    transform: translateY(-2px);
}

.segment-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.segment-icon.agro { background: rgba(63, 185, 80, 0.15); color: var(--ag-green); }
.segment-icon.geo  { background: rgba(88, 166, 255, 0.15); color: var(--ag-accent); }

.arch-flow {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: 0.75rem;
}

.arch-step {
    text-align: center;
    padding: 1rem 0.5rem;
}

.arch-step .step-icon {
    width: 2.75rem;
    height: 2.75rem;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: #21262d;
    border: 1px solid var(--ag-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ag-accent);
}

.arch-arrow {
    color: var(--ag-muted);
    font-size: 1.25rem;
    align-self: center;
}

.welcome-footer {
    background: #010409;
    border-top: 1px solid var(--ag-border);
    color: var(--ag-muted);
    font-size: 0.9rem;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface);
    font-size: 0.8rem;
    color: var(--ag-text);
}

.btn-ag-primary {
    background: var(--ag-accent);
    border-color: var(--ag-accent);
    color: #0d1117;
    font-weight: 600;
}

.btn-ag-primary:hover {
    background: #79b8ff;
    border-color: #79b8ff;
    color: #0d1117;
}

.btn-ag-outline {
    border-color: var(--ag-border);
    color: var(--ag-text);
}

.btn-ag-outline:hover {
    background: var(--ag-surface);
    border-color: var(--ag-muted);
    color: #fff;
}

.feature-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--ag-green);
    font-weight: 700;
}

/* Global use-case history cards */
.usecase-section {
    background: linear-gradient(180deg, var(--ag-bg) 0%, #0a0e14 100%);
    border-top: 1px solid var(--ag-border);
}

.usecase-grid > [class*="col-"] {
    display: flex;
}

.history-card {
    border-radius: 0.875rem;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid var(--ag-border);
    display: flex;
    flex-direction: column;
}

.history-card-header {
    padding: 1.75rem 1.75rem 0;
}

.history-card-body {
    padding: 1.25rem 1.75rem 1.75rem;
    flex: 1;
}

.history-card-footer {
    padding: 1rem 1.75rem 1.75rem;
    margin-top: auto;
}

.history-card--agro {
    background: linear-gradient(160deg, #0f1a12 0%, #161b22 45%, #121810 100%);
    border-color: rgba(63, 185, 80, 0.25);
}

.history-card--agro .history-card-accent {
    color: #3fb950;
    background: rgba(63, 185, 80, 0.12);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.history-card--agro .history-card-gold {
    color: #e3b341;
}

.history-card--agro .history-card-topline {
    background: linear-gradient(90deg, rgba(63, 185, 80, 0.6), rgba(227, 179, 65, 0.35), transparent);
    height: 3px;
}

.history-card--geotech {
    background: linear-gradient(160deg, #0d1219 0%, #161b22 45%, #0a1018 100%);
    border-color: rgba(88, 166, 255, 0.22);
}

.history-card--geotech .history-card-accent {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.28);
}

.history-card--geotech .history-card-topline {
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.55), rgba(139, 148, 158, 0.35), transparent);
    height: 3px;
}

.history-card-location {
    font-size: 0.75rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-weight: 600;
}

.history-card-title {
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.history-card-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-card-lead {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #b1bac4;
}

.history-card-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ag-muted);
}

.history-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    background: rgba(33, 38, 45, 0.85);
    border: 1px solid var(--ag-border);
    color: var(--ag-text);
}

.history-card--agro .history-stat-pill i { color: #3fb950; }
.history-card--geotech .history-stat-pill i { color: #58a6ff; }

/* Arctic / permafrost — frost-blue & slate */
.history-card--arctic {
    background: linear-gradient(160deg, #0a1218 0%, #141b24 45%, #0c1117 100%);
    border-color: rgba(121, 184, 255, 0.22);
}

.history-card--arctic .history-card-accent {
    color: #79b8ff;
    background: rgba(121, 184, 255, 0.1);
    border: 1px solid rgba(121, 184, 255, 0.28);
}

.history-card--arctic .history-card-frost {
    color: #a8b9cc;
}

.history-card--arctic .history-card-topline {
    background: linear-gradient(90deg, rgba(168, 185, 204, 0.55), rgba(121, 184, 255, 0.4), transparent);
    height: 3px;
}

.history-card--arctic .history-stat-pill i { color: #79b8ff; }

/* Mekong Delta — emerald & river-mud accents */
.history-card--delta {
    background: linear-gradient(160deg, #0a1610 0%, #121f18 40%, #1a1510 100%);
    border-color: rgba(46, 160, 67, 0.28);
}

.history-card--delta .history-card-accent {
    color: #2ea043;
    background: rgba(46, 160, 67, 0.12);
    border: 1px solid rgba(46, 160, 67, 0.32);
}

.history-card--delta .history-card-emerald {
    color: #7ee787;
}

.history-card--delta .history-card-topline {
    background: linear-gradient(90deg, rgba(46, 160, 67, 0.55), rgba(139, 105, 20, 0.35), transparent);
    height: 3px;
}

.history-card--delta .history-stat-pill i { color: #2ea043; }

.history-card-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85em;
    background: rgba(110, 118, 129, 0.2);
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
}

/* Agrogat for Good — pro bono / community */
.good-section {
    background: linear-gradient(180deg, #0d1117 0%, #12100e 50%, #0a0c10 100%);
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    border-bottom: 1px solid rgba(212, 165, 116, 0.12);
    position: relative;
    overflow: hidden;
}

.good-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(212, 165, 116, 0.06), transparent 70%);
    pointer-events: none;
}

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

.good-pillar-row > [class*="col-"] {
    display: flex;
}

.good-section-inner {
    max-width: 44rem;
}

.good-section-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d4a574;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 165, 116, 0.35);
    background: rgba(212, 165, 116, 0.08);
}

.good-section-eyebrow .bi-heart-fill {
    font-size: 0.7rem;
    opacity: 0.9;
}

.good-section-headline {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.good-section-sub {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #b1bac4;
    max-width: 40rem;
}

.good-pillar {
    height: 100%;
    padding: 2rem 2rem 2.25rem;
    border-radius: 0.875rem;
    background: rgba(22, 27, 34, 0.65);
    border: 1px solid rgba(212, 165, 116, 0.15);
    transition: border-color 0.25s, background 0.25s;
}

.good-pillar:hover {
    border-color: rgba(212, 165, 116, 0.35);
    background: rgba(22, 27, 34, 0.85);
}

.good-pillar-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.good-pillar-icon--research {
    color: #79b8ff;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.good-pillar-icon--community {
    color: #d4a574;
    background: rgba(212, 165, 116, 0.12);
    border: 1px solid rgba(212, 165, 116, 0.25);
}

.good-pillar-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.good-pillar-text {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--ag-muted);
}

.good-section-closing {
    font-size: 0.9rem;
    color: var(--ag-muted);
    max-width: 28rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(48, 54, 61, 0.6);
}
