/* AO3 Landing — archival literary aesthetic */
:root {
  --red: #990000;
  --red-deep: #6e0000;
  --red-soft: #b33a3a;
  --ink: #161616;
  --ink-muted: #4a4a4a;
  --paper: #fafafa;
  --paper-2: #f2f2f2;
  --line: rgba(153, 0, 0, 0.14);
  --white: #ffffff;
  --shadow-soft: 0 28px 64px rgba(0, 0, 0, 0.14);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Atmospheric paper grain + archival wash */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(153, 0, 0, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 15%, rgba(153, 0, 0, 0.05), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f7f7f7 50%, #fafafa 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(250, 250, 250, 0.86);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  color: var(--red);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.25s var(--ease);
}

.nav a:hover {
  color: var(--red);
}

.nav-cta {
  color: var(--white) !important;
  background: var(--red);
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease) !important;
}

.nav-cta:hover {
  background: var(--red-deep) !important;
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--red);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.45rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1.5px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--red);
  border-color: rgba(153, 0, 0, 0.35);
}

.btn-ghost:hover {
  border-color: var(--red);
  background: rgba(153, 0, 0, 0.05);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Typography helpers */
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.35rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-lead {
  margin: 0 0 2.5rem;
  max-width: 38rem;
  font-size: 1.125rem;
  color: var(--ink-muted);
}

.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem;
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* ========== HERO ========== */
.hero {
  --hero-pad: clamp(1.5rem, 5vw, 4rem);
  min-height: calc(100svh - var(--header-h));
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(300px, 500px);
  justify-content: center;
  align-items: center;
  column-gap: clamp(1.75rem, 4vw, 3.25rem);
  max-width: none;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem) var(--hero-pad);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      105deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.92) 36%,
      rgba(255, 255, 255, 0.4) 58%,
      transparent 72%
    ),
    radial-gradient(ellipse 55% 70% at 68% 45%, rgba(153, 0, 0, 0.1), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #f4f4f4 100%);
}

.hero::after {
  content: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  max-width: none;
}

.hero-brand {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-style: italic;
  font-weight: 500;
  color: var(--red-soft);
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 12vw, 8.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--red);
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 26rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.65;
  color: var(--ink-muted);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  padding-top: 0.5rem;
}

.phone-stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: min(68vh, 540px);
  margin: 0;
}

.phone {
  position: absolute;
  background: #111;
  object-fit: cover;
  object-position: top center;
}

.phone-main {
  width: 56%;
  height: 92%;
  right: 6%;
  top: 0;
  bottom: auto;
  z-index: 2;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  border: 3px solid #1c1c1c;
  animation: float-y 6.5s var(--ease) infinite;
}

.phone-side {
  width: 44%;
  height: 76%;
  left: 4%;
  right: auto;
  top: 7%;
  bottom: auto;
  z-index: 1;
  border-radius: 24px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.14);
  border: 3px solid #1c1c1c;
  animation: float-y 7.5s var(--ease) 0.8s infinite;
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (min-width: 1400px) {
  .hero {
    grid-template-columns: 480px 500px;
    column-gap: 3rem;
  }

  .phone-stage {
    max-width: 480px;
  }
}

/* ========== MISSION ========== */
.mission {
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.55) 20%, rgba(255, 255, 255, 0.7) 80%, transparent);
}

.belief {
  margin: 0 0 3rem;
  padding: 1.75rem 0 1.75rem 1.5rem;
  border-left: 3px solid var(--red);
  max-width: 36rem;
}

.belief p {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.belief cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.mission-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.mission-points li {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mission-points strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--red);
}

.mission-points span {
  color: var(--ink-muted);
  font-size: 1rem;
}

/* ========== STORY ========== */
.story {
  background:
    linear-gradient(105deg, rgba(153, 0, 0, 0.04) 0%, transparent 42%),
    var(--paper-2);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.story-text p {
  color: var(--ink-muted);
  margin: 0 0 1.15rem;
  max-width: 34rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(153, 0, 0, 0.22);
}

.timeline li {
  position: relative;
  padding: 0 0 2.25rem 1.75rem;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--paper-2);
}

.timeline time {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--red);
  line-height: 1.2;
}

.timeline h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.timeline p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-muted);
}

/* ========== FEATURES ========== */
.feature-showcase {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.feature-shot {
  margin: 0;
}

.feature-shot img {
  width: 100%;
  border-radius: 28px;
  border: 3px solid #2a2220;
  box-shadow: var(--shadow-soft);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.feature-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.feature-item h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
}

.feature-item p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 38rem;
}

/* ========== MILESTONES ========== */
.milestones {
  background:
    linear-gradient(160deg, var(--red-deep) 0%, var(--red) 55%, #a31818 100%);
  color: var(--white);
}

.milestones .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.milestones h2 {
  color: var(--white);
}

.milestones-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.milestones-copy p:not(.eyebrow) {
  margin: 0;
  max-width: 36rem;
  font-size: 1.12rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

.hugo-panel {
  text-align: center;
  padding: 2.5rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.hugo-year {
  margin: 0;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

.hugo-award {
  margin: 0.75rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
}

.hugo-cat {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.hugo-note {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ========== ENTER / CTA ========== */
.enter-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.enter-copy p:not(.eyebrow):not(.enter-note) {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  max-width: 34rem;
}

.enter-note {
  margin: 1.5rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
  opacity: 0.85;
}

.enter-visual {
  margin: 0;
  justify-self: center;
  max-width: 300px;
}

.enter-visual img {
  border-radius: 28px;
  border: 3px solid #2a2220;
  box-shadow: var(--shadow-soft);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem 3rem;
  background: rgba(255, 255, 255, 0.45);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--red);
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.site-footer p {
  margin: 0.35rem 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.footer-copy {
  margin-top: 1rem !important;
  opacity: 0.75;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .phone-main,
  .phone-side {
    animation: none;
  }
  .btn:hover {
    transform: none;
  }
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: auto;
    background:
      linear-gradient(180deg, transparent 40%, #fff 72%),
      radial-gradient(ellipse 80% 50% at 50% 18%, rgba(153, 0, 0, 0.1), transparent 60%),
      linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
  }

  .hero-copy {
    width: 100%;
    max-width: 36rem;
    padding: 2rem 0 2.5rem;
  }

  .hero-visual {
    display: none;
  }

  .mission-points {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .story-grid,
  .feature-showcase,
  .milestones-inner,
  .enter-grid {
    grid-template-columns: 1fr;
  }

  .feature-shot {
    max-width: 280px;
    margin: 0 auto;
  }

  .enter-visual {
    order: -1;
    max-width: 240px;
  }

  .hugo-panel {
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: rgba(250, 250, 250, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    border-bottom: none !important;
  }

  .hero h1 {
    font-size: clamp(4.5rem, 22vw, 6.5rem);
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (max-width: 420px) {
  .header-inner,
  .section,
  .hero {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
