/* ============================================================
   Yearline — quiet editorial, warm paper, one amber accent.
   ============================================================ */
:root {
  --paper: #faf6ee;
  --paper-deep: #f3ecdf;
  --ink: #1a1712;
  --ink-soft: #4c453a;
  --ink-faint: #8a8172;
  --accent: #b95318;
  --accent-bright: #e07a3f;
  --line: #e4dccb;
  --serif: "Fraunces", Georgia, serif;
  --text: "Newsreader", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.42 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent-bright); color: var(--paper); }

/* ---------- header ---------- */
.top {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark.small { font-size: 1.1rem; }
.top-actions { display: flex; align-items: center; gap: 1.5rem; }
.top-cta {
  font-family: var(--text); font-size: 1rem; font-style: italic;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: color .2s, border-color .2s;
}
.top-cta:hover { color: var(--ink); border-color: var(--ink); }
.lang-switch {
  font-family: var(--text); font-size: .92rem;
  color: var(--ink-faint); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.lang-switch:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ---------- hero ---------- */
.hero {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 8rem) clamp(1.25rem, 5vw, 4rem) clamp(4rem, 10vh, 7rem);
}
.kicker {
  font-style: italic; color: var(--accent);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-bottom: 1.75rem;
  animation: rise .7s ease both;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  line-height: 1.04; letter-spacing: -0.025em;
  animation: rise .7s .12s ease both;
}
.lede {
  max-width: 36rem;
  margin-top: 2rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--ink-soft);
  animation: rise .7s .24s ease both;
}
.lede em { color: var(--ink); }
.hero-actions {
  margin-top: 2.75rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  animation: rise .7s .36s ease both;
}
.hero-note { font-style: italic; color: var(--ink-faint); font-size: 1rem; }

