/* Almanac — Morning Edition Landing Page */

:root {
  --font-serif: "Iowan Old Style", "Charter", "Palatino Linotype", "Newsreader", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Libre Franklin", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-x: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background: #F4F3F1;
  color: #1F1D18;
}
h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid #3A6EA5; outline-offset: 3px; }
.nums { font-variant-numeric: tabular-nums; }

/* Progressive staggered entrance */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js-ready [data-reveal].is-shown {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 28px; font-size: 15.5px; color: #1F1D18; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: #3A6EA5; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  background: #3A6EA5;
  color: #FFFFFF;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.btn-pill:hover { background: #2D5A8B; }
.btn-pill:active { transform: scale(0.97); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: 28px 88px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.hero-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(3.1rem, 6.2vw, 5.4rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.03em;
  max-width: 11ch;
}
.hero-copy p {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: #1F1D18;
  max-width: 38ch;
}
.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Interactive Reader Stage */
.stage-band {
  background: #EAE8E3;
  padding-block: clamp(72px, 9vw, 124px);
}
.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.stage-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.stage-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pill-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.t-pill {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  background: #F4F3F1;
  color: #1F1D18;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.t-pill:hover { background: #DFDDD6; }
.t-pill:active { transform: scale(0.97); }
.t-pill.is-on { background: #1F1D18; color: #FFFFFF; }

/* Live App UI Fragment (data-ui) */
[data-ui] {
  --u-side: #F2F0EB;
  --u-list: #FAF9F5; /* taste-skill-ignore */
  --u-read: #FFFFFF;
  --u-ink: #1F1D18;
  --u-ink2: #4D4941;
  --u-ink3: #5B564D;
  --u-border: rgba(31, 29, 24, 0.10);
  --u-border2: rgba(31, 29, 24, 0.16);
  --u-accent: #3A6EA5;
  --u-accent-soft: rgba(58, 110, 165, 0.13);
  --u-pill: rgba(31, 29, 24, 0.06);
  background: var(--u-read);
  color: var(--u-ink);
  border: 1px solid var(--u-border2); /* taste-skill-ignore */
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
}
[data-ui][data-theme="sepia"] {
  --u-side: #EFE8D8;
  --u-list: #F6F0E2;
  --u-read: #FBF6EA;
  --u-ink: #3B3126;
  --u-ink2: #5E5142;
  --u-ink3: #685A4A;
  --u-border: rgba(59, 49, 38, 0.11);
  --u-border2: rgba(59, 49, 38, 0.20);
  --u-accent: #9E532E;
  --u-accent-soft: rgba(158, 83, 46, 0.14);
  --u-pill: rgba(59, 49, 38, 0.07);
}
[data-ui][data-theme="mist"] {
  --u-side: #ECEFF2;
  --u-list: #F6F8FA;
  --u-read: #FFFFFF;
  --u-ink: #1B2028;
  --u-ink2: #46505D;
  --u-ink3: #546070;
  --u-border: rgba(27, 32, 40, 0.09);
  --u-border2: rgba(27, 32, 40, 0.16);
  --u-accent: #2E6BE6;
  --u-accent-soft: rgba(46, 107, 230, 0.12);
  --u-pill: rgba(27, 32, 40, 0.06);
}
[data-ui][data-theme="night"] {
  --u-side: #171719;
  --u-list: #1C1C1F;
  --u-read: #151517;
  --u-ink: #E6E4DD;
  --u-ink2: #B8B4AB;
  --u-ink3: #9E9A91;
  --u-border: rgba(230, 228, 221, 0.10);
  --u-border2: rgba(230, 228, 221, 0.18);
  --u-accent: #6B9EF5;
  --u-accent-soft: rgba(107, 158, 245, 0.18);
  --u-pill: rgba(230, 228, 221, 0.09);
}

.mac-shell {
  display: grid;
  grid-template-columns: 184px 256px 1fr;
  min-height: 448px;
}
.mac-side {
  background: var(--u-side);
  border-right: 1px solid var(--u-border); /* taste-skill-ignore */
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mac-list {
  background: var(--u-list);
  border-right: 1px solid var(--u-border); /* taste-skill-ignore */
  display: flex;
  flex-direction: column;
}
.mac-read {
  background: var(--u-read);
  padding: 22px 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mac-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--u-border); /* taste-skill-ignore */
  font-size: 13px;
  font-weight: 600;
  color: var(--u-ink);
}
.dots { display: flex; gap: 6px; padding: 4px 6px 12px; }
.dots span { width: 10px; height: 10px; border-radius: 999px; background: var(--u-border2); }
.s-cat { font-size: 11.5px; font-weight: 600; color: var(--u-ink3); padding: 10px 8px 4px; }
.s-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--u-ink);
}
.s-row.on { background: var(--u-accent-soft); color: var(--u-accent); font-weight: 600; }
.a-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--u-border); /* taste-skill-ignore */
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background-color 140ms ease;
}
.a-row:hover { background: var(--u-pill); }
.a-row.on { background: var(--u-accent-soft); }
.a-row-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--u-ink2); }
.a-row-title { font-size: 13.5px; font-weight: 600; color: var(--u-ink); line-height: 1.32; }
.r-byline { font-size: 12.5px; color: var(--u-ink2); }
.r-title { font-family: var(--font-serif); font-size: 23px; font-weight: 600; line-height: 1.22; color: var(--u-ink); }
.r-prose {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.65;
  color: var(--u-ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.r-summary {
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--u-side);
  font-size: 14px;
  line-height: 1.5;
  color: var(--u-ink);
}

/* Editorial Story Spread */
.story-band {
  background: #FFFFFF;
  padding-block: clamp(80px, 10vw, 136px);
}
.story-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}
.story-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.story-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.story-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.story-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.story-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.story-item h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 4px;
}
.story-item p {
  font-size: 16.5px;
  color: #4A463E;
  max-width: 44ch;
}

/* Designed Footer */
.foot {
  background: #1F1D18;
  color: #F4F3F1;
  padding-block: clamp(56px, 7vw, 96px) 44px;
}
.foot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.foot-top p {
  font-size: 18px;
  max-width: 38ch;
  color: #D2CFC8;
}
.foot-wordmark {
  font-family: var(--font-serif);
  font-size: clamp(4.2rem, 15vw, 13.5rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: #F4F3F1;
}
.foot-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  font-size: 14.5px;
  color: #A6A39B;
}

/* Responsive */
@media (max-width: 960px) {
  .mac-shell { grid-template-columns: 1fr; min-height: 320px; }
  .mac-side, .mac-list { display: none; }
  .hero, .story-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
