/* Base reset and variables */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  color: #eae5db;
  background: #0b0a09;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root {
  --accent: #e5484d; /* crash red */
  --accent-2: #f59e0b; /* amber-500 */
  --text: #eae5db; /* warm paper on near-black */
  --muted: #a49c8f; /* warm muted */
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(234, 229, 219, 0.16);
  --container: 680px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 50;
}

.container {
  width: 100%;
  max-width: var(--container);
  padding: 0 24px;
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #000;
  color: #fff;
  border-radius: 8px;
}

/* Header / Nav */
/* header removed */

/* Cinematic title font */
.hero-title {
  font-family: "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: grid;
  gap: 2px;
}
.hero-title .line {
  display: block;
  position: relative;
  font-size: clamp(72px, 15vw, 168px);
  line-height: 0.88;
  color: transparent; /* real text stays for accessibility; halves render below */
  opacity: 0;
  transform: translateY(26px);
  animation: titleUp 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
/* Two copies of each line, split by a jagged "crack" (a la the CLOY logo) */
.hero-title .line::before,
.hero-title .line::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 2px 0 rgba(0, 0, 0, 0.55),
    0 3px 0 rgba(0, 0, 0, 0.5), 0 6px 14px rgba(0, 0, 0, 0.5);
}
/* Top half of the letters */
.hero-title .line::before {
  clip-path: polygon(
    0 0,
    100% 0,
    100% 72%,
    88% 67%,
    74% 75%,
    60% 68%,
    46% 76%,
    32% 68%,
    18% 75%,
    8% 69%,
    0 74%
  );
}
/* Bottom half, slipped slightly sideways */
.hero-title .line::after {
  transform: translateX(0.01em) translateY(0.012em);
  clip-path: polygon(
    0 74%,
    8% 69%,
    18% 75%,
    32% 68%,
    46% 76%,
    60% 68%,
    74% 75%,
    88% 67%,
    100% 72%,
    100% 100%,
    0 100%
  );
}
.hero-title .line:nth-child(1) {
  animation-delay: 150ms;
}
.hero-title .line:nth-child(2) {
  animation-delay: 320ms;
}
.hero-title .line:nth-child(3) {
  animation-delay: 490ms;
}
@keyframes titleUp {
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-sub {
  margin: 22px 0 0 0;
  color: var(--muted);
  font-style: italic;
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: titleUp 900ms cubic-bezier(0.22, 1, 0.36, 1) 900ms forwards;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
}
.nav-list {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.85;
}
.nav-list a[aria-current="true"],
.nav-list a:hover {
  color: var(--accent-2);
  opacity: 1;
}

/* Hero / Parallax */
.hero {
  position: relative;
  height: 90vh;
  min-height: 520px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.parallax {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.layer {
  position: fixed;
  inset: -10vh -10vw;
  will-change: transform;
  transform: translateZ(0);
  z-index: 0;
}
.layer-gradient {
  background: radial-gradient(1200px 600px at 50% 30%, #1f2937 0%, #0a0a0a 70%);
  z-index: 0;
}
.layer-grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.7;
  mix-blend-mode: screen;
  z-index: 2;
}
.layer-vignette {
  background: radial-gradient(
    80% 60% at 50% 40%,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.75) 100%
  );
  z-index: 0;
}
.layer-reel {
  display: grid;
  place-items: center;
  opacity: 0; /* hidden on the title screen */
  transition: opacity 900ms ease;
  z-index: 0;
}
.layer-reel.visible {
  opacity: 0.55; /* fades in after scrolling past the hero */
}

/* Ensure page content sits above fixed background layers */
.hero-inner,
.content,
.subscribe,
.site-footer {
  position: relative;
  z-index: 1;
}
.reel-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.reel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.06) brightness(0.85);
  opacity: 0;
  animation: reelFade var(--dur, 48s) linear infinite;
  animation-delay: calc(var(--i) * (var(--dur, 48s) / var(--count, 6)));
  /* Don't advance the slideshow while it's hidden, so it always
     starts from the first photo when it first comes into view */
  animation-play-state: paused;
}
.layer-reel.visible .reel-slide {
  animation-play-state: running;
}
@keyframes reelFade {
  0% {
    opacity: 0;
    transform: scale(1.02);
  }
  6% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  26% {
    opacity: 0;
    transform: scale(1.06);
  }
  100% {
    opacity: 0;
  }
}
.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text);
  padding: 0 24px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px 0;
}
.hero-title {
  font-weight: 800;
  font-size: clamp(40px, 8vw, 84px);
  line-height: 0.95;
  margin: 0 0 6px 0;
}
.tagline {
  color: var(--muted);
  margin: 0;
}
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--muted);
}
.scroll-hint .mouse {
  width: 22px;
  height: 32px;
  border-radius: 14px;
  border: 2px solid var(--muted);
  position: relative;
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: var(--muted);
  border-radius: 2px;
  animation: wheel 1.6s infinite ease-in-out;
}
.scroll-hint .arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  animation: arrow 1.6s infinite ease-in-out;
}
@keyframes wheel {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, 8px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}
@keyframes arrow {
  0%,
  100% {
    transform: translateY(0) rotate(45deg);
  }
  50% {
    transform: translateY(6px) rotate(45deg);
  }
}

