/* ============================================================
   HAMIOS Website – Matching app color scheme
   Palette derived from the HAMIOS PySide6/Qt6 interface:
   - Deep navy background  #080c14 / #0d1525
   - Orange primary accent #e8890c  (alerts, active states)
   - Green  good           #2ecc71
   - Cyan   info           #00b4c8
   - Red    poor/closed    #e03c3c
   - Light text            #d4dde8
   ============================================================ */

/* === 1. ROOT VARIABLES & RESET === */
:root {
    --orange:       #e8890c;
    --orange-dark:  #b96a06;
    --orange-glow:  rgba(232, 137, 12, 0.3);
    --green:        #2ecc71;
    --cyan:         #00b4c8;
    --red:          #e03c3c;
    --yellow:       #f0b429;

    --bg:           #080c14;
    --bg-alt:       #0a1020;
    --surface:      #0d1525;
    --surface-2:    #111e32;
    --surface-3:    #162038;
    --border:       #1e2d45;
    --border-bright:#2a3f5f;

    --text:         #d4dde8;
    --text-muted:   #6a85a8;
    --text-dim:     #384d68;

    --radius:       8px;
    --radius-lg:    14px;
    --max-w:        1200px;
    --transition:   0.22s ease;

    --font-ui:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono:    "SF Mono", "Fira Code", "Consolas", monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); text-decoration: underline; }

code {
    font-family: var(--font-mono);
    background: var(--surface-2);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--cyan);
    border: 1px solid var(--border);
}

/* === 2. HEADER — matches app title bar === */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
    transition: box-shadow var(--transition);
    /* subtle left-side orange rule, like the app's active panel indicator */
    border-left: 3px solid var(--orange);
}
.header--scrolled {
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.7);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Traffic-light dots matching macOS chrome on the app window */
.header__dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.header__dot--red    { background: #ff5f57; }
.header__dot--yellow { background: #febc2e; }
.header__dot--green  { background: #28c840; }

.header__title {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 0.08em;
    margin-left: 8px;
}
.header__version {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    background: var(--orange);
    color: #000;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-menu__link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 13px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition), background var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-menu__link:hover { color: var(--text); background: var(--surface-2); }
.nav-menu__link--github {
    color: var(--text);
    border: 1px solid var(--border-bright);
    margin-left: 10px;
}
.nav-menu__link--github:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(232, 137, 12, 0.06);
}
.icon-github { width: 15px; height: 15px; flex-shrink: 0; }

/* === 3. BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: var(--font-ui);
}
.btn-lg { padding: 13px 30px; font-size: 1rem; }
.btn__icon { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: var(--orange);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 18px var(--orange-glow);
}
.btn-primary:hover {
    background: #f09920;
    box-shadow: 0 6px 28px var(--orange-glow);
    transform: translateY(-1px);
    text-decoration: none;
    color: #000;
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-bright);
}
.btn-secondary:hover {
    background: var(--surface-3);
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-bright);
    text-decoration: none;
}

/* === 4. SECTION LAYOUT === */
.section { padding: 72px 24px; }
.section--alt { background: var(--bg-alt); }
.section__inner { max-width: var(--max-w); margin: 0 auto; }

.section__title {
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
    margin-bottom: 14px;
}
.section__title--left { text-align: left; }

/* Orange underline accent matching app panel headers */
.section__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    background: var(--orange);
    margin: 10px auto 0;
    border-radius: 2px;
}
.section__title--left::after { margin-left: 0; }

.section__lead {
    text-align: center;
    color: var(--text-muted);
    max-width: 660px;
    margin: 0 auto 44px;
    font-size: 1rem;
    line-height: 1.75;
}

/* === 5. HERO === */
.hero {
    padding: 72px 24px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Radar-sweep glow matching the app's map background glow */
.hero::before {
    content: "";
    position: absolute;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 500px;
    background: radial-gradient(ellipse at 50% 30%,
        rgba(232,137,12,0.07) 0%,
        rgba(0,180,200,0.04) 40%,
        transparent 70%);
    pointer-events: none;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(232,137,12,0.1);
    border: 1px solid rgba(232,137,12,0.35);
    color: var(--orange);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 4px;
    margin-bottom: 26px;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
    text-transform: uppercase;
}
/* blinking dot like the app's live indicator */
.hero__badge::before {
    content: "";
    width: 7px; height: 7px;
    background: var(--orange);
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.2; }
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.hero__title--accent { color: var(--orange); }

.hero__subtitle {
    max-width: 600px;
    margin: 0 auto 34px;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.72;
}

.hero__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hero__meta {
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-bottom: 52px;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

/* App window chrome — matching the Qt6 window frame */
.hero__screenshot-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    border: 1px solid var(--border-bright);
    border-bottom: none;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 -12px 60px rgba(232,137,12,0.08),
        0 40px 80px rgba(0,0,0,0.7);
}
/* Fake title bar matching the app */
.hero__screenshot-wrapper::before {
    content: "⚡  HF Propagation & Atmosphere Monitor  —  HAMIOS v5.0";
    display: block;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}
.hero__screenshot {
    display: block;
    width: 100%;
    height: auto;
}

/* === 6. EXTENDED EXPLANATION === */
.explain {
    max-width: var(--max-w);
    margin: 0 auto 56px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.explain__subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--orange);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.explain__subtitle::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--orange);
    flex-shrink: 0;
}

.explain__block p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 860px;
    margin-bottom: 12px;
}
.explain__block p:last-child { margin-bottom: 0; }

