/* ============================================================
   DORIS — The Film
   Palette / tokens
   ============================================================ */
:root {
  --void:        #060607;
  --void-2:      #0b0c0e;
  --bone:        #e8e4dc;
  --bone-dim:    #a49f96;
  --bone-faint:  #6d6a63;
  --blood:       #b81a24;
  --glitch-cyan: #38c6d4;
  --line:        rgba(232, 228, 220, 0.22);
  --line-soft:   rgba(232, 228, 220, 0.12);

  --f-title:   "Cormorant", "Cormorant Garamond", serif;
  --f-display: "Cormorant Garamond", "Times New Roman", serif;
  --f-body:    "EB Garamond", Georgia, serif;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.svg-defs { position: absolute; width: 0; height: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--glitch-cyan);
  outline-offset: 3px;
}

/* ============================================================
   Ambient FX layers
   ============================================================ */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

/* scanlines removed per direction — kept as a no-op hook */
.fx-scanlines { display: none; }

.fx-grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: screen;
}

/* glitch sweep removed per direction */
.fx-glitchbar { display: none; }

/* subtle vignette so edges fall to black like the mock */
.stage::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 39;
  background: radial-gradient(120% 90% at 60% 45%, transparent 55%, rgba(0,0,0,0.6) 100%);
}

/* ============================================================
   Stage / layout
   ============================================================ */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}

