:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-solid: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --hairline: rgba(29, 29, 31, 0.12);
  --blue: #0071e3;
  --green: #1f8f5f;
  --rose: #c6456a;
  --gold: #b47a24;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --wide: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 20;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--rose));
  transform-origin: left center;
}

.site-video-bg {
  position: absolute;
  inset: -28px;
  z-index: 0;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  object-fit: cover;
  object-position: center center;
  opacity: 0.72;
  filter: blur(18px) saturate(1.16) contrast(1.04);
  transform: scale(1.03);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 247, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.nav-shell {
  width: min(100%, var(--wide));
  height: 48px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
}

.brand,
.nav-action,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  font-weight: 650;
}

.brand-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}

.nav-links {
  gap: 28px;
  color: rgba(29, 29, 31, 0.72);
}

.nav-links a,
.nav-action {
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.nav-links a:hover,
.nav-action:hover {
  color: var(--ink);
}

.nav-action {
  gap: 5px;
  color: var(--blue);
  font-weight: 600;
}

.story-hero {
  position: relative;
  min-height: min(760px, 74svh);
  overflow: hidden;
  display: grid;
  align-items: end;
  isolation: isolate;
  background: #d9d6ce;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(245, 245, 247, 0.88), rgba(245, 245, 247, 0.48) 48%, rgba(245, 245, 247, 0.24)),
    linear-gradient(0deg, rgba(245, 245, 247, 0.9), rgba(245, 245, 247, 0.08) 54%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(100%, var(--wide));
  margin: 0 auto;
  padding: 104px 22px 70px;
}

.eyebrow,
.intro-kicker,
.post-topline,
.timeline-item time {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 630px;
  margin: 26px 0 0;
  color: rgba(29, 29, 31, 0.78);
  font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1.42;
  font-weight: 500;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 30px;
  color: rgba(29, 29, 31, 0.66);
  font-size: 14px;
}

.hero-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-left: 18px;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.42);
}

.intro-band {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(18px) saturate(150%);
}

.intro-grid {
  width: min(100%, var(--wide));
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.intro-grid p:last-child {
  margin: 0;
  max-width: 820px;
  color: #3a3a3c;
  font-size: clamp(21px, 3.2vw, 38px);
  line-height: 1.16;
  font-weight: 700;
}

.section-wrap,
.moments-band {
  width: min(100%, var(--wide));
  margin: 0 auto;
  padding: 96px 22px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.section-heading h2,
.archive-heading h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.filter-bar {
  position: sticky;
  top: 58px;
  z-index: 4;
  width: max-content;
  max-width: 100%;
  margin-bottom: 28px;
  display: flex;
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.filter-pill {
  min-width: 84px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(29, 29, 31, 0.7);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.filter-pill:hover {
  color: var(--ink);
}

.filter-pill.active {
  background: var(--ink);
  color: #fff;
}

.filter-pill:focus-visible,
.text-link:focus-visible,
.nav-shell a:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.32);
  outline-offset: 3px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.post-card.is-hidden {
  display: none;
}

.feature-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.post-media {
  min-height: 230px;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.96), transparent 28%),
    linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(198, 69, 106, 0.2));
}

.feature-card .post-media {
  min-height: 100%;
}

.media-soft {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(245, 245, 247, 0.3)),
    url("assets/bestfriends-hero.png") center / cover;
}

.media-blue {
  background:
    radial-gradient(circle at 25% 22%, rgba(255, 255, 255, 0.88), transparent 24%),
    linear-gradient(140deg, rgba(0, 113, 227, 0.82), rgba(98, 168, 255, 0.46), rgba(245, 245, 247, 0.9));
}

.media-green {
  background:
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.78), transparent 25%),
    linear-gradient(145deg, rgba(31, 143, 95, 0.82), rgba(203, 230, 170, 0.58), rgba(245, 245, 247, 0.9));
}

.media-rose {
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.84), transparent 25%),
    linear-gradient(145deg, rgba(198, 69, 106, 0.78), rgba(247, 188, 154, 0.55), rgba(245, 245, 247, 0.9));
}

.post-copy {
  padding: 26px;
}