/* For-whom cards */
.explain__for-whom { }
.explain__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 4px;
}
.explain__card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--orange);
    border-radius: var(--radius);
    padding: 18px 18px 18px 16px;
    transition: background var(--transition), border-color var(--transition);
}
.explain__card:hover {
    background: var(--surface-2);
    border-color: var(--border-bright);
    border-left-color: var(--orange);
}
.explain__card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}
.explain__card strong {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.explain__card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 0;
}

.explain__grid-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-mono);
    text-align: center;
    margin-bottom: 20px;
}

/* === 7. FEATURES GRID === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    gap: 16px;
    margin-top: 44px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    /* Left orange rule — matches app panel style */
    border-left: 3px solid transparent;
}
.feature-card:hover {
    border-color: var(--border-bright);
    border-left-color: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    background: var(--surface-2);
}
.feature-card__icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    display: block;
}
.feature-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 9px;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.65;
}

/* === 7. CHANGELOG — matches app notification panel === */
.changelog {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}
.changelog::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 28px; bottom: 28px;
    width: 2px;
    background: var(--border);
}

.changelog__item {
    position: relative;
    padding: 18px 22px 18px 50px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: border-color var(--transition);
}
.changelog__item::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 26px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--border-bright);
    border: 2px solid var(--bg-alt);
}
.changelog__item:hover { border-color: var(--border-bright); }

.changelog__item--latest {
    border-color: var(--orange);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(232,137,12,0.04) 100%);
}
.changelog__item--latest::before { background: var(--orange); }

.changelog__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}
.changelog__version {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}
.changelog__date {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}
.changelog__badge {
    background: var(--orange);
    color: #000;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 3px;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
    text-transform: uppercase;
}
.changelog__headline {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 9px;
    font-size: 0.9rem;
}
.changelog__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.changelog__list li {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-left: 16px;
    position: relative;
}
.changelog__list li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--orange);
    font-weight: 700;
}
.changelog__item--link {
    background: transparent;
    border: 1px dashed var(--border);
    text-align: center;
    padding: 13px;
}
.changelog__item--link::before { display: none; }
.changelog__item--link a { color: var(--orange); font-weight: 500; font-size: 0.9rem; }

/* === 8. SCREENSHOTS === */
.screenshots-grid { margin-bottom: 18px; }
.screenshot-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.screenshot-card__img {
    display: block;
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--border);
}
.screenshot-card__caption {
    padding: 12px 18px;
    color: var(--text-muted);
    font-size: 0.83rem;
    font-family: var(--font-mono);
}
.screenshots__note {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
}
.screenshots__note a { color: var(--orange); }

