/* ============================================================
   The Week's Covered landing page — self-contained editorial stylesheet.
   Tokens + base styles + the md-* component subset are copied
   from src/WeeksCovered.Web/WeeksCovered.Web/wwwroot/editorial.css;
   the page chrome is copied from
   Components/Account/Shared/AuthScaffold.razor.css (.auth-* renamed
   to .landing-*). Keep in sync with the app when either changes.
   ============================================================ */

:root {
    --bg:            #fbf6ee;   /* warm cream */
    --surface:       #fefcf8;   /* paper */
    --surface-2:     #f6efe1;   /* subtle band */
    --rule:          #e5dcc9;   /* hairline */
    --rule-strong:   #c9bca0;
    --text:          #1a140c;   /* warm dark */
    --text-2:        #6e6452;   /* muted body */
    --text-muted:    #9b8f76;   /* tertiary */
    --accent:        #2d4a2b;   /* forest green */
    --accent-hover:  #1f3a1d;
    --accent-soft:   #d9e5d2;
    --warn:          #a85d1f;   /* burnt orange */
    --danger:        #9a3a35;

    --meal-breakfast: #c79628;
    --meal-lunch:     #34608f;
    --meal-dinner:    #9a3a35;
    --meal-snack:     #3f7048;

    --serif: 'Playfair Display', Georgia, serif;
    --sans:  'Inter', -apple-system, system-ui, sans-serif;

    --wordmark-size: 22px;   /* brand wordmark, used by every nav's logo */
    --nav-pad-y:     16px;   /* framed nav vertical padding */
    --nav-pad-x:     40px;   /* framed nav horizontal padding */
}

/* border-box everywhere: `.hero { width: 100%; padding: … }` otherwise
   overflows the viewport by the padding width (content-box sizing), which
   widens the body and misaligns the full-bleed nav/footer rules. */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "tnum" 1;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

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

/* display rules on .md-form etc. would otherwise defeat the hidden attribute */
[hidden] { display: none !important; }

a:focus-visible, .md-btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Page chrome (from AuthScaffold) ---------- */

.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-nav {
    border-bottom: 1px solid var(--rule);
    padding: var(--nav-pad-y) var(--nav-pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
}
.logo {
    font-family: var(--serif);
    font-weight: 700;
    font-size: var(--wordmark-size);
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}
.logo .amp { font-style: italic; color: var(--accent); margin: 0 2px; }

.hero {
    flex: 1;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 80px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 56px 96px;
    width: 100%;
}

/* Left — marketing lede */
.lede { align-self: center; }
.lede h1 {
    font-size: 68px;
    font-weight: 600;
    margin: 0 0 26px;
    letter-spacing: -0.02em;
    line-height: 1;
}
.dek {
    font-family: var(--serif);
    font-style: italic;
    font-size: 21px;
    color: var(--text-2);
    line-height: 1.45;
    margin: 0;
    max-width: 560px;
}

/* Right — form card */
.form-card {
    align-self: center;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    justify-self: end;
    border-radius: 2px;
}

.form-header { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.form-sub { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--text-2); margin: 0 0 28px; }

.form-legal {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
    font-style: italic;
}
.form-legal a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--rule-strong); }
.form-legal a:hover { color: var(--accent); }

.page-footer {
    border-top: 1px solid var(--rule);
    padding: 24px 56px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    background: var(--bg);
}

/* ---------- Privacy page (long-form prose) ---------- */

.prose-page {
    flex: 1;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 72px 40px 96px;
}
.prose-page h1 { font-size: 48px; margin: 0 0 10px; line-height: 1.05; }
.prose-page .updated { font-size: 13px; color: var(--text-muted); font-style: italic; margin: 0 0 40px; }
.prose-page h2 { font-size: 21px; margin: 40px 0 10px; }
.prose-page p { font-size: 15.5px; line-height: 1.7; color: var(--text-2); margin: 0 0 16px; }
.prose-page p b { color: var(--text); font-weight: 600; }

/* ---------- Buttons (subset of editorial.css) ---------- */

.md-btn-primary {
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
    padding: 12px 22px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border-radius: 2px;
    display: inline-block;
}
.md-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--bg); text-decoration: none; }
.md-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.md-btn-primary:disabled:hover { background: var(--accent); border-color: var(--accent); }

.md-btn-block { width: 100%; text-align: center; }

/* ---------- Forms (subset of editorial.css) ---------- */

.md-form { display: flex; flex-direction: column; gap: 18px; }
.md-field { display: flex; flex-direction: column; gap: 6px; }
.md-field > label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-weight: 600;
}
.md-field input {
    border: 1px solid var(--rule-strong);
    background: var(--surface);
    padding: 11px 13px;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--text);
    border-radius: 2px;
}
.md-field input:focus { outline: none; border-color: var(--accent); }

.md-validation { font-size: 12px; color: var(--danger); margin: 0; }

/* Honeypot — hidden from humans, tasty for bots. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Turnstile widget — keep it centered in the form column. The widget iframe
   has a 300px intrinsic width; cap it so it can never push the page wider
   than the viewport on small phones (it used to overflow the card at ~390px). */
.cf-turnstile { margin-left: auto; margin-right: auto; }
.cf-turnstile iframe { max-width: 100%; }

/* ---------- Mobile (same breakpoints as the app's auth pages) ---------- */

@media (max-width: 920px) {
    .hero { grid-template-columns: 1fr; gap: 48px; padding: 48px 32px 72px; }
    .lede h1 { font-size: 48px; }
    .dek { font-size: 18px; }
    .form-card { justify-self: stretch; max-width: none; }
    .landing-nav, .page-footer { padding-left: 24px; padding-right: 24px; }
    .prose-page { padding: 48px 24px 72px; }
    .prose-page h1 { font-size: 36px; }
}
@media (max-width: 720px) {
    /* 16px input text stops iOS Safari from zooming on focus. */
    .md-field input { font-size: 16px; }
}
@media (max-width: 480px) {
    /* Tighter horizontal padding so the 300px-wide Turnstile iframe fits
       inside the card (card inner width at 393px viewport = 307px). */
    .hero { padding: 40px 20px 56px; }
    .landing-nav, .page-footer { padding-left: 20px; padding-right: 20px; }
    .lede h1 { font-size: 38px; }
    .form-card { padding: 28px 22px; }
}
