/* ─────────────────────────────────────────────
   Young Serif
   ───────────────────────────────────────────── */
@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/young-serif-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/young-serif-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ─────────────────────────────────────────────
   Base
   ───────────────────────────────────────────── */
:root {
  --paper: #ece6da;
  --ink: #171512;
  --ink-60: rgba(23, 21, 18, 0.68);
  --ink-45: rgba(23, 21, 18, 0.62);
  --rule: rgba(23, 21, 18, 0.16);
  --pad: clamp(1.75rem, 5.5vw, 4.5rem);
  --frame-inset: clamp(0.7rem, 1.7vw, 1.25rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  padding: var(--pad);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1rem, 3vh, 2rem);
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% -25%, rgba(255, 252, 246, 0.55), transparent 62%),
    radial-gradient(115% 95% at 50% 118%, rgba(78, 64, 42, 0.14), transparent 58%),
    radial-gradient(90% 80% at 50% 50%, transparent 55%, rgba(23, 21, 18, 0.08) 100%);
}

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

/* ─────────────────────────────────────────────
   Backdrop
   ───────────────────────────────────────────── */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: url('assets/bronzeville-poster.jpg') center / cover no-repeat;
  opacity: 0.26;
  filter: grayscale(1) contrast(0.95) brightness(1.04);
  mix-blend-mode: multiply;
}

.backdrop-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (prefers-reduced-motion: reduce) {
  .backdrop-video {
    display: none;
  }
}

/* ─────────────────────────────────────────────
   Texture
   ───────────────────────────────────────────── */
.paper-grain {
  position: fixed;
  inset: -6vmax;
  z-index: 5;
  pointer-events: none;
  opacity: 0.24;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 170px 170px;
  animation: grain 0.9s steps(6) infinite;
  will-change: transform;
}

.frame {
  position: fixed;
  inset: var(--frame-inset);
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(23, 21, 18, 0.13);
}

/* ─────────────────────────────────────────────
   Header
   ───────────────────────────────────────────── */
.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  margin: 0;
  font-family: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1;
  letter-spacing: 0.005em;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-60);
  white-space: nowrap;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 3.2s ease-in-out infinite;
}

/* ─────────────────────────────────────────────
   Display
   ───────────────────────────────────────────── */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(1.5rem, 6vh, 4.5rem);
}

.display {
  width: 100%;
  margin: 0;
  font-family: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.7rem, 13.2vw, 15rem);
  line-height: 0.83;
  letter-spacing: -0.03em;
}

.display-line {
  display: block;
  white-space: nowrap;
}

.display-line--two {
  text-align: right;
  margin-top: 0.05em;
  color: var(--ink-60);
}

@supports (-webkit-text-stroke: 1px black) {
  .display-line--two {
    color: transparent;
    -webkit-text-stroke: clamp(1px, 0.12vw + 0.55px, 2.5px) var(--ink);
  }
}

/* ─────────────────────────────────────────────
   Details
   ───────────────────────────────────────────── */
.details {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 7vh, 5rem);
  padding-top: clamp(1.1rem, 2.5vh, 1.6rem);
  border-top: 1px solid var(--rule);
}

.lede {
  margin: 0;
  max-width: 34ch;
  font-family: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.5rem);
  line-height: 1.32;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.contact {
  flex-shrink: 0;
  text-align: right;
}

.label {
  margin: 0 0 0.55rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.email {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  padding-bottom: 0.18em;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
}

.arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}

.email:hover .arrow,
.email:focus-visible .arrow {
  transform: translate(2px, -2px);
}

.email:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
  border-bottom-color: transparent;
}

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
.bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.bottom p {
  margin: 0;
}

/* ─────────────────────────────────────────────
   Motion
   ───────────────────────────────────────────── */
@keyframes grain {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-3%, 2%, 0); }
  40% { transform: translate3d(2%, -4%, 0); }
  60% { transform: translate3d(-1%, 3%, 0); }
  80% { transform: translate3d(4%, 1%, 0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

@keyframes rise {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .top,
  .display-line,
  .details,
  .bottom {
    animation: rise 1.1s var(--ease) both;
  }

  .top { animation-delay: 0.05s; }
  .display-line--one { animation-delay: 0.15s; }
  .display-line--two { animation-delay: 0.25s; }
  .details { animation-delay: 0.4s; }
  .bottom { animation-delay: 0.55s; }
}

/* ─────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────── */
@media (max-width: 380px) {
  .top {
    gap: 0.5rem;
  }

  .wordmark {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .status {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .bottom {
    font-size: 0.6rem;
    letter-spacing: 0.13em;
  }
}

@media (max-width: 600px) {
  .details {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
  }

  .contact {
    text-align: left;
  }

  .bottom {
    justify-content: flex-start;
  }

  .bottom p:first-child {
    display: none;
  }
}

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

  .paper-grain {
    opacity: 0.18;
  }
}

@media (forced-colors: active) {
  .display-line--two {
    color: CanvasText;
    -webkit-text-stroke: 0;
  }

  .paper-grain,
  .frame {
    display: none;
  }
}
