/* Lesson Garden marketing site. Colors match the app (AccentColor, student palette). */

:root {
    --green: #4a8f61;
    --green-deep: #2f5e42;
    --green-soft: #e4efe6;
    --cream: #fbf7ec;
    --paper: #ffffff;
    --ink: #1f2b24;
    --muted: #5b6b61;
    --line: rgba(31, 43, 36, 0.1);
    --coral: #ee8c66;
    --cornflower: #668fd9;
    --lilac: #b87dcc;
    --marigold: #edb84d;
    --shadow: 0 24px 60px -24px rgba(31, 60, 42, 0.35);
    --radius: 22px;
    --max: 1120px;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --green: #6bba80;
        --green-deep: #a8d9b4;
        --green-soft: #1f3327;
        --cream: #121814;
        --paper: #1a221d;
        --ink: #eef3ef;
        --muted: #a3b2a8;
        --line: rgba(238, 243, 239, 0.12);
        --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    }
}

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

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

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font: 17px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 14px;
}

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

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--cream) 85%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }

.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }

@media (max-width: 720px) { .site-nav { display: none; } .site-header .button { margin-left: auto; } }

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: #fff; box-shadow: 0 10px 24px -12px var(--green); }
.button-quiet { background: var(--green-soft); color: var(--green-deep); }
.button-small { padding: 8px 16px; font-size: 0.9rem; }

/* "Coming soon to the App Store" badge (not Apple's artwork until the app is live). */
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 16px;
    border-radius: 14px;
    background: #111;
    color: #fff;
    text-decoration: none;
    line-height: 1.15;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: 0.72rem; opacity: 0.8; }
.store-badge strong { font-size: 1.1rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { .store-badge { background: #fff; color: #111; } }

/* Hero */

.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 28px 0 18px; }
.hero-note { color: var(--muted); font-size: 0.92rem; }
.hero-art { position: relative; justify-self: center; }

@media (max-width: 880px) {
    .hero { padding-top: 48px; }
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-art { margin-top: 12px; }
}

/* Device frames */

.phone {
    width: min(300px, 72vw);
    padding: 11px;
    border-radius: 48px;
    background: #16201a;
    box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.phone img { border-radius: 38px; width: 100%; height: auto; }

.tablet {
    padding: 14px;
    border-radius: 34px;
    background: #16201a;
    box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.tablet img { border-radius: 22px; width: 100%; height: auto; }

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--paper);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}
.float-card .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 0.85rem; }
.float-card small { display: block; font-weight: 500; color: var(--muted); }
.float-a { left: -70px; top: 22%; }
.float-b { right: -60px; bottom: 16%; }
@media (max-width: 1040px) { .float-a { left: -24px; } .float-b { right: -24px; } }
@media (max-width: 480px) { .float-card { display: none; } }

/* The "how many a week?" story */

.story { padding: 40px 0 24px; }
.story-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.story-step { padding: 28px; border-right: 1px solid var(--line); }
.story-step:last-child { border-right: 0; background: var(--green-soft); }
.story-step .big { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; line-height: 1; margin-bottom: 8px; }
.story-step:last-child .big { color: var(--green-deep); }
.story-step p { margin: 0; color: var(--muted); }
@media (max-width: 760px) {
    .story-card { grid-template-columns: 1fr; }
    .story-step { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Feature rows */

.section { padding: 88px 0; }
.section-head { max-width: 40em; margin-bottom: 48px; }

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 40px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-art { order: -1; }
.feature-art { display: flex; justify-content: center; gap: 20px; }
.feature-art .phone { width: min(270px, 42vw); }
.feature-art .phone.small { width: min(230px, 38vw); margin-top: 48px; }
.feature ul { list-style: none; padding: 0; margin: 20px 0 0; }
.feature li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--muted); }
.feature li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.feature li strong { color: var(--ink); }

.feature-wide { display: block; text-align: center; }
.feature-wide .section-head { margin: 0 auto 40px; }
.feature-wide .tablet { max-width: 820px; margin: 0 auto; }

/* Grid items default to their content's width; let them shrink so text wraps instead. */
.feature > *, .hero .wrap > * { min-width: 0; }

@media (max-width: 880px) {
    .feature { grid-template-columns: 1fr; gap: 36px; }
    .feature.flip .feature-art { order: 0; }
}

/* Two phones side by side have to share a narrow screen. */
@media (max-width: 600px) {
    .feature-art { gap: 12px; }
    .feature-art:has(.phone.small) .phone { width: 44vw; padding: 6px; border-radius: 28px; }
    .feature-art:has(.phone.small) .phone img { border-radius: 23px; }
    .feature-art .phone.small { margin-top: 28px; }
}

/* Small feature grid */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
}
.card .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    color: #fff;
}
.card .icon svg { width: 22px; height: 22px; }
.card p { color: var(--muted); margin: 0; }
@media (max-width: 880px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* Steps */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { position: relative; padding-top: 58px; }
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    font: 600 1.15rem var(--serif);
}
.step p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* Family note */

