﻿/* =====================================================================================================
   PUBLIC PAGES (2026-11-05) — what anyone can open without an account: a public recipe (Recipes/View, /r/…) and
   Stories (Public/Read, /read). Built on the story page's look (story-page.css: Fraunces headings, navy), with a
   sharper gold that passes contrast:
     --pub-gold       #F2A21B  bright gold-orange: fills and rules, and on navy (navy text on it: 6.4 : 1)
     --pub-gold-ink   #A85F00  the gold for text on white (4.9 : 1; the old #c88a22 was 2.9 : 1)
   To change the colours: the variables below. Everything else uses them.
   ===================================================================================================== */
:root {
    --pub-navy: #102f56;
    --pub-navy-2: #173f66;
    --pub-ink: #2b3d52;
    --pub-muted: #5d6e81;
    --pub-line: #e4e9ee;
    --pub-soft: #f6f8fb;
    --pub-cream: #fdf8ef;
    --pub-gold: #F2A21B;
    --pub-gold-ink: #A85F00;
    --pub-serif: "Fraunces", Georgia, serif;
}

/* The story page's gold, made sharper on these pages */
.pub-recipe.sp, .pub-read { --sp-gold: var(--pub-gold-ink); }

.pub-eyebrow { display: block; margin: 0 0 8px; color: var(--pub-gold-ink); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pub-lede { max-width: 62ch; margin: 10px 0 0; color: var(--pub-muted); font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 1.6; }

/* Buttons */
.pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
    border: 1px solid transparent; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.pub-btn:hover { text-decoration: none; }
.pub-btn:focus-visible, .pub-link:focus-visible { outline: 3px solid var(--pub-gold); outline-offset: 2px; }
.pub-btn--gold { background: var(--pub-gold); color: var(--pub-navy); }
.pub-btn--gold:hover { background: #E8940C; color: var(--pub-navy); }
.pub-btn--navy { background: var(--pub-navy); color: #fff; }
.pub-btn--navy:hover { background: var(--pub-navy-2); color: #fff; }
.pub-btn--ghost { border-color: currentColor; background: transparent; color: inherit; }
.pub-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; font-weight: 600; text-decoration: none; }
.pub-link:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--pub-gold); }
.pub-link i { font-size: .8em; }

/* ── The public recipe (/r/…) ── */
.pub-recipe { padding-top: clamp(12px, 3vw, 32px); }
.pub-recipe-head { margin: 0 0 20px; }
.pub-recipe-head .sp-title { margin-bottom: 6px; }
.pub-cover { margin-bottom: 22px; }
.pub-cover img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.pub-card { position: relative; border-top: 4px solid var(--pub-gold); }
.pub-nutrition { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--pub-line); }
.pub-nutrition h3 { margin: 0 0 10px; color: var(--pub-navy); font-size: 1rem; font-weight: 600; }
.pub-nutrition h3 small { margin-left: 6px; color: var(--pub-muted); font-size: .8rem; font-weight: 500; }
.pub-nutrition dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 0; }
.pub-nutrition dl > div { padding: 10px 12px; border-radius: 12px; background: var(--pub-soft); }
.pub-nutrition dt { color: var(--pub-muted); font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pub-nutrition dd { margin: 2px 0 0; color: var(--pub-navy); font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pub-nutrition dd small { margin-left: 2px; color: var(--pub-muted); font-size: .78rem; font-weight: 500; }
.pub-story-link { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin: 18px 0 0; padding: 16px 20px; border: 1px solid var(--pub-line);
    border-radius: 16px; background: #fff; color: var(--pub-navy); text-decoration: none; }
.pub-story-link:hover { border-color: var(--pub-gold); text-decoration: none; color: var(--pub-navy); }
.pub-story-link .pub-eyebrow { flex: 1 0 100%; margin: 0; }
.pub-story-link b { flex: 1 1 auto; font-family: var(--pub-serif); font-size: 1.2rem; font-weight: 500; }
.pub-story-link i { color: var(--pub-gold-ink); }

/* The way in: navy, gold button */
.pub-invite { margin: 28px 0 8px; padding: clamp(22px, 4vw, 36px); border-radius: 20px; background: var(--pub-navy); color: #fff; }
.pub-invite h2 { margin: 0 0 8px; color: #fff; font-family: var(--pub-serif); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 500; }
.pub-invite h2::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--pub-gold); }
.pub-invite p { max-width: 60ch; margin: 0 0 18px; color: #d4deea; line-height: 1.6; }
.pub-invite-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pub-invite .pub-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.pub-invite .pub-btn--ghost:hover { border-color: #fff; color: #fff; }
.pub-invite .pub-link { color: #fff; }

/* ── READ (/read): stories, then recipes ── */
.pub-read { max-width: 1080px; margin: 0 auto; padding: clamp(18px, 4vw, 44px) 0 48px; color: var(--pub-ink); }
.pub-read-head { max-width: 720px; margin: 0 0 clamp(20px, 4vw, 36px); }
.pub-read-head h1 { margin: 0; color: var(--pub-navy); font-family: var(--pub-serif); font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }
.pub-empty { color: var(--pub-muted); }
.pub-stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.pub-story { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--pub-line); border-radius: 18px; background: #fff;
    color: var(--pub-ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.pub-story:hover { border-color: var(--pub-gold); text-decoration: none; color: var(--pub-ink); transform: translateY(-2px); }
.pub-story:focus-visible { outline: 3px solid var(--pub-gold); outline-offset: 2px; }
.pub-story-img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--pub-cream); color: #d9b77a; font-size: 1.8rem; overflow: hidden; }
.pub-story-img img { width: 100%; height: 100%; object-fit: cover; }
.pub-story-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.pub-story-body .pub-eyebrow { margin: 0; }
.pub-story-body b { color: var(--pub-navy); font-family: var(--pub-serif); font-size: 1.25rem; font-weight: 500; line-height: 1.25; }
.pub-story-sum { color: var(--pub-muted); font-size: .92rem; line-height: 1.5; }
.pub-story-body small { margin-top: auto; padding-top: 4px; color: var(--pub-muted); font-size: .82rem; }
.pub-recipes { margin-top: clamp(32px, 6vw, 56px); }
.pub-recipes h2 { margin: 0 0 14px; color: var(--pub-navy); font-family: var(--pub-serif); font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 500; }
.pub-recipes ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pub-recipes a { display: flex; flex-direction: column; gap: 4px; color: var(--pub-navy); text-decoration: none; }
.pub-recipes a:hover b { text-decoration: underline; text-decoration-color: var(--pub-gold); text-underline-offset: 4px; }
.pub-recipe-img { display: grid; place-items: center; aspect-ratio: 1 / 1; margin-bottom: 6px; border-radius: 14px; background: var(--pub-cream); color: #d9b77a; overflow: hidden; }
.pub-recipe-img img { width: 100%; height: 100%; object-fit: cover; }
.pub-recipes b { font-weight: 600; }
.pub-recipes small { color: var(--pub-muted); font-size: .82rem; }
/* 2026-11-05 Preview: "Members only" recipes (they go to the invite) */
.pub-recipe-img { position: relative; }
.pub-recipes .is-locked .pub-recipe-img img { filter: saturate(.75) brightness(.8); }
.pub-lock { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
    background: var(--pub-navy); color: #fff; font-size: .74rem; font-weight: 600; box-shadow: 0 2px 8px rgba(16,47,86,.25); }
.pub-lock i { color: var(--pub-gold); }

@media (max-width: 600px) {
    .pub-stories { grid-template-columns: 1fr; gap: 14px; }
    .pub-recipes ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pub-invite-go .pub-btn { flex: 1 1 100%; }
    .pub-cover img { max-height: 340px; }
}
@media (prefers-reduced-motion: reduce) { .pub-story { transition: none; } .pub-story:hover { transform: none; } }
@media print { .pub-invite, .pub-story-link { display: none !important; } }