.content {
  padding: 96px 0 32px 0;
}

.content h1 {
  font-family: "Bebas Neue", Impact, "Arial Narrow Bold", sans-serif;
  font-size: clamp(40px, 7vw, 64px);
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0 0 10px 0;
  color: var(--text);
}
.lede {
  font-size: clamp(17px, 2.4vw, 21px);
  font-style: italic;
  color: var(--muted);
  margin: 0 0 10px 0;
}
.meta {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 48px 0;
}
.entry {
  color: var(--text);
  font-size: clamp(18px, 2.2vw, 20px);
  line-height: 1.85;
}
.entry p {
  margin: 0 0 1.35em 0;
}
.dinkus {
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.6em;
  margin: 52px 0;
  user-select: none;
}
.entry .pull {
  font-size: clamp(24px, 4vw, 31px);
  font-style: italic;
  line-height: 1.35;
  margin: 40px 0;
  padding-left: 22px;
  border-left: 2px solid var(--accent);
}
.entry .pull strong {
  font-weight: 500;
}
.signature {
  font-style: italic;
  margin-top: 48px;
}
.footnote {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}
.entry-photo {
  margin: 28px 0;
}
.entry-photo img {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 8px;
}
.cta-group {
  display: inline-flex;
  gap: 12px;
}
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.btn.primary {
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  border: none;
  cursor: pointer;
}
.btn.ghost {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  border: 1px solid var(--card-border);
}
.btn:hover {
  transform: translateY(-2px);
}

/* Utility */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; /* added line */
}

/* Sections */
.section {
  position: relative;
  background: #0a0a0a;
  color: var(--text);
  padding: 56px 0 72px 0;
}
.section h2 {
  font-size: clamp(20px, 3.5vw, 28px);
  margin: 0 0 8px 0;
}
.section p {
  color: var(--muted);
}

.about .features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px;
}
.card h3 {
  margin-top: 0;
}

.features .feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
}
.features .feature-list li {
  color: var(--text);
}

/* Subscribe */
.subscribe {
  /* Long quiet gap after the essay before the invitation */
  padding: 22vh 0 96px 0;
}
.subscribe-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.subscribe-form input {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 9999px;
  padding: 12px 18px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 180ms ease, background 180ms ease;
}
.subscribe-form input::placeholder {
  color: var(--muted);
}
.subscribe-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
}
.subscribe-form .status {
  grid-column: 1 / -1;
  margin: 4px 2px 0 2px;
  color: var(--muted);
}
/* Compact, pill-style CTA */
.subscribe-form .btn {
  border-radius: 9999px;
  padding: 10px 14px;
}

/* Subscribe focus overlay */
.subscribe-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
  z-index: 10;
}
.subscribe-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Animate the existing inline form to center */
.subscribe.focused {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0; /* cancel the section gap so the form centers exactly */
  z-index: 11;
  pointer-events: none; /* allow backdrop clicks to pass through */
}
.subscribe.focused .container {
  width: min(92vw, 640px);
}
.subscribe.focused .subscribe-form {
  grid-template-columns: 1fr auto;
  transform: translateY(45vh) scale(0.96);
  opacity: 0;
  transition: transform 850ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 850ms cubic-bezier(0.22, 1, 0.36, 1);
}
.subscribe.focused.enter .subscribe-form {
  transform: translateY(0) scale(1.06);
  opacity: 1;
}

/* Re-enable pointer events on interactive children while focused */
.subscribe.focused .subscribe-form,
.subscribe.focused input,
.subscribe.focused button {
  pointer-events: auto;
}

/* Prevent background scroll when overlay is open */
body.modal-open {
  overflow: hidden;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.contact-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form input,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
}
.form-actions {
  grid-column: 1 / -1;
}

.site-footer {
  padding: 24px 0 48px 0;
  color: var(--muted);
  text-align: center;
  background: #0a0a0a;
}

/* Back to top */
/* remove back-to-top styles from previous design */

/* Reveal animations */
/* remove reveal animations from previous design */

/* Mobile */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-block;
  }
  nav {
    position: relative;
  }
  .nav-list {
    display: none;
  }

  .subscribe-form {
    grid-template-columns: 1fr;
  }
}

/* Mobile-only title bump */
@media (max-width: 600px) {
  .hero-title .line {
    font-size: clamp(76px, 22vw, 168px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
  .reel-tile {
    animation: none !important;
  }
  .hero-title .line,
  .hero-sub {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
