/* DeepEats Journal — editorial styles from the Paper file "P02 — Editorial long-read" */
:root {
  --ink: #111111;
  --body: #2A2A2A;
  --muted: #6E6E73;
  --soft: #555555;
  --line: #E5E5E5;
  --cobalt: #2B3FB8;
  --cobalt-deep: #1F2E8A;
  --cobalt-tint: #F6F7FC;
  --paper: #FFFFFF;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--cobalt); color: #fff; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--ink); }
.masthead-inner { max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 24px 64px; gap: 24px; }
.brand { font-family: var(--serif); font-size: 28px; line-height: 34px; letter-spacing: -0.02em; text-decoration: none; }
.masthead nav { display: flex; align-items: center; gap: 28px; }
.masthead nav a { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.masthead nav a:hover { color: var(--cobalt); }
.pill-btn { display: inline-flex; align-items: center; background: var(--cobalt); color: #fff !important; border-radius: 999px; padding: 10px 18px; letter-spacing: 0 !important; text-transform: none !important; font-size: 14px !important; transition: background 0.2s; }
.pill-btn:hover { background: var(--cobalt-deep); }

.kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cobalt); line-height: 16px; }

/* Article */
.article-header { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 112px 32px 72px; text-align: center; }
.article-header h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 6.2vw, 88px); line-height: 1; letter-spacing: -0.03em; max-width: 1000px; }
.dek { font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 36px; color: #444; max-width: 720px; }
.byline { display: flex; align-items: center; gap: 14px; padding-top: 12px; text-align: left; }
.byline .av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #D6DCF2, #2B3FB8); flex-shrink: 0; }
.byline b { display: block; font-size: 15px; line-height: 18px; }
.byline small { font-size: 13px; color: var(--muted); }

.prose { width: min(680px, 100% - 64px); margin: 0 auto; }
.prose.first { border-top: 1px solid var(--line); padding-top: 56px; }
.prose p { font-size: 19px; line-height: 32px; color: var(--body); margin-bottom: 28px; }
.prose p.lead { font-size: 22px; line-height: 36px; color: var(--ink); }
.prose .num { margin: 44px 0 12px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 48px; letter-spacing: -0.02em; margin-bottom: 28px; }
.prose a { color: var(--cobalt); text-underline-offset: 3px; }
.prose ul { margin: 0 0 28px 22px; }
.prose li { font-size: 19px; line-height: 32px; color: var(--body); margin-bottom: 8px; }
.prose strong { color: var(--ink); }
.signoff { font-family: var(--serif); font-size: 24px; margin-top: 8px; }

.pull { width: min(920px, 100% - 64px); margin: 40px auto 56px; text-align: center; }
.pull::before { content: ""; display: block; width: 48px; height: 2px; background: var(--cobalt); margin: 0 auto 32px; }
.pull blockquote { font-family: var(--serif); font-style: italic; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.12; letter-spacing: -0.02em; color: var(--cobalt); }

.figure { width: min(920px, 100% - 64px); margin: 24px auto 64px; }
.figure-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.figure-head b { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.figure-head span { font-size: 13px; color: var(--muted); }
.figure svg { width: 100%; height: auto; margin-top: 12px; }
.figure svg text { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.figure figcaption { max-width: 680px; font-size: 14px; line-height: 22px; color: var(--muted); margin-top: 14px; }

.aside { width: min(680px, 100% - 64px); margin: 16px auto 56px; background: var(--cobalt-tint); border: 1px solid var(--ink); padding: 36px 40px 40px; }
.aside-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.aside-head h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 36px; letter-spacing: -0.01em; }
.drivers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; list-style: none; counter-reset: d; }
.drivers li { counter-increment: d; display: grid; grid-template-columns: 24px 1fr; gap: 14px; }
.drivers li::before { content: counter(d); font-family: var(--serif); font-size: 22px; line-height: 28px; color: var(--cobalt); }
.drivers b { display: block; font-size: 16px; line-height: 20px; margin-bottom: 4px; }
.drivers span { font-size: 14px; line-height: 21px; color: var(--soft); }
.aside-note { font-size: 13px; line-height: 20px; color: var(--soft); margin-top: 24px; }

.related { width: min(920px, 100% - 64px); margin: 40px auto 96px; border-top: 1px solid var(--ink); padding-top: 24px; }
.related h3 { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* Cards (index + related) */
.card { display: block; text-decoration: none; color: var(--ink); }
.card .thumb { aspect-ratio: 16 / 10; border: 1px solid var(--ink); background: var(--cobalt-tint); display: grid; place-items: center; overflow: hidden; margin-bottom: 18px; transition: background 0.25s; }
.card:hover .thumb { background: #ECEFFA; }
.card .thumb svg { width: 72%; height: auto; }
.card h2, .card h4 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 36px; letter-spacing: -0.015em; margin: 10px 0 10px; }
.card:hover h2, .card:hover h4 { color: var(--cobalt); }
.card p { font-size: 16px; line-height: 26px; color: var(--soft); }
.card .meta { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* Index */
.index-hero { max-width: 1440px; margin: 0 auto; padding: 96px 64px 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; border-bottom: 1px solid var(--ink); }
.index-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 7vw, 104px); line-height: 0.95; letter-spacing: -0.03em; }
.index-hero p { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 34px; color: #444; max-width: 520px; }
.topics { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.topics a { font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--ink); border-radius: 999px; padding: 7px 14px; transition: background 0.2s, color 0.2s; }
.topics a:hover, .topics a[aria-current="true"] { background: var(--ink); color: #fff; }
.featured { max-width: 1440px; margin: 0 auto; padding: 56px 64px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; border-bottom: 1px solid var(--line); }
.featured .card .thumb { margin-bottom: 0; aspect-ratio: 16 / 9; }
.featured h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.025em; margin: 14px 0 18px; }
.featured h2 a { text-decoration: none; }
.featured h2 a:hover { color: var(--cobalt); }
.featured p { font-size: 18px; line-height: 30px; color: var(--soft); }
.grid { max-width: 1440px; margin: 0 auto; padding: 56px 64px 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; }
.upcoming { opacity: 0.7; }
.upcoming .thumb { border-style: dashed; }
.soon-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--ink); padding: 3px 8px; margin-left: 6px; }

