/* ----------------------------------------------------------------------
   Wake Up Early marketing site. Shared by index.html and how-it-works.html.
   Tokens from the app repo's docs/STYLE_GUIDE.md: warm paper, near-black
   ink, serif headings, pill buttons. The header is the dark of tonight
   (when you commit); everything else is morning paper.
   ---------------------------------------------------------------------- */
:root {
    /* "Deep Sea and Mint", chosen 2026-09-09. The app screenshots keep their own
       black-and-beige tokens; these are the site's. */
    --paper: #F3F2EC;
    --card: #FFFFFF;
    --sand: #E7E5DD;
    --ink: #0E1F2B;              /* headings, strong text, footer ink */
    --ink-secondary: #5C6570;    /* body text */
    --ink-tertiary: #8A939B;     /* small print */
    --border: #D5D3CC;
    --border-subtle: #E4E2DB;

    --primary: #2EE6A6;          /* the one bright colour: buttons and the headline italic */
    --primary-hover: #22D197;
    --on-primary: #0E1F2B;
    --link: #0F6E5A;             /* text links on paper */

    --night: #0E1F2B;
    --night-ink: #F3F2EC;
    --night-ink-secondary: #A3ADB5;
    --night-ink-tertiary: #6B7680;
    --night-border: #23343F;

    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 500;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Two widths: a reading measure for text, a wider one for pictures. */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}
.prose { max-width: 680px; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) {
    .container { padding-left: 32px; padding-right: 32px; }
}

h1, h2 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--ink);
}
h2 { font-size: clamp(30px, 4.2vw, 40px); line-height: 1.12; }
h3 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.25px;
    line-height: 1.2;
}
p { color: var(--ink-secondary); }
p + p { margin-top: 1em; }
strong { font-weight: 600; color: var(--ink); }
h2 + p, h2 + ol, h3 + p, h3 + ol { margin-top: 20px; }
ol.steps { padding-left: 1.4em; max-width: 34em; }
ol.steps li { padding-left: 6px; color: var(--ink-secondary); }
ol.steps li + li { margin-top: 8px; }
ol.steps q { quotes: '\201C' '\201D'; font-style: italic; color: var(--ink); }
.small { font-size: 15px; color: var(--ink-tertiary); }

/* ---- buttons and links ---------------------------------------------- */
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 150ms ease-out, transform 150ms ease-out;
}
.pill:hover { background: var(--primary-hover); }
.pill:active { transform: scale(0.98); }
.textlink {
    color: var(--link);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.night .textlink { color: var(--night-ink); }

/* ---- screenshots ---------------------------------------------------- */
.screen {
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--paper);
    box-shadow: 0 16px 48px rgba(20, 16, 8, 0.12);
}
.screen img { width: 100%; }
.night .screen { border-color: var(--night-border); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); }
.screen.inset { max-width: 880px; margin-left: auto; margin-right: auto; }
.sheet {
    background: var(--card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 12px;
}
.sheet img { border-radius: 8px; }

/* Text beside a picture. */
.two-up { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
    .two-up { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
    .two-up.flip > :first-child { order: 2; }
}

/* ---- header --------------------------------------------------------- */
.night { background: var(--night); color: var(--night-ink); }
.night p { color: var(--night-ink-secondary); }
.night strong { color: var(--night-ink); }
.night h1, .night h2, .night h3 { color: var(--night-ink); }
.night ol.steps li { color: var(--night-ink-secondary); }

.site-header { padding: 20px 0; }
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.wordmark img { height: 48px; width: 48px; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.header-actions a:not(.pill) {
    color: var(--night-ink);
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.header-actions .pill { height: 40px; padding: 0 20px; font-size: 14px; }
.header-actions a { white-space: nowrap; }
@media (max-width: 599px) { .header-actions .hide-sm { display: none; } }

/* ---- hero (index) --------------------------------------------------- */
.hero { padding: 56px 0 0; }
@media (min-width: 900px) { .hero { padding: 80px 0 0; } }
.hero h1 {
    font-size: clamp(46px, 8vw, 84px);
    line-height: 1.0;
    max-width: 10em;
}
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .lede { margin-top: 28px; font-size: 19px; line-height: 1.5; max-width: 30em; }
.hero .cta-row {
    margin-top: 36px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.hero .cta-note { margin-top: 16px; font-size: 14px; color: var(--night-ink-tertiary); }
.hero-visual .screen { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.hero-visual {
    margin-top: 56px;
    margin-bottom: -120px;   /* the screenshot sinks into the paper below */
    position: relative;
    z-index: 1;
}
@media (min-width: 900px) { .hero-visual { margin-top: 72px; margin-bottom: -200px; } }

.rise { animation: rise 400ms ease-out both; }
.rise.delay { animation-delay: 120ms; }
@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rise { animation: none; }
}

/* ---- page title (how-it-works) --------------------------------------- */
.page-title { padding: 72px 0 0; }
.page-title h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
.page-title p { margin-top: 20px; font-size: 19px; max-width: 32em; }

/* ---- sections -------------------------------------------------------- */
section { padding: 72px 0; }
@media (min-width: 900px) { section { padding: 96px 0; } }
.after-hero { padding-top: 200px; }
@media (min-width: 900px) { .after-hero { padding-top: 300px; } }
.block + .block { margin-top: 64px; }
.sign { margin-top: 24px; font-size: 15px; color: var(--ink-tertiary); }

/* ---- questions -------------------------------------------------------- */
.faq .list { margin-top: 32px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1;
    color: var(--ink-tertiary);
    flex: 0 0 auto;
}
.faq details[open] summary::after { content: '\2013'; }
.faq details p { padding: 0 0 22px; max-width: 40em; }

/* ---- closing panel ---------------------------------------------------- */
.closing { padding-top: 0; }
.closing .panel { border-radius: 24px; padding: 56px 24px; }
@media (min-width: 768px) { .closing .panel { padding: 80px; } }
.closing .panel .inner { max-width: 680px; margin: 0 auto; }
.closing .pill { margin-top: 32px; }

/* ---- footer ----------------------------------------------------------- */
.site-footer { padding: 48px 0; }
.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--ink-tertiary);
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-secondary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
