/* ===========================================================================
   ELLINGTON — Chapter 1 landing
   Wordmark is the ee.png logo (black, transparent); Archivo sets the
   remaining labels. Background is the pixel-mosaic red/grey diagonal photo.
   =========================================================================== */

:root {
  /* surfaces */
  --grey:        #96908a;
  --grey-hi:     #9c968f;
  --grey-lo:     #8e8882;
  --red:         #971d22;
  --red-hi:      #a01f25;
  --red-lo:      #8b1a1f;

  /* ink — used on both surfaces, mirroring the mock's monochrome restraint */
  --ink:         #221e1b;
  --ink-soft:    rgba(34, 30, 27, 0.62);
  --ink-faint:   rgba(34, 30, 27, 0.34);
  --bone:        #efece6;

  /* one easing for everything that moves */
  --ease: cubic-bezier(0.16, 0.84, 0.32, 1);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--grey);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---- background layers ---------------------------------------------------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  /* the pixel-mosaic red/grey diagonal photograph; grey is the fallback fill.
     the mosaic is baked into the high-res source, so default smoothing renders
     it cleanest when it scales to full-bleed */
  background: var(--grey) url("landing-bg.jpg") center / cover no-repeat;
  pointer-events: none;
}

/* soft darkening toward the corners — keeps the flat fields from feeling digital */
.vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(125% 115% at 50% 42%, transparent 52%, rgba(18, 10, 8, 0.30) 100%);
  mix-blend-mode: multiply;
}

/* film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---- stage ---------------------------------------------------------------- */

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    clamp(2rem, 8vh, 5rem)
    clamp(1.4rem, 7vw, 4rem)
    max(clamp(1.5rem, 5vh, 3.25rem), env(safe-area-inset-bottom));
}

.stage__inner {
  width: min(620px, 100%);
  text-align: center;
  /* nudge the whole block a hair below dead-centre, like the mock */
  transform: translateY(min(2.5vh, 22px));
}

/* ---- wordmark ------------------------------------------------------------- */

.wordmark {
  margin: 0;
}

.wordmark__img {
  display: block;
  width: min(560px, 84vw);
  height: auto;
  margin: 0 auto;
  /* a soft light halo lifts the black mark off the darker red areas of the
     photo without reading as a hard glow */
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.35));
}

/* ---- signup (Klaviyo native embed) ---------------------------------------- */

/* just positions the embed under the wordmark; the form's own styling
   (fields, button, colors) is controlled inside Klaviyo's form builder */
.signup-embed {
  width: min(480px, 100%);
  margin: clamp(2.4rem, 6.5vh, 3.6rem) auto 0;
}

/* ---- short / landscape phones: tighten the vertical rhythm ---------------- */

@media (max-height: 520px) {
  .stage__inner { transform: none; }
  .wordmark__img { width: min(360px, 70vw); }
  .signup-embed { margin-top: clamp(1.1rem, 4vh, 1.9rem); }
}

/* ---- utility -------------------------------------------------------------- */

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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