/*
 * The getnela.app site, in the app's own look (docs/design.md, expo-app/core/theme/theme.ts):
 * warm oat pages, white cards resting on a solid lip, one sky-blue accent with chunky pressable
 * buttons, a hue for each kind of time away, and SF Pro Rounded. Dark is the same world at night.
 */

:root {
    --bg: #F7F3EB;
    --card: #FFFFFF;
    --card-lip: #E7E1D5;
    --surface: #EFEAE0;
    --line: #E6E1D6;
    --text: #2A2B3A;
    --muted: #6B6A7B;
    --accent: #2A6BB3;
    --accent-lip: #1F528C;
    --accent-soft: #E3EEFA;
    --on-accent: #FFFFFF;
    --sun: #F6B63E;

    --sky-top: #EAF3FC;
    --sky: #DCEBFA;
    --meadow: #C9E6C3;
    --meadow-back: #DDEFD6;

    --green-fg: #3A9357; --green-bg: #E1F2E5;
    --teal-fg: #23928E; --teal-bg: #DCF1EF;
    --blue-fg: #3A78C7; --blue-bg: #E1ECF9;
    --orange-fg: #DC7229; --orange-bg: #FCEADB;
    --pink-fg: #D0527F; --pink-bg: #FAE2EB;
    --amber-fg: #C08312; --amber-bg: #FBEFD2;
    --purple-fg: #8456C9; --purple-bg: #EEE6FA;
    --coral-fg: #D9574A; --coral-bg: #FBE3E0;

    --radius: 24px;
    --control-radius: 18px;
    --field-radius: 14px;
    --lip: 3px;

    --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #191C26;
        --card: #242836;
        --card-lip: #12141C;
        --surface: #212533;
        --line: #343A4B;
        --text: #F2F0EA;
        --muted: #A7A9B8;
        --accent: #86BAF0;
        --accent-lip: #4F80B5;
        --accent-soft: #27344A;
        --on-accent: #102338;
        --sun: #F2C069;

        --sky-top: #1D2439;
        --sky: #26304A;
        --meadow: #2A4234;
        --meadow-back: #23382D;

        --green-fg: #8FD3A4; --green-bg: #22352B;
        --teal-fg: #7DD5CF; --teal-bg: #1F3536;
        --blue-fg: #8DB9EE; --blue-bg: #233349;
        --orange-fg: #F2AE78; --orange-bg: #3A2B22;
        --pink-fg: #EE9DBB; --pink-bg: #3A2432;
        --amber-fg: #EFCB78; --amber-bg: #382F1D;
        --purple-fg: #BFA2EE; --purple-bg: #2E2745;
        --coral-fg: #F09C91; --coral-bg: #3A2625;
    }
}

/* Base */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scrollbar-color: var(--card-lip) var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

::selection { background: var(--accent-soft); color: var(--text); }

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

h1, h2, h3 {
    margin: 0;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h3 { font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

a {
    color: var(--accent);
    font-weight: 600;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
    text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

a:hover { text-decoration-color: var(--accent); }

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

.wrap {
    width: min(100% - 32px, 1120px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 10;
    padding: 10px 16px;
    border-radius: var(--field-radius);
    background: var(--card);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
}

.skip-link:focus { top: 12px; }

/* Shared pieces */

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 28px;
    border-radius: var(--control-radius);
    background: var(--accent);
    color: var(--on-accent);
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 0 var(--accent-lip);
    transform: translateY(0);
    transition: transform 60ms ease-out, box-shadow 60ms ease-out;
}

.button:hover { filter: brightness(1.04); }

/* Sinks onto its lip when pressed, instantly, as the app's Button does. */
.button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--accent-lip);
}

.button.small {
    min-height: 44px;
    padding: 0 18px;
    font-size: 0.9375rem;
    border-radius: 14px;
}

.tile {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--hue-bg, var(--accent-soft));
    color: var(--hue-fg, var(--accent));
}

