/* =========================================================================
   MedMoments — documentary storytelling publication
   Soft warm neutrals · near-black ink · one muted clay accent · big type.
   Change the variables in :root and the whole site re-themes.
   ========================================================================= */

:root {
  /* ---- Palette (soft, neutral, warm) ----------------------------------- */
  --paper:     #F5F1EA;   /* warm bone page background */
  --paper-2:   #ECE5D9;   /* deeper band */
  --surface:   #FCFAF6;   /* cards */
  --ink:       #1A1916;   /* near-black, warm */
  --ink-2:     #57514A;   /* secondary text */
  --ink-3:     #968F82;   /* meta / captions */
  --line:      #E3DBCE;   /* hairlines */
  --accent:    #AE5638;   /* muted clay — used sparingly */
  --ink-rev:   #F5F1EA;   /* text on dark */

  /* ---- Type ------------------------------------------------------------ */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ui:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---- Shape ----------------------------------------------------------- */
  --radius:   10px;
  --radius-lg:18px;
  --shadow:   0 1px 2px rgba(26,25,22,.03), 0 10px 30px rgba(26,25,22,.06);
  --shadow-lg:0 2px 8px rgba(26,25,22,.05), 0 24px 60px rgba(26,25,22,.12);

  --container: 1180px;
  --narrow:    720px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ui);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .15s ease, opacity .15s ease; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* ---- Layout ----------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 28px; }
.container.narrow { max-width: var(--narrow); }
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.lede { font-size: 1.25rem; line-height: 1.55; color: var(--ink-2); }

.kicker {
  font-family: var(--ui);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
}
.kicker.light { color: #E7B7A6; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--ui); font-weight: 600; font-size: .96rem;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245,241,234,.85);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display); font-weight: 500; font-size: 1.42rem;
  letter-spacing: -0.02em; color: var(--ink);
}
.brand .ekg { width: 30px; height: 18px; color: var(--accent); }
.brand b { font-weight: 600; }

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a { font-family: var(--ui); font-weight: 500; font-size: .98rem; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }
.site-nav a.btn { color: var(--paper); }
.site-nav a.btn:hover { color: var(--paper); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 11px; cursor: pointer; color: var(--ink); font-size: 1rem;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding: 100px 0 64px; }
.hero-inner { max-width: 920px; }
.hero h1 {
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-top: 22px;
  font-weight: 400;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { margin-top: 28px; max-width: 56ch; font-size: clamp(1.15rem, 2vw, 1.45rem); }
.hero-actions { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; gap: 48px; flex-wrap: wrap;
}
.hero-meta .m strong { font-family: var(--display); font-size: 1.05rem; font-weight: 500; display:block; color: var(--ink); }
.hero-meta .m span { font-size: .9rem; color: var(--ink-3); }

/* =========================================================================
   Section heading
   ========================================================================= */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 400; }
