/* ===================================================================
   APHERON — teaser site styles
   Tone: cozy-dread. Warm light in cold dark.
   Palette (3–5): near-black charcoal-blue base, cold steel greys,
   off-white foreground, single warm amber/ember accent.
   =================================================================== */

:root {
  /* Base / neutrals */
  --bg:        #0a0c10;  /* near-black charcoal blue */
  --bg-2:      #0d1016;  /* slightly raised panel */
  --bg-3:      #11151c;  /* cards */
  --line:      #1c222c;  /* hairline borders */
  --steel:     #6b7686;  /* cold steel grey (muted text) */
  --fg:        #d9dee6;  /* off-white foreground */
  --fg-dim:    #aab2bf;  /* secondary text */

  /* Accent — ember (used sparingly) */
  --ember:       #e89b3c;
  --ember-soft:  #f0b765;
  --ember-glow:  rgba(232, 155, 60, 0.35);

  --radius: 10px;
  --maxw: 1140px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 1100ms;
}

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

* { margin: 0; }

html.apheron {
  background-color: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

.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;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--ember);
  color: #1a1206;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  transition: top 200ms var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* Decorative overlays: film grain + vignette                          */
/* ------------------------------------------------------------------ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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)'/%3E%3C/svg%3E");
  animation: grain-shift 7s steps(6) infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 2%); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------------ */
/* Scroll reveal                                                       */
/* ------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.5em;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease),
              color 300ms var(--ease), transform 300ms var(--ease);
}

.btn--ember {
  background: var(--ember);
  color: #1a1206;
  box-shadow: 0 0 0 0 var(--ember-glow);
}
.btn--ember:hover {
  background: var(--ember-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -10px var(--ember-glow);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--fg-dim);
}
.btn--ghost:hover {
  border-color: var(--ember);
  color: var(--fg);
}

/* Header actions + ambient sound toggle */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.sound-toggle:hover {
  border-color: var(--ember);
  color: var(--fg);
}
.sound-toggle:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.sound-toggle__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.sound-toggle__bars span {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  transition: height 0.2s ease;
}
.sound-toggle.is-playing {
  color: var(--ember);
  border-color: var(--ember);
}
.sound-toggle.is-playing .sound-toggle__bars span {
  animation: sound-eq 1s ease-in-out infinite;
}
.sound-toggle.is-playing .sound-toggle__bars span:nth-child(2) {
  animation-delay: 0.2s;
}
.sound-toggle.is-playing .sound-toggle__bars span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes sound-eq {
  0%, 100% { height: 4px; }
  50%      { height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .sound-toggle.is-playing .sound-toggle__bars span {
    animation: none;
    height: 9px;
  }
}

.btn--steam {
  background: var(--bg-3);
  border-color: var(--line);
  color: var(--fg-dim);
}
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Ember dot — faint flicker/pulse */
.ember-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px 2px var(--ember-glow);
  animation: ember-flicker 3.6s var(--ease) infinite;
}
.ember-dot--lg { width: 14px; height: 14px; }

@keyframes ember-flicker {
  0%, 100% { opacity: 1;    box-shadow: 0 0 8px 2px var(--ember-glow); }
  45%      { opacity: 0.55; box-shadow: 0 0 4px 1px var(--ember-glow); }
  55%      { opacity: 0.9;  box-shadow: 0 0 10px 3px var(--ember-glow); }
  70%      { opacity: 0.4;  box-shadow: 0 0 3px 1px var(--ember-glow); }
}

/* ------------------------------------------------------------------ */
/* Shared typographic helpers                                          */
/* ------------------------------------------------------------------ */
.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ember);
}

.prose {
  font-size: 1.075rem;
  color: var(--fg-dim);
  max-width: 52ch;
}
.prose--muted { color: var(--steel); }

.section-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head__note {
  margin-top: 0.5rem;
  color: var(--steel);
  font-size: 0.98rem;
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(to bottom, rgba(10,12,16,0.85), rgba(10,12,16,0));
  backdrop-filter: blur(2px);
  transition: background-color 400ms var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10,12,16,0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.site-header__mark img {
  height: 26px;
  width: auto;
  opacity: 0.92;
  /* Drop the black background; desaturate so it reads as quiet menace. */
  mix-blend-mode: screen;
  filter: grayscale(0.4) brightness(1.1) contrast(1.05);
}
.site-header__cta { font-size: 0.85rem; padding: 0.55em 1.1em; }

/* ------------------------------------------------------------------ */
/* 1. Hero                                                             */
/* ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.25rem 5rem;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Grade the green/violet key art toward the ember mood */
  filter: saturate(0.55) brightness(0.6) contrast(1.05);
  transform: scale(1.04);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 75%, rgba(232,155,60,0.10), transparent 60%),
    linear-gradient(to bottom, rgba(10,12,16,0.55) 0%, rgba(10,12,16,0.35) 35%, rgba(10,12,16,0.85) 100%);
}
.hero__inner {
  position: relative;
  /* No z-index here: an explicit z-index would create an isolated stacking
     context and break the wordmark's screen blend against the key art.
     The absolutely-positioned bg/scrim come first in the DOM, so this
     in-flow content still paints above them. */
  max-width: 780px;
}
.hero__wordmark {
  width: min(760px, 90vw);
  height: auto;
  margin: 0 auto 1.75rem;
  /* The wordmark art is white/red on solid black — screen drops the black
     so the letters sit directly on the key art. */
  mix-blend-mode: screen;
  filter: grayscale(0.25) brightness(1.08) drop-shadow(0 0 30px rgba(0,0,0,0.6));
}
.hero__logline {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2.3rem);
  line-height: 1.25;
  color: var(--fg);
  margin: 0 auto;
  max-width: 22ch;
}
.hero__sub {
  margin-top: 1.5rem;
  color: var(--fg-dim);
  font-size: 0.98rem;
  letter-spacing: 0.04em;
}
.hero__actions { margin-top: 2rem; }