.tile .icon { width: 28px; height: 28px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--hue-bg, var(--accent-soft));
    color: var(--hue-fg, var(--accent));
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

.chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sun);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 30%, transparent);
}

.text-link { font-weight: 700; }

/* Header and footer */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
}

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

.release-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--card);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
    font-size: 0.9375rem;
    font-weight: 700;
}

.site-footer {
    margin-top: 96px;
    padding-block: 40px 48px;
    background: var(--surface);
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px 32px;
}

.site-footer .brand { font-size: 1.125rem; }
.site-footer .brand img { width: 32px; height: 32px; border-radius: 10px; }

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.site-footer nav a {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

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

.site-footer small { color: var(--muted); font-size: 0.875rem; }

/* Home: the hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    padding-block: 32px 72px;
}

.hero h1 {
    font-size: clamp(2.75rem, 1.6rem + 4.4vw, 4.75rem);
    line-height: 1;
    letter-spacing: -0.035em;
}

.lede {
    max-width: 34rem;
    margin-top: 20px;
    color: var(--muted);
    font-size: 1.1875rem;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-top: 32px;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

/* The pet's hill, as Home opens on it: sky, meadow, the pet saying hello. At night it is the same
   hill under a dark sky, with a line for the night. */
.scene {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(to bottom, var(--sky-top), var(--sky) 70%);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
    isolation: isolate;
}

.scene-hills {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    height: 44%;
}

.hill-back { fill: var(--meadow-back); }
.hill-front { fill: var(--meadow); }

.scene-pip {
    position: absolute;
    left: 50%;
    bottom: 8%;
    width: 58%;
    height: auto;
    transform: translateX(-46%);
    filter: drop-shadow(0 10px 0 color-mix(in srgb, #284628 14%, transparent));
}

.bubble {
    position: absolute;
    top: 9%;
    inset-inline-start: 8%;
    max-width: min(17rem, 62%);
    padding: 14px 18px;
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
}

.bubble::after {
    content: "";
    position: absolute;
    bottom: -12px;
    inset-inline-start: 62%;
    width: 22px;
    height: 16px;
    background: var(--card);
    clip-path: polygon(0 0, 100% 0, 30% 100%);
}

.say-night { display: none; }

@media (prefers-color-scheme: dark) {
    .say-day { display: none; }
    .say-night { display: inline; }

    .scene::before {
        content: "";
        position: absolute;
        inset: 0 0 45%;
        z-index: -1;
        background:
            radial-gradient(circle at 18% 58%, #F2F0EA 0 1.5px, transparent 2.5px),
            radial-gradient(circle at 34% 30%, #F2F0EA 0 1px, transparent 2px),
            radial-gradient(circle at 72% 22%, #F2F0EA 0 1.5px, transparent 2.5px),
            radial-gradient(circle at 86% 46%, #F2F0EA 0 1px, transparent 2px),
            radial-gradient(circle at 58% 12%, #F2C069 0 2px, transparent 3px),
            radial-gradient(circle at 92% 14%, #F2F0EA 0 1px, transparent 2px);
        opacity: 0.8;
    }
}

/* Home: how it works */

.steps h2, .section-head h2, .closing h2, .privacy-card h2 {
    font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
}

.step-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
}

/* One grouped card, as the app groups rows: the three steps share it, split by hairlines. */
.step {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 32px;
}

.step + .step { border-inline-start: 1px solid var(--line); }

.step h3 { font-size: 1.3125rem; }
.step p { margin-top: 8px; color: var(--muted); }

/* Home: quests, on a tonal band so the page changes pace */

.quests {
    margin-top: 96px;
    padding-block: 72px;
    background: var(--surface);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 16px 48px;
}

.section-head p { color: var(--muted); font-size: 1.125rem; max-width: 32rem; }

.quest-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.quest-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
}

.quest-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.quest-body { padding: 18px 20px 22px; }
.quest-body h3 { margin-top: 12px; font-size: 1.25rem; }
.quest-body p { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }

.kinds {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 40px;
}

.kinds h3 { font-size: 1.125rem; }

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Home: privacy and the close */

.privacy-note { margin-top: 96px; }

.privacy-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 36px;
}

.privacy-card p { max-width: 44rem; margin-block: 10px 14px; color: var(--muted); font-size: 1.125rem; }

.closing {
    margin-top: 96px;
    text-align: center;
}

.closing p { margin-top: 12px; color: var(--muted); font-size: 1.125rem; }

/* Documents: privacy, terms, account deletion */

.document-header {
    padding-block: 40px 40px;
    max-width: 46rem;
}

.document-header h1 {
    font-size: clamp(2.5rem, 1.7rem + 3vw, 3.75rem);
    letter-spacing: -0.03em;
}

.document-header .lede { margin-top: 16px; }

.updated {
    display: inline-flex;
    margin-top: 20px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 700;
}

.document-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.document-nav {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 2px;
}

.document-nav a {
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.document-nav a:hover { background: var(--accent-soft); color: var(--accent); }

.document-body {
    max-width: 48rem;
    padding: 40px 44px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
}

.document-body section + section { margin-top: 36px; }
.document-body section { scroll-margin-top: 24px; }
.document-body h2 { font-size: 1.375rem; letter-spacing: -0.01em; }
.document-body p, .document-body ul, .document-body ol { margin-top: 12px; }
.document-body ul, .document-body ol { padding-inline-start: 1.25em; }
.document-body li + li { margin-top: 8px; }
.document-body li::marker { color: var(--accent); }
.document-body strong { font-weight: 700; }

.legal-summary {
    margin-bottom: 36px;
    padding: 20px 24px;
    border-radius: 18px;
    background: var(--accent-soft);
}

.legal-summary p + p { margin-top: 8px; }

/* Support */

.support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.support-grid article {
    padding: 28px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 var(--lip) 0 var(--card-lip);
}

.support-grid h2 { font-size: 1.3125rem; letter-spacing: -0.01em; }
.support-grid p { margin-top: 10px; color: var(--muted); }

.support-contact {
    display: grid;
    justify-items: start;
    gap: 12px;
    margin-top: 40px;
    padding: 36px;
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.support-contact h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.support-contact a { font-size: 1.25rem; font-weight: 800; }
.support-contact p { max-width: 40rem; color: var(--muted); }

.support-notes {
    display: grid;
    gap: 8px;
    margin-top: 28px;
    color: var(--muted);
}

/* Smaller screens */

@media (max-width: 960px) {
    .quest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
        padding-top: 16px;
    }

    .scene { max-width: 520px; width: 100%; margin-inline: auto; }

    .step-list { grid-template-columns: minmax(0, 1fr); }
    .step { flex-direction: row; align-items: flex-start; padding: 24px; }
    .step + .step { border-inline-start: 0; border-top: 1px solid var(--line); }

    .section-head { grid-template-columns: minmax(0, 1fr); }

    .document-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }

    .document-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .document-nav a { background: var(--card); box-shadow: 0 2px 0 var(--card-lip); }

    .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
    body { font-size: 1rem; }

    .site-header { padding-block: 14px; }
    .brand { font-size: 1.25rem; }
    .brand img { width: 36px; height: 36px; }
    .release-label { padding: 0 12px; font-size: 0.875rem; }

    .lede { font-size: 1.0625rem; }

    .bubble { font-size: 0.9375rem; padding: 12px 14px; }

    .quests { margin-top: 72px; padding-block: 56px; }
    .quest-grid { grid-template-columns: minmax(0, 1fr); }

    .privacy-note, .closing { margin-top: 72px; }
    .privacy-card { flex-direction: column; padding: 28px; }

    .document-body { padding: 28px 22px; }
    .support-grid { grid-template-columns: minmax(0, 1fr); }
    .support-contact { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .button { transition: none; }
}
