/* ============================================
   Avgångstavlan — Transit Board Aesthetic
   Dark departure-board theme with SL blue + amber
   ============================================ */

:root {
    --bg: #08090d;
    --bg-raised: #0f1117;
    --bg-card: #141620;
    --bg-card-hover: #1a1d2c;
    --surface: #1c1f2e;
    --border: #252838;
    --border-light: #2e3248;

    --text: #e8eaf0;
    --text-muted: #8b8fa6;
    --text-dim: #5c6080;

    --accent: #f0a030;
    --accent-glow: rgba(240, 160, 48, 0.15);
    --sl-blue: #0074bf;
    --sl-blue-dim: rgba(0, 116, 191, 0.12);

    --metro-red: #e4002b;
    --bus-blue: #0074bf;
    --tram-orange: #d47e00;
    --train-pink: #a6206a;
    --ferry-teal: #00838f;

    --green: #34c759;
    --green-dim: rgba(52, 199, 89, 0.1);

    --font-display: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'DM Mono', 'SF Mono', monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset & Base ---- */

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

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

body {
    font-family: var(--font-display);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #ffc060;
}

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

/* ---- Grain overlay ---- */

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    height: 64px;
    background: rgba(8, 9, 13, 0.8);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: -0.01em;
}

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

.nav-icon {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-link.active {
    color: var(--text);
    background: var(--surface);
    font-weight: 500;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

.nav-toggle.open span:first-child {
    transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav-toggle.open span:last-child {
    transform: rotate(-45deg) translate(2.5px, -2.5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(8, 9, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-out);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-muted);
    border-radius: 10px;
    transition: all 0.15s;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--text);
    background: var(--surface);
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .mobile-menu { display: flex; }
}

/* ---- Hero ---- */

.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 6vw, 6rem);
    padding: 6rem clamp(1.5rem, 5vw, 4rem) 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

/* Departure board */

.hero-board {
    flex-shrink: 0;
    width: clamp(300px, 38vw, 420px);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.3),
        0 20px 60px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.03);
    animation: boardIn 0.8s var(--ease-out) both;
}

@keyframes boardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.board-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.board-rows {
    padding: 0.4rem 0;
}

.board-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.2rem;
    transition: background 0.15s;
    animation: rowIn 0.5s var(--ease-out) both;
}

@keyframes rowIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.board-row:hover {
    background: rgba(255,255,255,0.02);
}

.line-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0;
    border-radius: 6px;
    text-align: center;
    color: #fff;
    letter-spacing: 0.02em;
}

.line-badge.metro { background: var(--metro-red); }
.line-badge.bus { background: var(--bus-blue); }
.line-badge.tram { background: var(--tram-orange); }
.line-badge.train { background: var(--train-pink); }
.line-badge.ferry { background: var(--ferry-teal); }

.destination {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-time-col {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

.board-time-col.now {
    color: var(--green);
    font-weight: 500;
}

/* Hero text */

.hero-text {
    max-width: 480px;
    animation: textIn 0.8s var(--ease-out) 0.2s both;
}

@keyframes textIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-icon {
    border-radius: 22%;
    box-shadow:
        0 4px 16px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.06);
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: clamp(2.8rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 1.2rem;
}

.highlight {
    color: var(--accent);
    position: relative;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 400px;
}

.app-store-btn {
    display: inline-block;
    transition: transform 0.2s var(--ease-spring), opacity 0.2s;
}

.app-store-btn:hover {
    transform: scale(1.04);
    opacity: 0.9;
}

/* ---- Features ---- */

.features {
    padding: 4rem clamp(1.5rem, 5vw, 4rem) 5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.features-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}

.label-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    transition: background 0.25s;
}

.feature-card:hover {
    background: var(--bg-card-hover);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sl-blue-dim);
    color: var(--sl-blue);
    border-radius: 12px;
    margin-bottom: 1.1rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ---- Privacy banner ---- */

.privacy-banner {
    padding: 0 clamp(1.5rem, 5vw, 4rem) 5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.privacy-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2.5rem;
}

.privacy-icon-large {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-dim);
    color: var(--green);
    border-radius: 16px;
}

.privacy-banner-inner h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.privacy-banner-inner p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

.text-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.text-link:hover {
    color: #ffc060;
}

/* ---- Page Header (Privacy + Support) ---- */

.page-header {
    padding: 8rem clamp(1.5rem, 5vw, 4rem) 2rem;
    max-width: 760px;
    margin: 0 auto;
}

.page-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 0.75rem;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.page-updated {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ---- Content Body ---- */

.content-section {
    padding: 0 clamp(1.5rem, 5vw, 4rem) 5rem;
    max-width: 760px;
    margin: 0 auto;
}

.content-body h2 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.content-body h2:first-of-type,
.content-body .policy-highlight + h2,
.content-body .contact-banner + h2 {
    border-top: none;
    padding-top: 0;
}

.content-body p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.content-body ul,
.content-body ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.content-body li {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.35rem;
}

.content-body li::marker {
    color: var(--text-dim);
}

.content-body strong {
    color: var(--text);
    font-weight: 500;
}

/* Policy highlight box */

.policy-highlight {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--green-dim);
    border: 1px solid rgba(52, 199, 89, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.policy-highlight-icon {
    flex-shrink: 0;
    color: var(--green);
    margin-top: 0.1rem;
}

.policy-highlight strong {
    color: var(--green);
}

/* Contact box */

.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-top: 0.75rem;
}

.contact-box p {
    margin-bottom: 0;
}

/* Contact banner (support page) */

.contact-banner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-banner h2 {
    font-size: 1.3rem;
    border: none !important;
    padding-top: 0 !important;
    margin: 0 0 0.5rem !important;
}

.contact-banner p {
    max-width: 440px;
    margin: 0 auto 1.5rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    transition: all 0.2s var(--ease-spring);
}

.contact-btn:hover {
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* FAQ */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.faq-item {
    background: var(--bg-card);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    transition: background 0.15s;
}

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

.faq-item summary:hover {
    background: var(--bg-card-hover);
}

.faq-q {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
}

.faq-chevron {
    flex-shrink: 0;
    color: var(--text-dim);
    transition: transform 0.25s var(--ease-out);
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-a {
    padding: 0 1.25rem 1.25rem;
}

.faq-a p,
.faq-a ol {
    font-size: 0.88rem;
}

/* System requirements */

.system-req h2 {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.req-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.req-item {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.req-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.req-value {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
}

/* ---- Footer ---- */

.footer {
    border-top: 1px solid var(--border);
    padding: 2rem clamp(1.5rem, 5vw, 4rem);
    margin-top: 2rem;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-copy {
    color: var(--text-dim);
    font-weight: 400;
    margin-left: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-dim);
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--text-muted);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 7rem;
        gap: 2.5rem;
    }

    .hero-board {
        width: 100%;
        max-width: 380px;
        order: -1;
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .app-store-btn {
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .privacy-banner-inner {
        flex-direction: column;
        padding: 1.75rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .req-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .contact-banner {
        padding: 1.75rem;
    }
}
