/* ----------------------------------------------------------------------
   www.wakeupearly.com: the home page and the Terms, Privacy and Support
   pages. It wears the app's own look: warm paper, near-black ink, Source
   Serif 4 headings, black pill buttons, the Beacon's deep green, and
   marigold as the third colour.
   Plain prose and real screenshots; no eyebrow labels, no card grids.
   ---------------------------------------------------------------------- */
:root {
    --paper: #F4F1EA;            /* the app's page */
    --card: #FFFFFF;
    --sand: #E9E2D6;             /* the tray the app shows a Beacon on */
    --ink: #141414;
    --ink-mid: #5F5A52;          /* body text */
    --ink-soft: #8C867B;         /* small print */
    --border: #D8D2C6;
    --border-subtle: #E7E2D9;
    --green: #1E4636;            /* the Beacon's ink */
    --green-lift: #2A5A46;
    --cream: #F4F1EA;
    --marigold: #F0B03F;         /* the third colour: step numbers, the cost panel, the closing button */
    --marigold-lift: #F6C366;

    --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: 400;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--green); color: var(--cream); }
a:focus-visible, summary:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
    border-radius: 4px;
}

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

/* Source Serif thins its strokes as it gets bigger (its optical size
   axis). Held at a middling size here, so the big headings keep the same
   sturdy, warm weight the app's smaller headings have. */
h1, h2, h3, .step-number { font-variation-settings: 'opsz' 30; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(42px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -1.4px; }
h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.5px; }
h3 { font-size: 26px; line-height: 1.2; letter-spacing: -0.25px; }
p { color: var(--ink-mid); text-wrap: pretty; }
p + p { margin-top: 1em; }
h2 + p { margin-top: 20px; }
h3 + p { margin-top: 10px; }