/* CTA band */
.cta-band { background: var(--cobalt); color: #fff; }
.cta-inner { max-width: 1440px; margin: 0 auto; padding: 88px 120px; display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.cta-inner h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.02em; }
.cta-inner p { font-size: 17px; line-height: 27px; color: rgba(255,255,255,0.78); margin-top: 16px; max-width: 520px; }
.cta-form { display: flex; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 20px; width: min(440px, 100%); flex-shrink: 0; }
.cta-form input { flex: 1; min-width: 0; border: 0; outline: none; font-family: inherit; font-size: 16px; color: var(--ink); background: transparent; }
.cta-form button { border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-family: inherit; font-size: 15px; font-weight: 600; padding: 12px 20px; cursor: pointer; white-space: nowrap; }
.cta-done { display: none; font-size: 17px; font-weight: 500; }
.is-joined .cta-form { display: none; }
.is-joined .cta-done { display: block; }

.foot { max-width: 1440px; margin: 0 auto; padding: 40px 64px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot nav { display: flex; gap: 22px; }

.disclaimer { width: min(680px, 100% - 64px); margin: 0 auto 56px; font-size: 13px; line-height: 20px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

@media (max-width: 960px) {
  .masthead nav a:not(.pill-btn) { display: none; }
  .masthead-inner { padding: 18px 24px; }
  .index-hero, .featured { grid-template-columns: 1fr; gap: 28px; padding: 56px 24px 40px; }
  .grid { grid-template-columns: 1fr 1fr; padding: 40px 24px 72px; }
  .cta-inner { flex-direction: column; align-items: flex-start; padding: 64px 24px; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .masthead-inner { padding: 14px 16px; }
  .brand { font-size: 24px; }
  .article-header { padding: 64px 16px 48px; gap: 20px; }
  .dek { font-size: 22px; line-height: 30px; }
  .prose, .pull, .figure, .aside, .related, .disclaimer { width: calc(100% - 32px); }
  .prose p, .prose li { font-size: 17px; line-height: 29px; }
  .prose p.lead { font-size: 19px; line-height: 31px; }
  .prose h2 { font-size: 34px; line-height: 38px; }
  .aside { padding: 28px 20px; }
  .drivers { grid-template-columns: 1fr; }
  .index-hero, .featured { padding: 40px 16px 32px; }
  .grid { grid-template-columns: 1fr; padding: 32px 16px 56px; }
  .cta-inner { padding: 56px 16px; }
  .cta-form { flex-direction: column; border-radius: 20px; padding: 8px; }
  .cta-form input { padding: 10px 12px; }
  .foot { padding: 32px 16px; }
}

/* ------------------------------------------------------------------
   Brand refresh: matches the homepage (see ../style-guide.html).
   Off-white page, navy logo lockup, soft cards instead of ink rules,
   navy night-sky CTA band, star-twinkle buttons.
   ------------------------------------------------------------------ */
:root {
  --bg: #FAFAF8;
  --ink-2: #3A3A3C;
  --line: #E8E8EC;
  --panel: #F3F3F6;
  --tint: #EEF0FA;
  --navy: #141C45;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 1px 2px rgba(17,17,17,.04), 0 24px 60px -32px rgba(17,17,17,.22);
}
body { background: var(--bg); }

/* Masthead = homepage nav */
.masthead { background: rgba(250,250,248,.82); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: 1200px; padding: 18px 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; line-height: 1; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 6px 14px -6px rgba(20,28,69,.7); }
.brand span { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line); line-height: 18px; }
.brand.small { font-size: 22px; gap: 8px; }
.brand.small .mark { width: 24px; height: 24px; border-radius: 6px; }
.masthead nav a { font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-2); }

/* Buttons = homepage .btn (navy gradient + twinkling stars on hover) */
.btn, .pill-btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; color: #fff !important; font-family: var(--sans); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, #26356F 0%, #141C45 60%, #0E1433 100%); box-shadow: 0 8px 20px -10px rgba(20,28,69,.6); transition: background .2s, transform .2s var(--ease); }
.btn:hover, .pill-btn:hover { background: linear-gradient(135deg, #2F4185 0%, #1A2455 60%, #121A40 100%); }
.btn:active { transform: scale(.97); }
.pill-btn { padding: 11px 20px; font-size: 14px !important; }
.btn::before, .btn::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; --s: #fff; filter: opacity(0); transition: filter .6s var(--ease); }
.btn::before { animation: deTwinkle 3s ease-in-out infinite; background:
    radial-gradient(circle at 6% 50%, var(--s) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 23% 16%, var(--s) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 45% 86%, var(--s) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 64% 13%, var(--s) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 95% 32%, var(--s) 0 .9px, transparent 1.5px); }
.btn::after { animation: deTwinkle 3s ease-in-out -1.5s infinite; background:
    radial-gradient(circle at 14% 85%, var(--s) 0 .9px, transparent 1.5px),
    radial-gradient(circle at 35% 12%, var(--s) 0 .7px, transparent 1.3px),
    radial-gradient(circle at 57% 88%, var(--s) 0 1px, transparent 1.7px),
    radial-gradient(circle at 80% 86%, var(--s) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 89% 13%, var(--s) 0 1px, transparent 1.7px); }
@keyframes deTwinkle { 0%, 30% { opacity: .5; } 55%, 80% { opacity: 0; } 100% { opacity: .5; } }
.btn:hover::before, .btn:hover::after, .btn:focus-visible::before, .btn:focus-visible::after { filter: opacity(1); }
@media (prefers-reduced-motion: reduce) { .btn::before, .btn::after { animation: none; opacity: .35; } }

/* Article details */
.byline .av { background: url("../img/logo.svg") center / cover; border-radius: 10px; }
.prose.first { border-top-color: var(--line); }
.figure-head { border-bottom-color: var(--line); }
.aside { background: var(--paper); border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.related { border-top-color: var(--line); }

/* Cards: soft rounded thumbs instead of ink frames */
.card .thumb { border: 0; border-radius: 22px; background: linear-gradient(180deg, #F4F5FB, var(--tint)); box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card:hover .thumb { background: linear-gradient(180deg, #F4F5FB, var(--tint)); transform: translateY(-3px); box-shadow: 0 1px 2px rgba(17,17,17,.04), 0 30px 60px -30px rgba(20,28,69,.35); }
.upcoming .thumb { border: 1.5px dashed var(--line); box-shadow: none; background: transparent; }
.upcoming:hover .thumb { transform: none; box-shadow: none; }
.soon-tag { border: 0; border-radius: 999px; background: var(--panel); color: var(--muted); padding: 3px 9px; letter-spacing: .08em; }

/* Index */
.index-hero, .featured, .grid { max-width: 1200px; padding-left: 40px; padding-right: 40px; }
.index-hero { border-bottom-color: var(--line); }
.index-hero p, .dek { color: var(--ink-2); }
.topics a { border: 0; background: var(--panel); color: var(--ink-2); }
.topics a:hover, .topics a[aria-current="true"] { background: var(--navy); color: #fff; }

/* CTA band = homepage closing band: navy night sky with static stars */
.cta-band { width: min(1200px, 100% - 80px); margin: 32px auto 0; border-radius: 36px; overflow: hidden; position: relative; isolation: isolate;
  background: radial-gradient(ellipse 55% 70% at 18% 8%, rgba(111,134,232,.42), transparent 70%), linear-gradient(135deg, #26356F 0%, #141C45 55%, #090D24 100%); }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image:
    radial-gradient(1px 1px at 32.7% 16.5%, rgba(255,255,255,.28), transparent),
    radial-gradient(1.6px 1.6px at 53.5% 37.1%, rgba(255,255,255,.63), transparent),
    radial-gradient(1.6px 1.6px at 4.7% 43.6%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.6px 1.6px at 42.6% 81.4%, rgba(255,255,255,.47), transparent),
    radial-gradient(1px 1px at 62.5% 93%, rgba(255,255,255,.39), transparent),
    radial-gradient(1px 1px at 96.7% 6.5%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 15.1% 13.3%, rgba(255,255,255,.54), transparent),
    radial-gradient(1px 1px at 18.7% 57.8%, rgba(255,255,255,.38), transparent),
    radial-gradient(1.6px 1.6px at 54.7% 8%, rgba(255,255,255,.46), transparent),
    radial-gradient(1px 1px at 67.7% 43%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 88.2% 71.5%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 76.4% 22.8%, rgba(255,255,255,.42), transparent),
    radial-gradient(1.6px 1.6px at 27.9% 88.6%, rgba(255,255,255,.36), transparent); }
.cta-inner { padding: 72px 64px; }
.cta-inner p { color: rgba(255,255,255,.85); }
.cta-form { padding: 6px 6px 6px 22px; }
.cta-form .btn { padding: 13px 22px; font-size: 15px; }
.cta-req { font-size: 13px !important; line-height: 20px !important; color: rgba(255,255,255,.75) !important; margin-top: 14px !important; }
.cta-req b { font-weight: 600; color: #fff; }
.is-joined .cta-req { display: none; }

/* Footer = homepage footer */
.foot { max-width: 1200px; padding: 48px 40px 56px; align-items: center; }

@media (max-width: 960px) {
  .masthead-inner { padding: 14px 24px; }
  .index-hero, .featured { padding-left: 24px; padding-right: 24px; }
  .grid { padding-left: 24px; padding-right: 24px; }
  .cta-band { width: calc(100% - 48px); }
  .cta-inner { padding: 56px 32px; }
}
@media (max-width: 600px) {
  .masthead-inner { padding: 12px 16px; }
  .brand { font-size: 24px; }
  .brand span { display: none; }
  .index-hero, .featured { padding-left: 16px; padding-right: 16px; }
  .grid { padding-left: 16px; padding-right: 16px; }
  .cta-band { width: calc(100% - 32px); border-radius: 28px; }
  .cta-inner { padding: 44px 22px; }
  .foot { padding: 40px 16px; }
}
.cta-form .btn { background: linear-gradient(135deg, #26356F 0%, #141C45 60%, #0E1433 100%); }
.cta-form .btn:hover { background: linear-gradient(135deg, #2F4185 0%, #1A2455 60%, #121A40 100%); }
/* Homepage type: upright ledes, no italic display text */
.dek { font-family: var(--sans); font-style: normal; font-size: 20px; line-height: 30px; }
.index-hero p { font-family: var(--sans); font-style: normal; font-size: 18px; line-height: 28px; }
.pull blockquote { font-style: normal; }
@media (max-width: 600px) { .dek { font-size: 18px; line-height: 27px; } }
.masthead nav a.pill-btn { font-weight: 600; color: #fff; }
/* Moon, same as the homepage closing band */
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/moon.svg") no-repeat right 1.5% top -34px / 150px 150px; }
@media (max-width: 960px) { .cta-band::after { background-size: 130px 130px; background-position: right -10px top -30px; } }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-err { font-size: 14px; color: #FFD1CC; margin-top: 10px; }
