:root {
  --cream: #F5F2EB;
  --crimson: #E1251B;
  --black: #0A0A0A;

  --font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, monospace;

  --pad-x: clamp(1.25rem, 3.5vw, 3.5rem);
  --pad-y: clamp(1.25rem, 3vh, 2.5rem);
}

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

html,
body {
  height: 100%;
  background-color: #090404;
  color: var(--cream);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

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

/* =========================================
   1. Full-Bleed Background & Vignette
   ========================================= */

.bg-phone {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background-image: url('Noir Rotary Phone in Smoky Red Light.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 28%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* =========================================
   Viewport Shell (100vh, Zero Scroll)
   ========================================= */

.viewport-shell {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  width: 100%;
  padding: var(--pad-y) var(--pad-x);
}

/* =========================================
   2. Top Header Bar
   ========================================= */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: block;
  width: 110px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-fallback {
  display: none;
  flex-direction: column;
  width: 110px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-transform: uppercase;
}

.brand-fallback sup {
  font-family: var(--font-sans);
  font-size: 0.42em;
  vertical-align: super;
  margin-left: 0.1em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--crimson);
  box-shadow: 0 0 10px var(--crimson);
  animation: blinkDot 1.3s ease-in-out infinite;
}

/* =========================================
   3. Centerpiece Construction & Loading UI
   ========================================= */

.center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-block: clamp(1rem, 4vh, 3rem);
  text-align: center;
  min-height: 0;
}

.main-headline {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
}

.phone-spacer {
  flex: 1;
  min-height: 80px;
}

.loading-module {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.progress-track {
  width: min(320px, 68vw);
  height: 3px;
  background-color: rgba(245, 242, 235, 0.18);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background-color: var(--crimson);
  box-shadow: 0 0 10px rgba(225, 37, 27, 0.75);
  transition: width 0.1s linear;
  animation: pulseBar 2.2s ease-in-out infinite;
}

.progress-percent {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cream);
  min-width: 3.2ch;
  text-align: right;
}

.loading-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.82);
  transition: opacity 0.3s ease;
}

.loading-status.is-fading {
  opacity: 0;
}

/* =========================================
   4. Bottom Bar
   ========================================= */

.bottom-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.micro-copy {
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 0.8vw, 0.76rem);
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.75);
}

.notify-form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(245, 242, 235, 0.4);
  background-color: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.input-group input {
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.7rem 0.95rem;
  width: clamp(190px, 20vw, 250px);
}

.input-group input::placeholder {
  color: rgba(245, 242, 235, 0.55);
}

.notify-btn {
  appearance: none;
  background-color: var(--cream);
  color: var(--black);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.notify-btn:hover {
  background-color: var(--crimson);
  color: var(--cream);
}

.notify-btn:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.form-success {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 0.72rem 1rem;
  border: 1px solid rgba(245, 242, 235, 0.4);
  background-color: rgba(0, 0, 0, 0.45);
}

/* =========================================
   Animations
   ========================================= */

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes pulseBar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

/* =========================================
   Mobile Responsiveness
   ========================================= */

@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .bottom-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.15rem;
  }

  .notify-form {
    width: 100%;
    align-items: center;
  }

  .input-group {
    width: 100%;
    max-width: 340px;
  }

  .input-group input {
    flex: 1;
    width: auto;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot,
  .progress-fill {
    animation: none;
  }
}