/* === 9. DOWNLOAD — status-card style from app === */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 44px;
}
.download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.download-card--primary {
    border-color: var(--orange);
    border-top: 3px solid var(--orange);
    background: linear-gradient(160deg, var(--surface) 0%, rgba(232,137,12,0.05) 100%);
    box-shadow: 0 0 0 1px rgba(232,137,12,0.12), 0 8px 32px rgba(232,137,12,0.06);
}
.download-card__icon { font-size: 2rem; }
.download-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
}
.download-card__desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.65;
}
.download-card__requirements {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.download-card__requirements li {
    color: var(--text-muted);
    font-size: 0.83rem;
    padding-left: 18px;
    position: relative;
}
.download-card__requirements li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

.install-steps {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cyan);
    border-radius: var(--radius);
    padding: 26px 28px;
    max-width: 640px;
    margin: 0 auto;
}
.install-steps__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 14px;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.install-steps__list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding-left: 20px;
}
.install-steps__list li {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.65;
}
.install-steps__list strong { color: var(--text); }

/* === 10. ABOUT === */
.about-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 52px;
    align-items: start;
}
.about-text p {
    color: var(--text-muted);
    margin-bottom: 14px;
    max-width: 540px;
    line-height: 1.75;
    font-size: 0.95rem;
}
.about-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.about-specs__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
    font-family: var(--font-mono);
}
.specs-table { border-collapse: collapse; }
.specs-table th, .specs-table td {
    padding: 8px 16px 8px 0;
    font-size: 0.84rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
}
.specs-table th {
    color: var(--text-dim);
    font-weight: 600;
    width: 130px;
    padding-right: 22px;
}
.specs-table td { color: var(--text); }
.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }

/* === 11. FOOTER — matches app bottom status bar === */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 30px 24px;
    text-align: center;
}
.footer__inner { max-width: var(--max-w); margin: 0 auto; }
.footer__title {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}
.footer__sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.footer__sub a { color: var(--orange); }
.footer__copy {
    color: var(--text-dim);
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

/* === 12. BAND STATUS DECORATIVE BAR — like app band reliability strip === */
.band-bar {
    height: 4px;
    width: 100%;
    background: linear-gradient(to right,
        #e03c3c 0%,        /* 160m red */
        #e03c3c 11%,
        #f0b429 11%,       /* 80m yellow */
        #f0b429 22%,
        #f0b429 22%,       /* 60m */
        #f0b429 33%,
        #2ecc71 33%,       /* 40m green */
        #2ecc71 44%,
        #2ecc71 44%,       /* 30m */
        #2ecc71 55%,
        #2ecc71 55%,       /* 20m */
        #2ecc71 66%,
        #f0b429 66%,       /* 17m */
        #f0b429 77%,
        #f0b429 77%,       /* 15m */
        #f0b429 88%,
        #e03c3c 88%,       /* 10m closed */
        #e03c3c 100%
    );
    margin: 0;
    opacity: 0.7;
}

/* === 13. PROPAGATION PAGE === */

/* === HAMIOS ANTENNA LOGO === */

/* Small logo in header brand (replaces traffic-light dots) */
.brand-logo {
    width: 32px;
    height: 34px;
    flex-shrink: 0;
    display: block;
    overflow: visible;   /* outer arcs may extend slightly */
    margin-right: 2px;
}

/* Large logo in hero section */
.hero__logo-wrap {
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}
.hero-logo {
    display: block;
    width: 110px;
    height: 116px;
    margin: 0 auto;
    overflow: visible;
    filter: drop-shadow(0 0 18px rgba(200,168,75,0.35));
    animation: logo-pulse 3.5s ease-in-out infinite;
}
@keyframes logo-pulse {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(200,168,75,0.30)); }
    50%       { filter: drop-shadow(0 0 28px rgba(200,168,75,0.55)); }
}

/* Active nav link */
.nav-menu__link--active {
    color: var(--orange) !important;
    background: rgba(232,137,12,0.08);
}

/* Page hero */
.prop-hero {
    padding: 64px 24px 56px;
    text-align: center;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.prop-hero::before {
    content: "";
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 400px;
    background: radial-gradient(ellipse at 50% 30%, rgba(232,137,12,0.07) 0%, transparent 70%);
    pointer-events: none;
}
.prop-hero__inner { max-width: var(--max-w); margin: 0 auto; }
.prop-hero__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin: 14px 0 18px;
    letter-spacing: -0.02em;
}
.prop-hero__sub {
    max-width: 680px;
    margin: 0 auto 36px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
}
.prop-hero__toc {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.prop-toc__link {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    text-decoration: none;
    transition: all var(--transition);
}
.prop-toc__link:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(232,137,12,0.06);
    text-decoration: none;
}