.section-head .kicker { margin-bottom: 14px; }
.section-head p { color: var(--ink-2); margin-top: 10px; max-width: 54ch; }
.link-more { font-family: var(--ui); font-weight: 600; font-size: .95rem; white-space: nowrap; color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.link-more:hover { color: var(--accent); }

/* =========================================================================
   Placeholder media tones (soft duotone, used until real photos exist)
   ========================================================================= */
.tone-sand  { background: linear-gradient(150deg, #E9DECB, #D6C5A8); }
.tone-clay  { background: linear-gradient(150deg, #E6CCBB, #C99B81); }
.tone-sage  { background: linear-gradient(150deg, #D6DBC8, #AFBE9F); }
.tone-slate { background: linear-gradient(150deg, #CFD6D9, #A4B1B7); }
.tone-dusk  { background: linear-gradient(150deg, #D6CDDA, #B2A2BD); }
.tone-olive { background: linear-gradient(150deg, #DAD7BC, #B6B285); }

.media-ph-mark {
  font-family: var(--display); font-weight: 500;
  font-size: 3.4rem; color: rgba(26,25,22,.20);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.media-ph-mark.big { font-size: 7rem; position: static; height: 100%; }

/* =========================================================================
   Featured story
   ========================================================================= */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.feature-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-text h2 { font-size: clamp(2rem, 3.8vw, 3.3rem); font-weight: 400; margin-top: 16px; line-height: 1.04; }
.feature-text p { font-size: 1.2rem; color: var(--ink-2); margin-top: 18px; max-width: 42ch; }
.feature .read-link { display: inline-block; margin-top: 26px; font-family: var(--ui); font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 3px; }
.feature:hover .read-link { color: var(--accent); }
.feature:hover .feature-media { box-shadow: var(--shadow-lg); }

/* =========================================================================
   Story cards / grid — portrait, documentary
   ========================================================================= */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px; }

.card { display: flex; flex-direction: column; }
.card-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card:hover .card-media img { transform: scale(1.03); }

.media-badge {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(20,18,15,.62); color: #fff; backdrop-filter: blur(4px);
  font-family: var(--ui); font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  padding: 6px 11px; border-radius: 999px;
}
.media-badge svg { width: 12px; height: 12px; }
.media-play {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
}
.media-play svg { width: 26px; height: 26px; color: var(--ink); margin-left: 3px; }
.media-play::before {
  content: ""; position: absolute; width: 62px; height: 62px; border-radius: 50%;
  background: rgba(252,250,246,.92); box-shadow: var(--shadow);
}
.media-play svg { position: relative; z-index: 1; }

.card-text { padding-top: 20px; }
.card .kicker { font-size: .7rem; color: var(--accent); }
.card-title { font-size: 1.5rem; font-weight: 400; margin-top: 9px; line-height: 1.14; }
.card:hover .card-title { color: #000; }
.card-dek { color: var(--ink-2); margin-top: 9px; font-size: 1rem; line-height: 1.5; }
.card-meta { margin-top: 14px; font-family: var(--ui); font-size: .84rem; color: var(--ink-3); display: flex; align-items: center; gap: 9px; }
.card-meta .dot, .byline .dot, .feature .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* =========================================================================
   Quote of the week
   ========================================================================= */
.quote-block { max-width: 920px; margin: 0 auto; text-align: center; }
.quote-block blockquote {
  font-family: var(--display); font-weight: 400; font-style: italic;
  font-size: clamp(1.8rem, 4.2vw, 3.1rem); line-height: 1.18; color: var(--ink);
  letter-spacing: -0.01em;
}
.quote-block figcaption { margin-top: 28px; font-family: var(--ui); font-size: .98rem; color: var(--ink-2); }
.quote-block figcaption a { border-bottom: 1px solid var(--accent); }
.quote-block figcaption a:hover { color: var(--accent); }

/* =========================================================================
   Watch strip
   ========================================================================= */
.watch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.watch-card {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius);
  overflow: hidden; display: flex; align-items: flex-end; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.watch-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.watch-cap {
  position: relative; z-index: 2; width: 100%; padding: 18px 20px; color: #fff;
  background: linear-gradient(transparent, rgba(20,18,15,.72));
}
.watch-cap strong { font-family: var(--display); font-weight: 500; font-size: 1.15rem; display: block; }
.watch-cap span { font-family: var(--ui); font-size: .82rem; opacity: .85; }

/* =========================================================================
   Newsletter
   ========================================================================= */
.newsletter { max-width: 560px; }
.newsletter form { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.newsletter input[type=email] {
  flex: 1; min-width: 220px; font-family: var(--ui); font-size: 1rem;
  padding: 14px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.newsletter input[type=email]:focus { outline: none; border-color: var(--ink); }
.newsletter .ok { margin-top: 12px; color: var(--accent); font-size: .9rem; font-weight: 600; }

/* =========================================================================
   CTA band
   ========================================================================= */
.cta-band {
  border-radius: var(--radius-lg); background: var(--ink); color: var(--ink-rev);
  padding: 60px 56px; display: grid; grid-template-columns: 1.5fr auto; gap: 32px; align-items: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 400; margin-top: 12px; }
.cta-band p { color: rgba(245,241,234,.72); margin-top: 12px; max-width: 46ch; }
.cta-band .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* =========================================================================
   Bands
   ========================================================================= */
.band { background: var(--paper-2); }
.rule { height: 1px; background: var(--line); border: 0; }

/* =========================================================================
   Archive (Stories page): search + filter
   ========================================================================= */
.archive-controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.search-box { position: relative; flex: 1; min-width: 240px; max-width: 380px; }
.search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search-box input {
  width: 100%; font-family: var(--ui); font-size: 1rem; color: var(--ink);
  padding: 13px 16px 13px 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.search-box input:focus { outline: none; border-color: var(--ink); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  font-family: var(--ui); font-weight: 500; font-size: .9rem; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); transition: all .15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.count { font-family: var(--ui); font-size: .9rem; color: var(--ink-3); margin-bottom: 24px; }
.empty { font-family: var(--display); font-size: 1.4rem; color: var(--ink-3); padding: 60px 0; text-align: center; }

/* =========================================================================
   Single story
   ========================================================================= */
.article-head { padding: 56px 0 8px; }
.back-link { font-family: var(--ui); font-size: .9rem; color: var(--ink-3); display: block; margin-bottom: 28px; }
.back-link:hover { color: var(--accent); }
.article-head .tag { font-family: var(--ui); font-weight: 600; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.article-head h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); font-weight: 400; margin-top: 16px; line-height: 1.04; letter-spacing: -0.02em; }
.article-head .sub { font-family: var(--display); font-style: italic; font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--ink-2); margin-top: 20px; line-height: 1.4; }
.byline {
  margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; font-family: var(--ui); font-size: .92rem;
}
.byline .avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: rgba(26,25,22,.5);
}
.byline-meta { margin-left: auto; color: var(--ink-3); }

.article-hero {
  position: relative; max-width: 1000px; margin: 32px auto 0;
  aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

.article-body { padding: 56px 0 16px; }
.article-body p { font-family: var(--display); font-weight: 400; font-size: 1.25rem; line-height: 1.78; color: #2a2723; margin-bottom: 1.45em; }
.article-body p:first-of-type::first-letter {
  font-family: var(--display); font-size: 3.6em; float: left; line-height: .76;
  padding: 8px 12px 0 0; color: var(--accent); font-weight: 500;
}
.article-body h2 { font-size: 1.8rem; font-weight: 400; margin: 1.5em 0 .5em; }
.article-body blockquote {
  margin: 1.6em 0; padding-left: 28px; border-left: 3px solid var(--accent);
  font-family: var(--display); font-style: italic; font-size: 1.6rem; line-height: 1.36; color: var(--ink);
}
.consent-note { font-family: var(--ui); font-size: .92rem; color: var(--ink-3); margin-top: 2.4em; }
.sample-flag {
  font-family: var(--ui); background: #F4E9DD; border: 1px solid #E3CDB8; color: #8a5a33;
  border-radius: var(--radius); padding: 13px 18px; font-size: .9rem; margin-bottom: 34px;
}
.sample-flag code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: .85em; }

.video-embed { max-width: 760px; margin: 44px auto; }
.video-embed .frame { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed figcaption { text-align: center; font-family: var(--ui); font-size: .86rem; color: var(--ink-3); margin-top: 14px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: rgba(245,241,234,.72); padding: 72px 0 36px; margin-top: 32px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 44px; }
.site-footer .brand { color: var(--paper); }
.site-footer .brand .ekg { color: var(--accent); }
.footer-about { margin-top: 18px; max-width: 38ch; font-size: .96rem; line-height: 1.6; }
.footer-col h4 { font-family: var(--ui); font-weight: 600; color: var(--paper); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col a { display: block; color: rgba(245,241,234,.72); margin-bottom: 11px; font-size: .96rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(245,241,234,.16); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: rgba(245,241,234,.5); }

/* =========================================================================
   Reveal
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* =========================================================================
   Responsive (mobile-first friendly breakpoints)
   ========================================================================= */
@media (max-width: 960px) {
  .grid, .watch-grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature-media { aspect-ratio: 16/10; max-height: 420px; }
  .cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 48px; }
  .site-nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 28px 22px;
    transform: translateY(-130%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: 12px; justify-content: center; border-bottom: none; }
  .nav-toggle { display: inline-flex; }
  .grid, .watch-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-meta { gap: 28px; }
  .cta-band { padding: 40px 28px; }
  .archive-controls { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .article-body p:first-of-type::first-letter { font-size: 3em; }
}
