/* Thunor.App — calm-tech design system
   Paper, ink and one quiet accent. No gradients, no glow, little motion. */

:root {
    --bg: #f4f2ed;
    --surface: #fbfaf7;
    --ink: #1c2220;
    --muted: #59615d;
    --subtle: #848b87;
    --line: rgba(28, 34, 32, 0.10);
    --line-strong: rgba(28, 34, 32, 0.18);
    --accent: #1f5f58;
    --accent-soft: rgba(31, 95, 88, 0.08);
    --button-bg: #1c2220;
    --button-ink: #f4f2ed;
    --shadow: 0 1px 2px rgba(28, 34, 32, 0.04), 0 22px 44px -24px rgba(28, 34, 32, 0.22);
    --logo-filter: brightness(0) opacity(0.88);
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #131615;
        --surface: #1a1e1c;
        --ink: #e8eae6;
        --muted: #a2a9a5;
        --subtle: #7b827e;
        --line: rgba(232, 234, 230, 0.09);
        --line-strong: rgba(232, 234, 230, 0.17);
        --accent: #86bfb5;
        --accent-soft: rgba(134, 191, 181, 0.10);
        --button-bg: #e8eae6;
        --button-ink: #131615;
        --shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.7);
        --logo-filter: brightness(0) invert(1) opacity(0.9);
    }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { flex: 1; }

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

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, .display {
    margin: 0;
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lede {
    max-width: 34em;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 20px);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 76px;
}

.logo img {
    width: 112px;
    height: auto;
    filter: var(--logo-filter);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-size: 20px;
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.app-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav { display: flex; gap: 4px; }

.nav a {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 15px;
    text-decoration: none;
    transition: color 200ms ease, background 200ms ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--ink);
    background: var(--accent-soft);
}

/* Sections */
.hero { padding: 104px 0 80px; }

.hero h1 {
    max-width: 15ch;
    font-size: clamp(40px, 6vw, 64px);
}

.section {
    padding: 88px 0;
    border-top: 1px solid var(--line);
}

.section-head { margin-bottom: 48px; }

.section-head h2 { font-size: clamp(30px, 4vw, 40px); }

.section-head p {
    max-width: 34em;
    margin: 14px 0 0;
    color: var(--muted);
}

/* Buttons */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition: background 200ms ease, opacity 200ms ease;
}

.btn svg { width: 16px; height: 16px; fill: currentColor; }

.btn-primary { background: var(--button-bg); color: var(--button-ink); }

.btn-primary:hover { opacity: 0.85; }

.btn-quiet { border-color: var(--line-strong); color: var(--ink); }

.btn-quiet:hover { background: var(--accent-soft); }

.btn-soon {
    border: 1px dashed var(--line-strong);
    color: var(--subtle);
    cursor: default;
}

.btn-lg { padding: 14px 24px; font-size: 16px; }

/* Screenshots */
.shot {
    width: auto;
    height: 380px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

/* App list (home) */
.app-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 64px;
    align-items: center;
    padding: 64px 0;
    border-top: 1px solid var(--line);
}

.section-head + .app-row { padding-top: 0; border-top: 0; }

.app-row:last-child { padding-bottom: 0; }

.app-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--subtle);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-meta::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--app, var(--accent));
}

.app-row h3 {
    margin: 12px 0 4px;
    font-family: var(--serif);
    font-size: clamp(30px, 3.6vw, 40px);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.app-sub {
    margin: 0 0 16px;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 20px;
    font-style: italic;
}

.app-desc {
    max-width: 32em;
    margin: 0 0 24px;
    color: var(--muted);
}

.highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin: 0 0 32px;
    padding: 0;
    color: var(--muted);
    font-size: 15px;
    list-style: none;
}

.highlights li {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.highlights li::before {
    content: "";
    flex-shrink: 0;
    width: 12px;
    height: 1px;
    background: var(--subtle);
    transform: translateY(-4px);
}

/* App detail hero */
.app-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 72px;
    align-items: center;
    padding-top: 88px;
    padding-bottom: 88px;
}

.app-hero h1 { font-size: clamp(42px, 6vw, 64px); }

.app-hero .lede { margin-bottom: 36px; }

.app-hero .shot { height: 540px; }

.app-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 28px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.fine-print {
    margin: 16px 0 0;
    color: var(--subtle);
    font-size: 14px;
}

/* Gallery */
.gallery {
    display: flex;
    gap: 20px;
    margin: 0 -24px;
    padding: 8px 24px 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
    cursor: grab;
}

.gallery.dragging { cursor: grabbing; scroll-snap-type: none; }

.gallery img {
    flex-shrink: 0;
    width: auto;
    height: 460px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    scroll-snap-align: start;
    user-select: none;
}

.hint { margin: 0; color: var(--subtle); font-size: 13px; }

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 48px;
}

.feature {
    padding: 28px 0 32px;
    border-top: 1px solid var(--line);
}

.feature h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Note panel */
.note {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 48px;
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
}

.note h3 {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.note p { margin: 0; color: var(--muted); }

.note a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Legal documents */
.doc {
    max-width: 720px;
    margin: 0 auto;
    padding: 88px 24px 104px;
}

.doc h1 { font-size: clamp(38px, 6vw, 56px); }

.doc .lede { margin-bottom: 56px; }

.doc section {
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

.doc h2 {
    margin: 0 0 10px;
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.doc p, .doc li { color: var(--muted); }

.doc p { margin: 0 0 12px; }

.doc p:last-child { margin-bottom: 0; }

.doc ul { margin: 0; padding-left: 20px; }

.doc li { margin: 6px 0; }

.doc li::marker { color: var(--subtle); }

.doc a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }

.doc .meta {
    padding-top: 28px;
    border-top: 1px solid var(--line);
    color: var(--subtle);
    font-size: 14px;
}

.doc .meta p { color: inherit; margin: 0 0 4px; }

/* Footer */
.site-footer {
    padding: 32px 0 48px;
    border-top: 1px solid var(--line);
    color: var(--subtle);
    font-size: 14px;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

.footer-links a { text-decoration: none; transition: color 200ms ease; }

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

/* Responsive */
@media (max-width: 900px) {
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .app-row { grid-template-columns: 1fr; gap: 36px; padding: 56px 0; }
    .app-hero { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
    .app-hero .shot { display: none; }
    .shot { height: 340px; }
    .note { grid-template-columns: 1fr; padding: 28px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero { padding: 64px 0 56px; }
    .section { padding: 64px 0; }
    .features { grid-template-columns: 1fr; }
    .highlights { grid-template-columns: 1fr; }
    .gallery img { height: 400px; }
    .doc { padding: 56px 24px 72px; }
    .nav a { padding: 6px 9px; }
    .app-brand { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