.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 48px;
}
.scroll-cue__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--ember));
  animation: cue-drift 2.4s var(--ease) infinite;
}
@keyframes cue-drift {
  0%   { opacity: 0; transform: translateY(-10px); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ------------------------------------------------------------------ */
/* 2. Pitch                                                            */
/* ------------------------------------------------------------------ */
.pitch {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 12vw, 8rem) clamp(1.25rem, 5vw, 3rem);
}
.pitch__media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  filter: saturate(0.7) brightness(0.85);
}
.pitch__body { display: flex; flex-direction: column; gap: 1.1rem; }
.pitch__body .prose { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }

/* ------------------------------------------------------------------ */
/* 3. Feature pillars                                                  */
/* ------------------------------------------------------------------ */
.pillars {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 8vw, 6rem);
}
.pillar {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}
.pillar__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.pillar__media::after {
  /* subtle ember vignette on imagery */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 100%, rgba(232,155,60,0.08), transparent 55%);
  pointer-events: none;
}
.pillar__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.82);
  transition: transform 1200ms var(--ease), filter 1200ms var(--ease);
}
.pillar:hover .pillar__media img {
  transform: scale(1.03);
  filter: saturate(0.85) brightness(0.92);
}
.pillar__title {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  margin-bottom: 0.6rem;
  color: var(--fg);
}

/* ------------------------------------------------------------------ */
/* 4. Gallery                                                          */
/* ------------------------------------------------------------------ */
.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 3rem);
}
.gallery__grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}
.gallery__item {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
  cursor: zoom-in;
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.65) brightness(0.78);
  transition: transform 900ms var(--ease), filter 900ms var(--ease);
}
.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.04);
  filter: saturate(0.85) brightness(0.95);
}

/* ------------------------------------------------------------------ */
/* 5. Trailer                                                          */
/* ------------------------------------------------------------------ */
.trailer {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 5vw, 3rem);
}
.trailer__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.trailer__frame iframe,
.trailer__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.trailer__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(232,155,60,0.06), transparent 70%),
    var(--bg-2);
}
.trailer__label {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--fg-dim);
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------------ */
/* 6. Wishlist band                                                    */
/* ------------------------------------------------------------------ */
.wishlist {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(232,155,60,0.07), transparent 60%),
    var(--bg-2);
  padding: clamp(4rem, 11vw, 8rem) clamp(1.25rem, 5vw, 3rem);
}
.wishlist__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.wishlist__title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin-bottom: 0.75rem;
}
.wishlist__sub {
  color: var(--fg-dim);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 auto 2.25rem;
}

.signup { margin: 0 auto; }
.signup__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}
.signup__input {
  flex: 1;
  padding: 0.9em 1.1em;
  font-family: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 300ms var(--ease);
}
.signup__input::placeholder { color: var(--steel); }
.signup__input:focus { border-color: var(--ember); outline: none; }
.signup__row .btn { justify-content: center; }

.signup__privacy {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--steel);
}
.signup__status {
  margin-top: 0.9rem;
  min-height: 1.2em;
  font-size: 0.92rem;
  color: var(--ember-soft);
}
.signup__status.is-error { color: #e07a5f; }

.wishlist__steam { margin-top: 2rem; }

/* ------------------------------------------------------------------ */
/* 7. Footer                                                           */
/* ------------------------------------------------------------------ */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 3rem) 3rem;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.site-footer__studio { color: var(--fg-dim); font-size: 1rem; }
.site-footer__studio strong { color: var(--fg); font-weight: 600; }
.site-footer__contact a {
  color: var(--ember);
  font-size: 0.95rem;
  transition: color 250ms var(--ease);
}
.site-footer__contact a:hover { color: var(--ember-soft); }

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.site-footer__social a {
  color: var(--steel);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: color 250ms var(--ease);
}
.site-footer__social a:hover { color: var(--fg); }

.site-footer__base {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1.75rem;
  color: var(--steel);
  font-size: 0.82rem;
}

/* ------------------------------------------------------------------ */
/* Lightbox                                                            */
/* ------------------------------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 4rem);
  background: rgba(6, 7, 10, 0.94);
  opacity: 0;
  transition: opacity 350ms var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure {
  max-width: 1100px;
  width: 100%;
  margin: 0;
  text-align: center;
}
.lightbox__img {
  width: 100%;
  max-height: 80svh;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.lightbox__caption {
  margin-top: 1rem;
  color: var(--fg-dim);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.1rem;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(17, 21, 28, 0.7);
  border: 1px solid var(--line);
  color: var(--fg);
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 250ms var(--ease), border-color 250ms var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--bg-3); border-color: var(--ember); }
.lightbox__close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 44px; height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 1.8rem;
  line-height: 1;
}
.lightbox__nav--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(0.5rem, 2vw, 1.5rem); }

/* ------------------------------------------------------------------ */
/* Responsive — tablet / desktop enhancements                          */
/* ------------------------------------------------------------------ */
@media (min-width: 720px) {
  .signup__row { flex-direction: row; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .pitch { grid-template-columns: 1.1fr 1fr; }

  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .site-footer__base { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 900px) {
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
  .pillar {
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
  }
  .pillar--reverse .pillar__media { order: 2; }
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html.apheron { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .grain { animation: none; }
  .scroll-cue__line { animation: none; opacity: 0.6; }
}
