/*
 * AWARENESS HERO — $100K design element
 *
 * A silent geolocation reveal that walks the visitor through three
 * choreographed typographic stages before they ever touch the form.
 *
 * Stage 1 (opener):     "If you're reading this... you have N days to respond."
 * Stage 2 (revelation): The state name in 144pt display serif + their actual statute.
 * Stage 3 (action):     A calm CTA materializes below.
 *
 * No external libraries. Sub-50KB. Accessible. prefers-reduced-motion handled.
 */

/* —————————————————————————————————————————————————————
   ROOT TOKENS — restrained, warm, editorial
   ————————————————————————————————————————————————————— */
:root {
  --awh-bg:        #1a1612;
  --awh-bg-2:      #221d18;
  --awh-ink:       #f5f0e8;
  --awh-ink-mute:  #a39888;
  --awh-ink-quiet: #6b6258;
  --awh-accent:    #c9a961;
  --awh-accent-soft: rgba(201, 169, 97, 0.12);

  --awh-serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --awh-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --awh-ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --awh-ease-soft: cubic-bezier(0.16, 0.7, 0.34, 1);
}

/* —————————————————————————————————————————————————————
   STAGE — full-bleed cinematic frame above the existing site
   ————————————————————————————————————————————————————— */
.awareness-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  background: var(--awh-bg);
  color: var(--awh-ink);
  font-family: var(--awh-serif);
  font-feature-settings: "ss01", "ss02", "kern";
  overflow: hidden;
  isolation: isolate;
}

/* Ambient light field. Pure CSS, animated, zero JS, GPU-cheap. */
.awareness-hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 28% 38%, rgba(201, 169, 97, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 72% 62%, rgba(201, 169, 97, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
  animation: awh-drift 24s var(--awh-ease) infinite alternate;
  z-index: 0;
  will-change: transform;
}

/* Subtle film grain via SVG turbulence. Adds analog warmth. */
.awareness-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  z-index: 1;
}

@keyframes awh-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -1.5%, 0) scale(1.06); }
}

/* —————————————————————————————————————————————————————
   STAGE STAGE — the centered content well
   ————————————————————————————————————————————————————— */
.awh-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 6vh 24px 8vh;
  text-align: center;
}

.awh-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6vh 24px 8vh;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 1.6s var(--awh-ease-soft),
    transform 1.6s var(--awh-ease-soft);
  pointer-events: none;
}