/* Atmosphere diagram */
.atm-diagram {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 680px;
    margin: 40px auto 48px;
}
.atm-layer {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--layer-color, var(--border));
    border-radius: var(--radius);
    padding: 10px 16px;
    transition: background var(--transition);
}
.atm-layer--highlight {
    background: linear-gradient(90deg, rgba(232,137,12,0.06) 0%, var(--surface) 100%);
    border-color: var(--orange);
}
.atm-layer--secondary {
    background: linear-gradient(90deg, rgba(0,180,200,0.05) 0%, var(--surface) 100%);
}
.atm-layer__alt {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
}
.atm-layer__name {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}
.atm-layer--highlight .atm-layer__name { color: var(--orange); }
.atm-layer__note {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Prose blocks */
.prose { max-width: 860px; margin: 0 auto; }
.prose__h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--orange);
    font-family: var(--font-mono);
    margin: 32px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.prose__h3::before {
    content: "//";
    color: var(--text-dim);
    font-weight: 400;
}
.prose p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

/* Layer cards */
.layer-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.layer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
}
.layer-card--d  { border-top: 3px solid #6a7a9b; }
.layer-card--e  { border-top: 3px solid var(--yellow); }
.layer-card--f1 { border-top: 3px solid var(--cyan); }
.layer-card--f2 { border-top: 3px solid var(--green); background: linear-gradient(135deg, var(--surface) 0%, rgba(46,204,113,0.04) 100%); }

.layer-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.layer-card__label {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    background: var(--surface-2);
    border: 1px solid var(--border);
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.layer-card--f2 .layer-card__label { color: var(--green); border-color: var(--green); }
.layer-card--e  .layer-card__label { color: var(--yellow); border-color: var(--yellow); }
.layer-card--f1 .layer-card__label { color: var(--cyan); border-color: var(--cyan); }

.layer-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}
.layer-card__alt {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
}
.layer-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: auto;
}
.layer-badge--day    { background: rgba(240,180,41,0.15); color: var(--yellow); border: 1px solid rgba(240,180,41,0.3); }
.layer-badge--always { background: rgba(46,204,113,0.15); color: var(--green);  border: 1px solid rgba(46,204,113,0.3); }

.layer-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 12px;
    max-width: 860px;
}
.layer-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.layer-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}
.layer-fact__label {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.layer-fact__val {
    font-size: 0.85rem;
    color: var(--text);
}
.layer-fact__val--red    { color: var(--red); }
.layer-fact__val--yellow { color: var(--yellow); }
.layer-fact__val--green  { color: var(--green); }

/* Propagation modes */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 40px;
}
.mode-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    transition: border-color var(--transition), background var(--transition);
}
.mode-card:hover { border-color: var(--border-bright); background: var(--surface-2); }
.mode-card--primary {
    border-color: var(--orange);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(232,137,12,0.05) 100%);
}
.mode-card__icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.mode-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
    margin-bottom: 10px;
}
.mode-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Index cards */
.index-list { display: flex; flex-direction: column; gap: 20px; }
.index-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.index-card__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.index-card__abbr {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--orange);
    background: rgba(232,137,12,0.1);
    border: 1px solid rgba(232,137,12,0.25);
    padding: 4px 14px;
    border-radius: var(--radius);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.index-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}
.index-card > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 16px;
    max-width: 820px;
}

/* SFI scale */
.sfi-scale { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.sfi-bar {
    padding: 7px 14px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    border-left: 4px solid;
}
.sfi-bar--red    { background: rgba(224,60,60,0.1);   border-color: var(--red);    color: #e07070; }
.sfi-bar--yellow { background: rgba(240,180,41,0.1);  border-color: var(--yellow); color: var(--yellow); }
.sfi-bar--lgreen { background: rgba(0,180,200,0.08);  border-color: var(--cyan);   color: var(--cyan); }
.sfi-bar--green  { background: rgba(46,204,113,0.1);  border-color: var(--green);  color: var(--green); }

/* Kp scale */
.kp-scale { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.kp-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.87rem;
    color: var(--text-muted);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}
.kp-item:last-child { border-bottom: none; }
.kp-val {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 36px;
    text-align: center;
}
.kp-val--green  { color: var(--green); }
.kp-val--lgreen { color: var(--cyan); }
.kp-val--yellow { color: var(--yellow); }
.kp-val--orange { color: var(--orange); }
.kp-val--red    { color: var(--red); }

/* X-ray scale */
.xray-scale { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.xray-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.87rem;
    color: var(--text-muted);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}
.xray-item:last-child { border-bottom: none; }
.xray-val {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1rem;
    min-width: 36px;
    text-align: center;
}
.xray-val--green  { color: var(--green); }
.xray-val--yellow { color: var(--yellow); }
.xray-val--orange { color: var(--orange); }
.xray-val--red    { color: var(--red); }

/* HAMIOS role */
.hamios-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
    margin-bottom: 48px;
}
.role-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    position: relative;
    transition: border-color var(--transition), background var(--transition);
}
.role-card:hover { border-color: var(--orange); background: var(--surface-2); }
.role-card__num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--orange);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.role-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.role-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.75;
}

