/* EarthNow site. Always dark, like the application (NFR-UX-005): black space
   behind a lit globe. The palette follows frontend/src/style.css. */

:root {
    color-scheme: dark;
    --space: #000000;
    --bg: #05070c;
    --surface: rgba(14, 18, 26, 0.86);
    --border: #2a3140;
    --text: #d8dee9;
    --muted: #8a93a6;
    --faint: #5f6778;
    --accent: #34d399;
    --ocean: #1d4f91;
    --on-accent: #06140e;

    /* The time the globe takes to turn once. */
    --turn: 60s;
    /* The globe's largest diameter; tools/genicons.py sizes docs/earth.jpg to
       twice it (SITE_ORB_PX). */
    --orb: 380px;
    --radius: 14px;
    --gutter: 16px;
    --max: 1040px;
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(1100px 600px at 85% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
        radial-gradient(900px 500px at -10% 35%, color-mix(in srgb, var(--ocean) 22%, transparent), transparent 60%),
        var(--bg);
    color: var(--text);
    font: 17px/1.6 var(--font);
    overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: 3px; }

img { max-width: 100%; }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    /* Sides only: a shorthand here outranks `section`'s vertical padding. */
    padding-inline: var(--gutter);
}

/* Header */

.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.brand img { width: 34px; height: 34px; }

.site-head nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }

.site-head nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }

.site-head nav a:hover,
.site-head nav a:focus-visible { color: var(--text); }

/* Hero */

.hero {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
    padding-top: 48px;
    padding-bottom: 72px;
}

.eyebrow {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.pill {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.8rem;
    color: var(--muted);
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}

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

.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }

.lead strong { color: var(--text); font-weight: 600; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover,
.btn:focus-visible { border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    border-color: transparent;
    color: var(--on-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible { background: color-mix(in srgb, var(--accent) 88%, white); border-color: transparent; }

/* The orb: NASA's Blue Marble, the application's own texture, never drawn
   (CON-009). The land layer turns; the light stays where it is. */

.orb-stage {
    display: grid;
    place-items: center;
    padding: 24px;
}

.orb {
    position: relative;
    width: min(100%, var(--orb));
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--space);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 0 60px color-mix(in srgb, var(--ocean) 55%, transparent);
}

.land,
.shade {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

/* The texture is twice as wide as it is tall, so it is drawn at 200% of the
   orb's width; moving its position by -200% slides it one whole width, west to
   east as the Earth turns. repeat-x closes the seam. */
.land {
    background: url("earth.jpg") repeat-x 0% 50% / 200% 100%;
    animation: turn var(--turn) linear infinite;
}

.shade {
    background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.2), transparent 40%);
    box-shadow: inset -28px -34px 60px rgba(0, 0, 0, 0.7);
}

@keyframes turn { to { background-position: -200% 50%; } }

/* Sections */

section { padding-top: 72px; padding-bottom: 24px; }

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.015em;
    line-height: 1.1;
    margin: 0 0 16px;
}

h3 { margin: 0 0 8px; font-size: 1.12rem; }

.kicker {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    margin: 0 0 10px;
}

.prose { max-width: 40em; color: var(--muted); }

.prose p { margin: 0 0 16px; }

.prose strong { color: var(--text); }

/* What you see */

.features,
.sources,
/* Downloads: the house card per platform (SymDiary, BridgeTalk). Each card is a
   column, so the parts line up across the row however much each has to say. */

.dl-version {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 14px;
}

.downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.dl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dl-card .ico { font-size: 30px; }

.dl-card h3 { margin: 4px 0 0; }

.dl-card .req { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* One button per card and all three the same: the platform is the choice. */
.dl-card .btn { align-self: center; margin: 14px 0 4px; }

.dl-card .meta { color: var(--muted); font-size: 0.8rem; min-height: 1.2em; margin: 0; }

.dl-card .how { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }

.dl-links { text-align: center; margin-top: 20px; font-size: 0.9rem; }

.feature,
.source,
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
}

.feature p,
.source p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.feature .glyph { display: block; font-size: 1.9rem; line-height: 1; margin-bottom: 12px; }

.kinds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.kinds span {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 0.9rem;
    color: var(--muted);
}

.source h3 { color: var(--accent); }

.note { margin-top: 18px; color: var(--faint); font-size: 0.9rem; font-style: italic; }

/* Screenshots of the application, full width of the column */

.shot { margin: 28px 0 0; }

.shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.shot figcaption { margin-top: 10px; color: var(--faint); font-size: 0.9rem; }

/* Calm by design */

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.card h3 { margin-bottom: 12px; }

.card ul { margin: 0; padding-left: 20px; color: var(--muted); }

.card li { margin-bottom: 8px; }

.card li strong { color: var(--text); }

/* Install */

.after-steps { margin-top: 20px; }

code {
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 6px;
    overflow-wrap: anywhere;
}

/* Support: the house donate section, last before the footer (FR-DON-010). */

.support .cta { margin-top: 20px; }

.btn-donate img {
    display: block;
    height: 2.7em;
    width: auto;
}

/* Footer */

.site-foot {
    margin-top: 72px;
    padding-top: 28px;
    padding-bottom: 40px;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-foot a { color: var(--muted); }

/* Phones */

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
    .two-col { grid-template-columns: 1fr; }
    .site-head nav { gap: 12px; }
}

@media (max-width: 480px) {
    body { font-size: 16px; }
    .site-head nav a.hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
