/* Static no-JS landing surface (ADR-0005) — styled to match the app's dark
   editorial theme. The app is dark (--bg #14120f, --ink #f7f2e8, --accent
   #e8b96a); this fallback must render with the same tokens so a no-JS or
   pre-boot visitor sees readable cream-on-ebony rather than dark-on-dark.
   These values mirror src/index.css :root. */

/* The dark background must not depend on Vite's JS-injected app CSS: a no-JS
   visitor (or any first paint before the bundle's stylesheet applies) reads
   this page with its own scripts disabled, so the theme has to be fully
   self-contained here. The mounted app overrides body's background after it
   loads, so this cannot fight the app. */
html {
  background: #0e0d0b;
}

body {
  background:
    radial-gradient(80% 65% at 50% -10%, rgba(232, 185, 106, 0.12), transparent 58%),
    #0e0d0b;
  color: var(--ink, #f7f2e8);
}

/* Boot state: what a JavaScript visitor sees between first paint and the
   React app mounting (or on an error that leaves the app unrendered). The
   marketing copy, pricing, and sign-in form remain in the served HTML inside
   <main class="static-fallback"> for the no-JS/script-less contract
   (ADR-0005 M1/M3/M4); here they are visually hidden whenever scripting is
   available, and the boot state takes their place. Under @media
   (scripting: none) — a genuinely script-less browser or a crawler — the
   marketing surface is revealed and the boot state is suppressed, so a no-JS
   visitor still reads product, pricing, and a reachable form. */

.boot-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 1.5rem;
  color: var(--ink, #f7f2e8);
  font-family: "Instrument Sans", -apple-system, system-ui, sans-serif;
}

.boot-state-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent, #e8b96a);
  box-shadow: 0 0 24px rgba(232, 185, 106, 0.4);
  animation: boot-state-pulse 1.8s ease-in-out infinite;
}

.boot-state-wordmark {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 242, 232, 0.6);
}

@keyframes boot-state-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-state-mark {
    animation: none;
  }
}

.static-fallback {
  /* Hidden in JavaScript contexts: seen only by genuine no-JS browsers and
     crawlers (revealed under the @media (scripting: none) block at the end of
     this sheet, which must stay after this base rule to win the cascade).
     React replaces the whole #root on mount, so the marketing never flashes
     pre-boot. */
  display: none;
  box-sizing: border-box;
  max-width: 64rem;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem);
  color: var(--ink, #f7f2e8);
  font-family: "Instrument Sans", -apple-system, system-ui, sans-serif;
  line-height: 1.65;
}

.static-fallback h1,
.static-fallback h2 {
  font-family: "Newsreader", Georgia, serif;
  line-height: 1.05;
  color: var(--ink, #f7f2e8);
  font-weight: 400;
}

.static-fallback h1 {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 9vw, 6rem);
  letter-spacing: -0.05em;
}

.static-fallback h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.75rem;
}

.static-fallback p {
  max-width: 46rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: rgba(247, 242, 232, 0.85);
}

.static-fallback section {
  margin-top: 2.5rem;
}

.static-fallback-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.static-fallback-plans li {
  flex: 1 1 16rem;
  box-sizing: border-box;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.static-fallback-plans h3 {
  margin: 0 0 0.5rem;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink, #f7f2e8);
}

.static-fallback .static-fallback-price {
  font-weight: 700;
  color: var(--accent, #e8b96a);
}

.static-fallback-details {
  margin-top: 0.75rem;
}

.static-fallback-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(247, 242, 232, 0.8);
  cursor: pointer;
  min-height: 44px;
  list-style: none;
}

.static-fallback-details summary::-webkit-details-marker {
  display: none;
}

.static-fallback-details summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 120ms ease;
  font-size: 0.85rem;
}

.static-fallback-details[open] summary::before {
  transform: rotate(90deg);
}

.static-fallback-features {
  margin: 0.4rem 0 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(247, 242, 232, 0.78);
}

.static-fallback-features li {
  margin: 0.35rem 0;
}

.static-fallback-form {
  display: grid;
  grid-template-columns: auto minmax(0, 20rem) auto;
  gap: 0.75rem;
  align-items: center;
  max-width: 46rem;
  margin: 1rem 0;
}

.static-fallback-form label {
  font-size: 0.95rem;
  color: rgba(247, 242, 232, 0.85);
}

.static-fallback-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink, #f7f2e8);
  font: inherit;
}

.static-fallback-form input::placeholder {
  color: rgba(247, 242, 232, 0.45);
}

.static-fallback-form button {
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent, #e8b96a);
  border-radius: 8px;
  background: var(--accent, #e8b96a);
  color: #14120f;
  font: 600 1rem/1 "Instrument Sans", system-ui, sans-serif;
  cursor: pointer;
}

.static-fallback-form button:hover {
  background: #f4dcae;
  border-color: #f4dcae;
}

@media (max-width: 560px) {
  .static-fallback {
    padding: 1.5rem 1rem 2.5rem;
  }

  .static-fallback-form {
    grid-template-columns: 1fr;
  }
}

.static-fallback-note {
  font-size: 0.95rem;
  opacity: 0.75;
}

/* Script-less browsers and crawlers see the full landing surface; JavaScript
   contexts show the boot state instead. This block must stay at the end of
   the sheet so its reveal beats the base rule above on equal specificity. */
@media (scripting: none) {
  .boot-state {
    display: none;
  }

  .static-fallback {
    display: block;
  }
}