.post-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  color: rgba(29, 29, 31, 0.54);
}

.post-copy h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.04;
  letter-spacing: 0;
}

.post-card:not(.feature-card) .post-copy h3 {
  font-size: clamp(22px, 2.2vw, 30px);
}

.post-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.moments-band {
  width: 100%;
  max-width: none;
  padding-right: max(22px, calc((100vw - var(--wide)) / 2 + 22px));
  padding-left: max(22px, calc((100vw - var(--wide)) / 2 + 22px));
  background: #111113;
  color: #f5f5f7;
}

.moments-band .eyebrow,
.moments-band .section-heading {
  color: rgba(245, 245, 247, 0.66);
}

.moments-band h2 {
  color: #fff;
}

.moment-strip {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 0.8fr));
  gap: 16px;
}

.moment-tile {
  min-height: 360px;
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.moment-tile img,
.moment-visual {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.moment-tile.tall {
  grid-row: span 2;
}

.moment-visual {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.84), transparent 12%),
    linear-gradient(145deg, rgba(0, 113, 227, 0.62), rgba(245, 245, 247, 0.08));
}

.tone-sun .moment-visual {
  background:
    radial-gradient(circle at 52% 40%, rgba(255, 255, 255, 0.82), transparent 14%),
    linear-gradient(145deg, rgba(180, 122, 36, 0.72), rgba(255, 217, 122, 0.24));
}

.tone-ink .moment-visual {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.78), transparent 10%),
    linear-gradient(145deg, rgba(45, 53, 67, 0.98), rgba(0, 113, 227, 0.18));
}

.tone-mint .moment-visual {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.76), transparent 12%),
    linear-gradient(145deg, rgba(31, 143, 95, 0.74), rgba(245, 245, 247, 0.08));
}

.moment-tile figcaption {
  padding: 18px;
  color: rgba(245, 245, 247, 0.78);
  font-size: 14px;
}

.archive-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.archive-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.timeline {
  display: grid;
  border-top: 1px solid var(--hairline);
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 0.46fr) minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.timeline-item h3,
.timeline-item p {
  margin: 0;
}

.timeline-item h3 {
  font-size: 22px;
  line-height: 1.12;
}

.timeline-item p {
  color: var(--muted);
  font-size: 16px;
}

.site-footer {
  width: min(100%, var(--wide));
  margin: 0 auto;
  padding: 34px 22px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 14px;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .story-hero {
    min-height: 70svh;
  }

  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(245, 245, 247, 0.96), rgba(245, 245, 247, 0.28) 58%),
      linear-gradient(90deg, rgba(245, 245, 247, 0.72), rgba(245, 245, 247, 0.14));
  }

  .hero-copy {
    padding-top: 84px;
    padding-bottom: 52px;
  }

  .intro-grid,
  .archive-heading {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .feature-card .post-media {
    min-height: 280px;
  }

  .moment-strip {
    grid-template-columns: 1fr 1fr;
  }

  .moment-tile.tall {
    grid-column: span 2;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    padding: 0 16px;
  }

  .brand {
    max-width: 52%;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .story-hero {
    min-height: 68svh;
    align-items: center;
  }

  .site-video-bg {
    inset: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    opacity: 0.68;
    filter: blur(16px) saturate(1.12) contrast(1.03);
  }

  .hero-copy {
    padding: 72px 16px 44px;
  }

  .hero-copy h1 {
    font-size: clamp(43px, 15vw, 70px);
  }

  .hero-lede {
    font-size: 17px;
  }

  .hero-meta span:not(:last-child)::after {
    display: none;
  }

  .intro-grid,
  .section-wrap,
  .moments-band,
  .site-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .section-wrap,
  .moments-band {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .filter-bar {
    width: 100%;
    border-radius: 8px;
  }

  .filter-pill {
    flex: 1 0 auto;
    min-width: 76px;
  }

  .post-copy {
    padding: 22px;
  }

  .moment-strip {
    grid-template-columns: 1fr;
  }

  .moment-tile,
  .moment-tile.tall {
    grid-column: auto;
  }

  .site-footer {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