/* ---- Hero photograph (right side, fades into the void) ---- */
.hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 60%;
  z-index: 1;
  overflow: hidden;
}
.hero-media picture { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
/* base grade + edge fades */
.hero-base img {
  filter: grayscale(1) contrast(1.04) brightness(0.82);
  /* fade left edge (into content) and bottom (into signup) */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 34%),
    linear-gradient(to bottom, #000 68%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0, #000 34%),
    linear-gradient(to bottom, #000 68%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* reveal layer — masked to the upstairs window; surfaces as a DARK glitch */
.hero-reveal {
  opacity: 0;
  mix-blend-mode: normal;
  pointer-events: none;
  transition: opacity 0.3s ease;
  -webkit-mask-image: radial-gradient(var(--wrx, 60px) var(--wry, 80px) at var(--wx, 62%) var(--wy, 22%), #000 0 44%, transparent 88%);
  mask-image: radial-gradient(var(--wrx, 60px) var(--wry, 80px) at var(--wx, 62%) var(--wy, 22%), #000 0 44%, transparent 88%);
}
/* darkened, high-contrast copy — the window recedes into shadow, she stays stark */
.hero-reveal img { filter: grayscale(1) contrast(1.7) brightness(0.5); }

.hero-reveal.is-glitching {
  opacity: 0.96;
  animation: winTear 0.42s steps(1) 1;
}
.hero-reveal.is-holding {
  opacity: 0.94;
  animation: winFlicker 2.2s steps(1) infinite;
}
/* RGB split + deeper shadow while active */
.hero-reveal.is-glitching img,
.hero-reveal.is-holding img {
  filter: grayscale(1) contrast(1.85) brightness(0.46)
    drop-shadow(2px 0 rgba(184, 26, 36, 0.75))
    drop-shadow(-2px 0 rgba(56, 198, 212, 0.7));
}
/* stuttering horizontal tear */
@keyframes winTear {
  0%   { transform: translateX(0);    clip-path: inset(0 0 62% 0); opacity: 0.55; }
  22%  { transform: translateX(-3px); clip-path: inset(28% 0 34% 0); opacity: 0.96; }
  44%  { transform: translateX(3px);  clip-path: inset(56% 0 6% 0);  opacity: 0.9; }
  66%  { transform: translateX(-2px); clip-path: inset(8% 0 48% 0);  opacity: 0.96; }
  84%  { transform: translateX(1px);  clip-path: inset(0 0 0 0);     opacity: 0.8; }
  100% { transform: translateX(0);    clip-path: inset(0 0 0 0);     opacity: 0.94; }
}
/* held: mostly steady, with an occasional dark stutter */
@keyframes winFlicker {
  0%, 46%, 100% { transform: translateX(0);   clip-path: inset(0 0 0 0);     opacity: 0.9; }
  48%           { transform: translateX(-2px); clip-path: inset(36% 0 26% 0); opacity: 0.98; }
  51%           { transform: translateX(2px);  clip-path: inset(6% 0 40% 0);  opacity: 0.82; }
  54%           { transform: translateX(0);    clip-path: inset(0 0 0 0);     opacity: 0.9; }
}
/* invisible interactive area over the window */
.window-hotspot {
  position: absolute;
  left: var(--wx, 62%);
  top: var(--wy, 22%);
  width: var(--whw, 120px);
  height: var(--whh, 150px);
  transform: translate(-50%, -50%);
  background: none;
  border: 0;
  padding: 0;
  cursor: help;
  z-index: 3;
}
.window-hotspot:focus-visible { outline: 1px solid rgba(56, 198, 212, 0.55); }
/* faint chromatic ghost of the photo for the VHS feel */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(56,198,212,0.05), transparent 40%, rgba(184,26,36,0.06));
  mix-blend-mode: screen;
}

/* ============================================================
   Top navigation
   ============================================================ */
.topbar {
  position: relative;
  z-index: 20;
  padding: 26px clamp(20px, 4vw, 56px);
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px clamp(14px, 2.4vw, 40px);
}
.nav-links a {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(11px, 0.86vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--bone);
  text-shadow: -1px 0 var(--blood), 1px 0 var(--glitch-cyan);
}
.nav-invest { color: var(--bone); }

.nav-toggle {
  display: none;
  position: absolute;
  top: 22px;
  right: clamp(20px, 4vw, 56px);
  width: 40px; height: 34px;
  background: none; border: 0; cursor: pointer;
  padding: 8px 6px;
  z-index: 30;
}
.nav-toggle-line {
  display: block;
  height: 1.5px;
  background: var(--bone);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   Hero content (wordmark)
   ============================================================ */
.hero-content {
  position: relative;
  z-index: 10;
  align-self: center;
  padding: 0 clamp(20px, 4vw, 64px);
  max-width: 760px;
}

.wordmark {
  margin: 0;
  font-family: var(--f-title);
  font-weight: 700;
  font-size: clamp(3.6rem, 11.5vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: var(--bone);
  position: relative;
  filter: url(#distress);
  text-shadow:
    0 0 1px rgba(232,228,220,0.4),
    0 6px 40px rgba(0,0,0,0.8);
}
/* chromatic-aberration clones */
.wordmark::before,
.wordmark::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  filter: url(#distress);
  mix-blend-mode: screen;
}
.wordmark::before { color: var(--blood);       transform: translate(-2px, 1px); }
.wordmark::after  { color: var(--glitch-cyan);  transform: translate(2px, -1px); }
.wordmark span { position: relative; z-index: 1; }

.subtitle {
  margin: 0.6em 0 0;
  padding-left: 0.5em;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(0.9rem, 2.2vw, 1.5rem);
  letter-spacing: 0.62em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

/* tagline slot — kept minimal so replacement copy drops in cleanly */
.tagline {
  margin: 1.2em 0 0;
  padding-left: 0.55em;
  min-height: 1.4em;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.6vw, 1.9rem);
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--bone);
}
.tagline:empty { margin-top: 0.4em; }

.cta {
  display: inline-block;
  margin-top: 2.2em;
  padding: 1.05em 2.6em;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid var(--line);
  background: rgba(6,6,7,0.35);
  backdrop-filter: blur(2px);
  transition: border-color 0.3s ease, color 0.3s ease, letter-spacing 0.3s ease, box-shadow 0.3s ease;
}
.cta:hover,
.cta:focus-visible {
  border-color: var(--bone);
  letter-spacing: 0.34em;
  box-shadow: inset 0 0 0 1px rgba(232,228,220,0.15), 0 0 30px rgba(0,0,0,0.6);
  text-shadow: -1px 0 var(--blood), 1px 0 var(--glitch-cyan);
}

/* ============================================================
   Mailing list + social
   ============================================================ */
.signup {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 20px clamp(22px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.signup-label {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(0.72rem, 1.15vw, 0.95rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.signup-form {
  display: flex;
  gap: 0;
  width: min(680px, 92vw);
}
.hp { position: absolute; left: -9999px; }
.signup-input {
  flex: 1;
  min-width: 0;
  padding: 1em 1.2em;
  background: rgba(6,6,7,0.55);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.signup-input::placeholder { color: var(--bone-faint); font-style: italic; }
.signup-input:focus { outline: none; border-color: var(--bone-dim); }
.signup-btn {
  padding: 0 2.2em;
  background: rgba(6,6,7,0.55);
  border: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, letter-spacing 0.25s ease;
}
.signup-btn:hover,
.signup-btn:focus-visible {
  background: var(--bone);
  color: var(--void);
  letter-spacing: 0.3em;
}
.signup-status {
  margin: 0;
  min-height: 1.2em;
  font-family: var(--f-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--glitch-cyan);
}

.social {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  gap: 30px;
}
.social a {
  color: var(--bone-dim);
  display: inline-flex;
  transition: color 0.25s ease, transform 0.25s ease;
}
.social a:hover,
.social a:focus-visible { color: var(--bone); transform: translateY(-2px); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  /* stack: photo band, then wordmark, then signup — all in flow */
  .stage { display: flex; flex-direction: column; }

  /* photo gets its own bright band at the top, unobscured by the title */
  .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: 58vh;
    z-index: 1;
  }
  .hero-media img { object-position: 50% 26%; }
  .hero-base img {
    filter: grayscale(1) contrast(1.02) brightness(0.9);
    /* fade the lower portion into the black content area */
    -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 92%);
    mask-image: linear-gradient(to bottom, #000 52%, transparent 92%);
    -webkit-mask-composite: source-over;
    mask-composite: add;
  }

  /* nav floats over the top of the photo */
  .topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 14px clamp(16px, 4vw, 24px);
    z-index: 25;
  }
  .nav-toggle { display: block; top: 14px; }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    position: fixed;
    inset: 0;
    padding: 92px clamp(24px, 8vw, 56px);
    background: rgba(4,4,5,0.97);
    backdrop-filter: blur(4px);
    z-index: 25;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  }
  .nav-links a { font-size: 1rem; letter-spacing: 0.22em; }
  .nav.open .nav-links { transform: translateX(0); }
  .nav.open .nav-toggle-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.open .nav-toggle-line:nth-child(2) { transform: translateY(-6.5px) rotate(-45deg); }

  /* title + CTA on solid black, pulled up to overlap the photo's fade */
  .hero-content {
    text-align: center;
    margin: 0 auto;
    padding: 0 22px;
    margin-top: -11vh;
    position: relative;
    z-index: 10;
  }
  .wordmark { font-size: clamp(3.2rem, 17vw, 6rem); }
  .subtitle { padding-left: 0; letter-spacing: 0.5em; }
  .tagline { padding-left: 0; }
  .cta { margin-top: 1.8em; }

  .signup { margin-top: 12vh; padding-bottom: 40px; }
}

@media (max-width: 560px) {
  .signup-form { flex-direction: column; gap: 10px; }
  .signup-input { border-right: 1px solid var(--line); }
  .signup-btn { padding: 0.9em; }
  .social { gap: 24px; }
}

/* ============================================================
   Motion / accessibility preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .fx-grain,
  .fx-glitchbar { animation: none; }
  .fx-glitchbar { display: none; }
  /* keep the window reveal, but hold it steady (no tearing motion) */
  .hero-reveal.is-glitching,
  .hero-reveal.is-holding { animation: none; clip-path: none; transform: none; }
  * { transition-duration: 0.001ms !important; }
}