.note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
    background: var(--green-soft);
    border-radius: var(--radius);
    padding: 36px;
}
.note img { width: 88px; height: 88px; border-radius: 20px; box-shadow: var(--shadow); }
.note p { margin: 0; font-size: 1.1rem; }
.note p + p { margin-top: 10px; color: var(--muted); font-size: 1rem; }
@media (max-width: 600px) { .note { grid-template-columns: 1fr; } }

/* FAQ */

.faq { max-width: 760px; }
.faq details {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 4px 22px;
    margin-bottom: 12px;
}
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* Closing call to action */

.cta {
    text-align: center;
    background: var(--green-deep);
    color: #fff;
    border-radius: 28px;
    padding: 64px 28px;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.82); max-width: 32em; margin: 0 auto 28px; }
.cta .store-badge { background: #fff; color: #111; }
@media (prefers-color-scheme: dark) { .cta { background: var(--green-soft); } .cta h2 { color: var(--ink); } .cta p { color: var(--muted); } }

/* Footer */

.site-footer { padding: 48px 0 56px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-footer nav { display: flex; gap: 22px; margin-left: auto; }
.site-footer a { color: var(--muted); }

/* Plain text pages (privacy, support) */

.page { padding: 56px 0 24px; }
.page .wrap { max-width: 760px; }
.page h2 { font-size: 1.5rem; margin-top: 1.8em; }
.page p, .page li { color: var(--muted); }
.page strong { color: var(--ink); }
.page .updated { font-size: 0.92rem; }

/* Motion: fade sections in as they scroll into view. Only hidden once JS is known to run. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .button:hover { transform: none; }
}

/* Launch mailing list form (inside the dark call-to-action block) */

.signup { max-width: 640px; margin: 0 auto; text-align: left; }
.signup-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.signup .field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.signup .field em { font-style: normal; font-weight: 400; opacity: 0.75; }
.signup .field-email { grid-column: 1 / -1; }
.signup input, .signup select {
    font: inherit;
    font-weight: 400;
    font-size: 1rem;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.95);
    color: #1f2b24;
    width: 100%;
    min-height: 50px;
}
.signup input:focus, .signup select:focus { outline: 3px solid var(--marigold); outline-offset: 1px; }
/* Same grey for the text placeholders and the select's "Choose", so they match in every browser. */
.signup input::placeholder { color: #6b776f; opacity: 1; }
/* Drop the native control (Safari ignores height, padding, and radius on it) and draw one chevron. */
.signup select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234a8f61' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 16px;
    cursor: pointer;
}
.signup select:has(option[value=""]:checked) { color: #6b776f; }
.signup select option { color: #1f2b24; }
.signup-button {
    margin-top: 18px;
    width: 100%;
    justify-content: center;
    background: #fff;
    color: var(--green-deep);
    font-size: 1.05rem;
}
.signup-button:disabled { opacity: 0.6; cursor: default; transform: none; }
.signup-status { min-height: 1.4em; margin: 14px 0 0; text-align: center; font-weight: 600; }
.signup-status[data-kind="error"] { color: #ffd2c2; }
.signup-note { margin: 10px auto 0 !important; text-align: center; font-size: 0.85rem; }
.signup-note a { color: inherit; }
.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .signup-fields { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
    .signup-button { background: var(--green); color: #fff; }
    .signup-status[data-kind="error"] { color: var(--coral); }
}