/* ---- buttons and links ---------------------------------------------- */
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    padding: 0 30px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--cream);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 150ms ease-out, transform 150ms ease-out;
}
.pill:hover { background: #2E2E2E; }
.pill:active { transform: scale(0.98); }
.pill.small { height: 42px; padding: 0 20px; font-size: 14.5px; }
.pill.cream { background: var(--cream); color: var(--ink); }
.pill.cream:hover { background: #FFFFFF; }
.pill.marigold { background: var(--marigold); color: var(--ink); }
.pill.marigold:hover { background: var(--marigold-lift); }
.textlink {
    color: var(--ink);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--marigold);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: text-decoration-color 150ms ease-out;
}
.textlink:hover { text-decoration-color: var(--ink); }

/* ---- header --------------------------------------------------------- */
.site-header { padding: 20px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.header-links a:not(.pill) { text-decoration: none; color: var(--ink-mid); }
.header-links a:not(.pill):hover { color: var(--ink); }
@media (max-width: 720px) {
    /* On a phone the header is the logo and the button */
    .header-links a:not(.pill) { display: none; }
}

/* ---- hero ----------------------------------------------------------- */
.hero { padding: 36px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.lede { margin-top: 22px; font-size: 19px; line-height: 1.55; max-width: 31em; }
.cta-row { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.cta-note { margin-top: 16px; font-size: 14.5px; color: var(--ink-soft); }

/* The Beacon on its sand tray, with the "You're up" screen tucked over
   one corner */
.hero-visual { position: relative; max-width: 460px; width: 100%; margin: 0 auto; padding-bottom: 28px; }
.tray { background: var(--sand); border-radius: 28px; padding: 22px; }
.beacon-paper {
    width: 100%;
    background: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(20, 16, 8, 0.06), 0 18px 40px -12px rgba(20, 16, 8, 0.22);
    /* The one moment of motion on the page: the sheet is laid down */
    animation: lay-down 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: 50% 0%;
}
@keyframes lay-down {
    from { transform: translateY(-14px) rotate(-1.4deg); }
    to { transform: none; }
}
.hero-phone {
    position: absolute;
    left: -18px;
    bottom: 0;
    width: 44%;
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 4px rgba(20, 16, 8, 0.08), 0 22px 44px -14px rgba(20, 16, 8, 0.35);
}
@media (max-width: 520px) { .hero-phone { left: -6px; width: 46%; } }
@media (min-width: 960px) {
    .hero { padding: 56px 0 104px; }
    .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 72px; }
    .hero-visual { margin: 0 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .beacon-paper { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---- plain prose sections ------------------------------------------- */
section.plain { padding: 56px 0; }
.plain .container { margin-left: auto; margin-right: auto; }
.prose p { font-size: 18px; }

/* ---- how it works --------------------------------------------------- */
.how { padding: 72px 0 40px; border-top: 1px solid var(--border-subtle); scroll-margin-top: 8px; }
.how > .container > h2 { margin-bottom: 44px; }
.step + .step { margin-top: 88px; }
.step-text { display: flex; gap: 20px; align-items: flex-start; max-width: 620px; }
/* Step numbers sit on a marigold disc */
.step-number {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--marigold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 24px;
    line-height: 1;
    font-variant-numeric: lining-nums;
    color: var(--ink);
}
.step-text p { font-size: 18px; }
.aside { font-size: 15.5px !important; color: var(--ink-soft); }

/* Screenshots: the real screens, with a hairline and a soft shadow. No
   device frames. */
.shot { margin: 0; }
.shot img {
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(20, 16, 8, 0.05), 0 22px 48px -18px rgba(20, 16, 8, 0.22);
}
.shot.desktop { margin-top: 32px; }
.shot.desktop img { border-radius: 14px; }
@media (max-width: 700px) { .shot.desktop { max-width: 320px; margin-left: auto; margin-right: auto; } .shot.desktop img { border-radius: 22px; } }
.shot.phone { max-width: 300px; margin: 32px auto 0; }
.shot.phone img { border-radius: 26px; }

@media (min-width: 900px) {
    /* Steps 2 and 3: words on one side, the phone on the other */
    .step-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: center; }
    .step-side.flip { grid-template-columns: 320px minmax(0, 1fr); }
    .step-side.flip .step-text { order: 2; }
    .step-side .shot.phone { margin: 0; max-width: none; }
    .step-side .step-text { max-width: 560px; }
    .step-side.flip .step-text { margin-left: auto; }
}

/* ---- cost: one marigold panel, three plain statements ---------------- */
.cost { padding: 64px 0 24px; }
.cost-panel {
    background: var(--marigold);
    border-radius: 28px;
    padding: 40px 28px;
    display: grid;
    gap: 24px;
}
.cost-text p { font-size: 18px; color: rgba(20, 20, 20, 0.8); }
/* The answer itself, set large so it is read first */
.cost-text .cost-answer {
    font-family: var(--serif);
    font-variation-settings: 'opsz' 30;
    font-weight: 600;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.25;
    color: var(--ink);
}
@media (min-width: 860px) {
    .cost-panel { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; padding: 56px 60px; align-items: start; }
}

/* ---- questions ------------------------------------------------------ */
.faq { padding: 56px 0 72px; }
.faq .container { margin-left: auto; margin-right: auto; }
.faq .list { margin-top: 24px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 36px 20px 0;
    position: relative;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
/* A plus that turns into a minus when the answer is open */
.faq summary::before, .faq summary::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    width: 14px;
    height: 2px;
    margin-top: -1px;
    background: var(--ink);
    transition: transform 200ms ease-out;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { padding: 0 36px 22px 0; font-size: 17px; }

/* ---- closing -------------------------------------------------------- */
.closing { padding: 24px 0 72px; }
.closing-panel {
    background: var(--green);
    border: 1px solid var(--green-lift);
    border-radius: 28px;
    padding: 44px 28px;
    display: grid;
    gap: 28px;
    align-items: center;
}
.closing-panel h2 { color: var(--cream); }
.closing-panel p { color: rgba(244, 241, 234, 0.78); margin-top: 10px; }
@media (min-width: 860px) {
    .closing-panel { grid-template-columns: 1fr auto; padding: 56px 60px; }
}

/* ---- text pages: Terms, Privacy, Support ----------------------------- */
.page { padding: 36px 0 88px; }
.page .container { margin-left: auto; margin-right: auto; }
.page h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -1px; margin-bottom: 24px; }
.page h2 { font-size: 26px; letter-spacing: -0.25px; margin-top: 44px; }
.page h2 + p { margin-top: 12px; }
.page p strong { color: var(--ink); font-weight: 600; }
.page a { text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.page ul { margin: 14px 0 0 22px; color: var(--ink-mid); font-size: 18px; }
.page li + li { margin-top: 6px; }

/* ---- footer --------------------------------------------------------- */
.site-footer { padding: 28px 0 40px; border-top: 1px solid var(--border-subtle); font-size: 14.5px; color: var(--ink-soft); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