/* phase = opener: only frame-opener visible */
[data-phase="opener"] .awh-frame--opener {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* phase = revelation: frame-opener fades out, frame-revelation fades in */
[data-phase="revelation"] .awh-frame--opener {
  opacity: 0;
  transform: translateY(-12px);
}
[data-phase="revelation"] .awh-frame--revelation {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* phase = final: revelation persists, CTA materializes inside it */
[data-phase="final"] .awh-frame--opener {
  opacity: 0;
  transform: translateY(-12px);
}
[data-phase="final"] .awh-frame--revelation {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
[data-phase="final"] .awh-cta-shell {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* —————————————————————————————————————————————————————
   FRAME 1 — the opener
   ————————————————————————————————————————————————————— */
.awh-opener {
  max-width: 880px;
}

.awh-opener-line {
  font-family: var(--awh-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--awh-ink);
  margin: 0;
  font-variation-settings: "opsz" 60, "SOFT" 30;
}

.awh-opener-line + .awh-opener-line {
  margin-top: 18px;
}

.awh-opener-line .awh-days {
  font-style: normal;
  font-weight: 500;
  color: var(--awh-accent);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  padding: 0 6px;
}

/* —————————————————————————————————————————————————————
   FRAME 2 — the revelation
   ————————————————————————————————————————————————————— */
.awh-revelation {
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.awh-eyebrow {
  font-family: var(--awh-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--awh-ink-mute);
  margin: 0 0 18px;
  font-weight: 400;
}

.awh-state {
  font-family: var(--awh-serif);
  font-weight: 200;
  font-size: clamp(64px, 13vw, 168px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin: 0;
  color: var(--awh-ink);
  font-variation-settings: "opsz" 144, "SOFT" 0;
  /* tasteful entrance: scale up barely-perceptibly from 0.97 */
  transform: scale(0.97);
  transition: transform 2s var(--awh-ease-soft);
}
[data-phase="revelation"] .awh-state,
[data-phase="final"] .awh-state {
  transform: scale(1);
}

/* hairline divider — single horizontal accent stroke under the state name */
.awh-rule {
  width: 0;
  height: 1px;
  margin: 38px 0 32px;
  background: linear-gradient(to right, transparent, var(--awh-accent) 50%, transparent);
  transition: width 1.8s var(--awh-ease-soft) 0.4s;
}
[data-phase="revelation"] .awh-rule,
[data-phase="final"] .awh-rule {
  width: 240px;
}

.awh-cite {
  font-family: var(--awh-sans);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--awh-ink-mute);
  letter-spacing: 0.02em;
  margin: 0;
  max-width: 620px;
}

.awh-cite .awh-statute-num {
  color: var(--awh-accent);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.awh-promise {
  font-family: var(--awh-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--awh-ink);
  margin: 28px 0 0;
  max-width: 620px;
  font-variation-settings: "opsz" 36;
}

/* —————————————————————————————————————————————————————
   CTA shell — stays hidden until phase=final
   ————————————————————————————————————————————————————— */
.awh-cta-shell {
  margin-top: 56px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 1.4s var(--awh-ease-soft),
    transform 1.4s var(--awh-ease-soft);
}

.awh-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--awh-accent);
  color: var(--awh-bg);
  font-family: var(--awh-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 22px 44px;
  border: 1px solid var(--awh-accent);
  border-radius: 2px;
  cursor: pointer;
  transition:
    transform 0.4s var(--awh-ease),
    box-shadow 0.4s var(--awh-ease),
    background 0.4s var(--awh-ease);
  position: relative;
  overflow: hidden;
}

.awh-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.8s var(--awh-ease);
}

.awh-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(201, 169, 97, 0.25);
}

.awh-cta:hover::after {
  transform: translateX(100%);
}

.awh-cta:focus-visible {
  outline: 2px solid var(--awh-ink);
  outline-offset: 6px;
}

.awh-cta-arrow {
  display: inline-block;
  transition: transform 0.4s var(--awh-ease);
  font-size: 18px;
}

.awh-cta:hover .awh-cta-arrow {
  transform: translateX(4px);
}

.awh-cta-sub {
  display: block;
  margin-top: 18px;
  font-family: var(--awh-sans);
  font-size: 13px;
  color: var(--awh-ink-quiet);
  letter-spacing: 0.04em;
}

/* —————————————————————————————————————————————————————
   SCROLL HINT — single thin line that breathes
   ————————————————————————————————————————————————————— */
.awh-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--awh-accent), transparent);
  opacity: 0;
  transition: opacity 1.6s var(--awh-ease-soft) 1.2s;
  z-index: 3;
}
[data-phase="final"] .awh-scroll-hint {
  opacity: 0.6;
  animation: awh-breathe 2.8s ease-in-out infinite;
}

@keyframes awh-breathe {
  0%, 100% { transform: translateX(-50%) scaleY(1); opacity: 0.6; }
  50%      { transform: translateX(-50%) scaleY(1.4); opacity: 0.9; }
}

/* —————————————————————————————————————————————————————
   ACCESSIBILITY — reduced motion bypass
   When the user prefers reduced motion, skip the choreography entirely:
   show the revelation state immediately, with no animation.
   ————————————————————————————————————————————————————— */
@media (prefers-reduced-motion: reduce) {
  .awareness-hero::before { animation: none; }
  .awh-frame { transition: none; }
  .awh-state { transition: none; }
  .awh-rule { transition: none; }
  .awh-cta-shell { transition: none; }
  .awh-scroll-hint { animation: none; }

  .awh-frame--opener { display: none; }
  .awh-frame--revelation { opacity: 1; transform: none; pointer-events: auto; }
  .awh-state { transform: none; }
  .awh-rule { width: 240px; }
  .awh-cta-shell { opacity: 1; transform: none; }
}

/* —————————————————————————————————————————————————————
   MOBILE — preserve hierarchy, tighten spacing
   ————————————————————————————————————————————————————— */
@media (max-width: 640px) {
  .awh-stage { padding: 5vh 20px 6vh; }
  .awh-frame { padding: 5vh 20px 6vh; }
  .awh-state { font-size: clamp(56px, 18vw, 96px); }
  .awh-rule { margin: 28px 0 24px; }
  .awh-cta-shell { margin-top: 40px; }
  .awh-cta { padding: 18px 32px; font-size: 14px; }
}