.btn-primary {
  display: inline-block;
  font-family: var(--serif); font-weight: 550; font-size: 1.1rem;
  background: var(--ink); color: var(--paper);
  padding: .95rem 2rem; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--accent), 0 10px 30px -12px rgba(26,23,18,.5);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--accent), 0 18px 36px -12px rgba(26,23,18,.45);
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- the loop (on this day) ---------- */
.loop {
  display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1fr;
  max-width: 72rem; margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
@media (min-width: 60rem) {
  .loop { grid-template-columns: 5fr 6fr; align-items: center; }
}
.loop h2, .privacy h2, .shots h2, .get h2 {
  font-family: var(--serif); font-weight: 550;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.12; letter-spacing: -0.02em;
}
.accent { color: var(--accent); font-style: italic; }
.loop-copy p { margin-top: 1.25rem; color: var(--ink-soft); max-width: 32rem; }

.loop-stack { display: grid; gap: .8rem; }
.entry-card {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1.1rem 1.35rem;
  box-shadow: 0 1px 2px rgba(26,23,18,.05);
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.entry-card.in { opacity: 1; transform: none; }
.entry-card.in.y4 { transition-delay: .08s; }
.entry-card.in.y3 { transition-delay: .16s; }
.entry-card.in.y2 { transition-delay: .24s; }
.entry-card.in.y1 { transition-delay: .32s; }
.entry-card p { font-size: 1.05rem; }
.entry-card.y5 p, .entry-card.y4 p { color: var(--ink-faint); }
.entry-card.y3 p, .entry-card.y2 p { color: var(--ink-soft); }
.entry-date {
  display: block;
  font-family: var(--serif); font-size: .78rem; font-weight: 550;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent); margin-bottom: .3rem;
}
.entry-card.y1 { border-color: var(--accent-bright); box-shadow: 0 6px 22px -10px rgba(185,83,24,.35); }
.caret {
  display: inline-block; width: 1px; height: 1.05em;
  background: var(--accent); vertical-align: text-bottom; margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- privacy (dark) ---------- */
.privacy {
  background: var(--ink); color: var(--paper);
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 5vw, 4rem);
}
.privacy > * { max-width: 68rem; margin-left: auto; margin-right: auto; }
.privacy h2 { color: var(--paper); }
.privacy-lede { margin-top: 1.5rem; max-width: 40rem !important; margin-left: 0; color: #cfc6b4; }
.privacy-lede strong { color: var(--accent-bright); font-weight: 500; }
@media (min-width: 60rem) {
  .privacy > h2, .privacy > .privacy-lede { margin-left: auto; }
  .privacy-lede { margin-left: auto !important; }
}
.trust {
  margin-top: 3.5rem;
  display: grid; gap: 2.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.trust-item {
  border-top: 1px solid rgba(250,246,238,.22);
  padding-top: 1.25rem;
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.trust-item.in { opacity: 1; transform: none; }
.trust-item:nth-child(2).in { transition-delay: .1s; }
.trust-item:nth-child(3).in { transition-delay: .2s; }
.trust-item:nth-child(4).in { transition-delay: .3s; }
.trust dt {
  font-family: var(--serif); font-weight: 550; font-size: 1.15rem;
  color: var(--accent-bright); margin-bottom: .6rem;
}
.trust dd { color: #cfc6b4; font-size: 1.02rem; }

/* ---------- screenshots ---------- */
.shots {
  max-width: 72rem; margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 5vw, 4rem);
  text-align: center;
}
.shot-row {
  margin-top: 3.5rem;
  display: grid; gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  justify-items: center;
}
.phone {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.phone.in { opacity: 1; transform: none; }
.shot-row .phone:nth-child(2).in { transition-delay: .12s; }
.shot-row .phone:nth-child(3).in { transition-delay: .24s; }
.phone-screen {
  width: min(17rem, 78vw);
  margin: 0 auto;
  aspect-ratio: 1080 / 2400;
  border-radius: 2rem;
  border: 6px solid var(--ink);
  background: var(--ink);
  overflow: hidden;
  box-shadow: 0 24px 48px -20px rgba(26,23,18,.45);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone figcaption {
  margin-top: 1.35rem;
  font-family: var(--serif); font-weight: 550; font-size: 1.15rem;
}
.phone figcaption span {
  display: block; margin-top: .25rem;
  font-family: var(--text); font-weight: 400; font-style: italic;
  color: var(--ink-faint); font-size: 1rem;
}

/* ---------- CTA ---------- */
.get {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: clamp(4rem, 10vh, 6.5rem) clamp(1.25rem, 5vw, 4rem);
}
.get p { max-width: 34rem; margin: 1.25rem auto 2.25rem; color: var(--ink-soft); }
.get-note { display: block; margin-top: 1.1rem; font-style: italic; color: var(--ink-faint); font-size: 1rem; }

/* ---------- footer ---------- */
footer {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1.5rem; flex-wrap: wrap;
  max-width: 72rem; margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 4rem) 3rem;
}
.foot-tag { display: block; font-style: italic; color: var(--ink-faint); font-size: .95rem; }
.foot-links { display: flex; gap: 1.75rem; }
.foot-links a {
  color: var(--ink-soft); text-decoration: none; font-size: .98rem;
  border-bottom: 1px solid var(--line);
  transition: color .2s, border-color .2s;
}
.foot-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- section heading reveal ---------- */
main section > h2 { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
main section > h2.in { opacity: 1; transform: none; }
.hero h1 { opacity: 1; transform: none; } /* hero uses keyframes instead */

/* ---------- legal pages ---------- */
.legal {
  max-width: 42rem; margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4rem) clamp(1.25rem, 5vw, 2rem) 5rem;
}
.legal h1 {
  font-family: var(--serif); font-weight: 550;
  font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.02em;
  margin-bottom: .5rem;
}
.legal .updated { font-style: italic; color: var(--ink-faint); margin-bottom: 2.5rem; }
.legal h2 {
  font-family: var(--serif); font-weight: 550; font-size: 1.35rem;
  margin: 2.25rem 0 .75rem;
}
.legal p, .legal li { color: var(--ink-soft); margin-bottom: .85rem; }
.legal ul { padding-left: 1.4rem; }
.legal a { color: var(--accent); }
.legal strong { color: var(--ink); font-weight: 500; }

/* ---------- widget section ---------- */
.widget-promo .widget-figure {
  margin: 0; display: flex; justify-content: center;
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.widget-promo .widget-figure.in { opacity: 1; transform: none; }
.widget-shot {
  width: 100%; max-width: 26rem;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

/* ---------- narrow screens ---------- */
@media (max-width: 40rem) {
  .hero h1 br, .privacy h2 br { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kicker, .hero h1, .lede, .hero-actions { animation: none; }
  .entry-card, .trust-item, .phone, .widget-figure, main section > h2 { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
}