/* CTA block */
.prop-cta {
    text-align: center;
    padding: 40px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.prop-cta p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}
.prop-cta .btn { min-width: 220px; justify-content: center; }

/* === 14. PROPAGATION GRAPHICS === */

/* Atmosphere cross-section SVG */
.atm-svg-wrap {
    max-width: 800px;
    margin: 36px auto 44px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.atm-svg { display: block; width: 100%; height: auto; }

/* Propagation paths diagram */
.prop-fig {
    margin: 0 0 44px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.prop-paths-svg { display: block; width: 100%; height: auto; }
.prop-fig__cap {
    display: block;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 12px 18px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    line-height: 1.5;
}

/* Layer card mini-diagrams */
.layer-mini-svg {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 18px;
}

/* SFI / Band matrix */
.sfi-matrix-wrap {
    margin: 0 0 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    overflow-x: auto;
}
.sfi-matrix__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 18px;
}
.sfi-matrix {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 420px;
}
.sfi-matrix__row {
    display: grid;
    grid-template-columns: 52px repeat(5, 1fr);
    gap: 3px;
    align-items: center;
}
.sfi-matrix__row--head .sfi-matrix__cell--head {
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    font-weight: 700;
    text-align: center;
    padding: 6px 4px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.sfi-matrix__band-label {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    text-align: right;
    padding-right: 10px;
}
.sfi-matrix__cell {
    text-align: center;
    padding: 8px 4px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: transform 0.15s;
    cursor: default;
    border: 1px solid transparent;
}
.sfi-matrix__cell:hover { transform: scale(1.1); z-index: 1; position: relative; }

/* Cell colours */
.m-r { background: rgba(224,60,60,0.18);  color: #e07070; border-color: rgba(224,60,60,0.3); }
.m-y { background: rgba(240,180,41,0.18); color: #f0c060; border-color: rgba(240,180,41,0.3); }
.m-g { background: rgba(46,204,113,0.15); color: #60d090; border-color: rgba(46,204,113,0.25);}
.m-e { background: rgba(46,204,113,0.30); color: #2ecc71; border-color: rgba(46,204,113,0.5); box-shadow: 0 0 8px rgba(46,204,113,0.2); }

.sfi-matrix__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    align-items: center;
    grid-column: 1 / -1;
}
.ml {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
}
.ml-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* === 15. LANGUAGE SWITCHER === */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid var(--border);
}
.lang-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 5px;
    padding: 3px;
    cursor: pointer;
    line-height: 0;
    transition: border-color var(--transition), opacity var(--transition), transform var(--transition);
    opacity: 0.45;
}
.lang-btn:hover {
    opacity: 0.85;
    transform: scale(1.1);
}
.lang-btn--active {
    opacity: 1;
    border-color: var(--orange);
}
.lang-flag {
    display: block;
    width: 26px;
    height: 19px;
    border-radius: 3px;
    object-fit: cover;
}

/* === 14. RESPONSIVE === */
@media (max-width: 900px) {
    .about-layout { grid-template-columns: 1fr; gap: 30px; }
    .about-specs { order: -1; }
}
@media (max-width: 680px) {
    .header { padding: 0 16px; border-left-width: 2px; }
    .nav-menu .nav-menu__link:not(.nav-menu__link--github) { display: none; }
    .hero { padding: 52px 16px 0; }
    .section { padding: 52px 16px; }
    .hero__actions { flex-direction: column; align-items: center; }
    .download-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .section__title { font-size: 1.55rem; }
}
