/* Flamecrow Studio: Godward coming-soon page (Figma "B — Desktop" 9:158, "B — Mobile" 9:197). */

:root {
  --void: #0b0910;
  --void-80: rgba(11, 9, 16, 0.8);
  --bone: #ddd5c1;
  --bone-muted: #a39d8f;
  --text-muted: #a8a4b0; /* flamecrow/text-muted, used by the © line in Figma */
  --slate: #434a5e;
  --violet: #a585ff;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  background: var(--void);
  color: var(--bone);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

p { margin: 0; }
h1 { margin: 0; font-size: inherit; font-weight: inherit; }
img { display: block; }

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

/* ---------- Backdrop ---------- */

.backdrop {
  position: fixed;
  left: 0; top: 0;
  width: 100vw; height: 100vh; /* replaced by the exact window size from backdrop.js */
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* Static fallback when WebGL2 or the shaders are unavailable (or JS is off). */
.backdrop-still {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--void) url("/assets/backdrop-still.png") center / cover no-repeat;
  image-rendering: pixelated;
}
.no-webgl .backdrop-still { display: block; }
.no-webgl .backdrop { display: none; }

/* ---------- Page layout ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 64px 49px;
  padding-top: max(48px, env(safe-area-inset-top));
  padding-bottom: max(49px, env(safe-area-inset-bottom));
  overflow: hidden; /* keeps the soft scrims from widening the page */
  text-align: center;
}

/* Scrims: soft near-black gradients from the design, so text keeps its contrast. */
.page::before,
.page::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: -1;
}
.page::before { /* Scrim — top */
  top: 0;
  height: 170px;
  background: linear-gradient(to bottom, rgba(11, 9, 16, 0.5), rgba(11, 9, 16, 0));
}
.page::after { /* Scrim — bottom. Figma ends at 0.55; raised to 0.62 so the © line keeps
                    >= 4.5:1 on the brightest colour the moving backdrop can produce. */
  bottom: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(11, 9, 16, 0), rgba(11, 9, 16, 0.62));
}

.lockup {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: none;
}
.lockup-mark { width: 52px; height: 40px; }
.lockup-wordmark { width: 125px; height: 36px; }

.stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  flex: none;
}
.stack::before { /* Scrim — centre (1320 x 700 ellipse around the 1020 x 475 stack) */
  content: "";
  position: absolute;
  inset: -112px -150px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(11, 9, 16, 0.5) 0%, rgba(11, 9, 16, 0.3) 60%, rgba(11, 9, 16, 0) 100%);
}

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

/* GODWARD logo: one 340 x 63 pixel-art file, only ever at 1x, 2x or 3x. */
.godward img {
  width: 1020px;
  height: auto;
  aspect-ratio: 340 / 63;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
}

.tagline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -0.01em;
  color: var(--bone);
  text-wrap: balance;
}

/* COMING SOON row */
.soon {
  display: flex;
  align-items: center;
  gap: 20px;
}
.soon-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
}
.rule {
  position: relative;
  display: block;
  flex: none;
  width: 160px;
  height: 7px;
  margin-top: 1px;
  background: linear-gradient(var(--slate), var(--slate)) center / 100% 1px no-repeat;
}
.rule::before,
.rule::after {
  content: "";
  position: absolute;
  top: 0;
  width: 7px; height: 7px;
  background: var(--void);
  border: 1px solid var(--slate);
}
.rule::before { left: 0; }
.rule::after { right: 0; }
.diamond {
  display: block;
  flex: none;
  width: 8px; height: 8px;
  background: var(--violet);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---------- Waitlist ---------- */

.waitlist {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 560px;
  max-width: 100%;
}
.waitlist-form {
  display: flex;
  gap: 12px;
  width: 100%;
}
.waitlist-form[hidden] { display: none; }

.field {
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--bone-muted);
  border-radius: 0;
  background: var(--void-80);
  color: var(--bone);
  font: 400 16px/26px var(--sans);
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder { color: var(--bone-muted); opacity: 1; }
.field:hover { border-color: var(--bone); }
.field:focus { outline: none; }
.field:focus-visible,
.field:focus {
  border-color: var(--bone);
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}
.field[aria-invalid="true"] { border-color: var(--bone); }

/* Bone button with 8 px 45-degree chamfered corners (height fixed at 52). */
.button {
  position: relative;
  flex: none;
  height: 52px;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--void);
  font: 500 14px/20px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bone);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px),
                     calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.button:hover::before { background: #e9e2d1; }
.button:active::before { background: #cfc6b1; }
.button:focus { outline: none; }
.button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}
.button:disabled { cursor: progress; }
.button:disabled::before { background: var(--bone-muted); }

/* Honeypot: off-screen, never seen or reached by real users. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

.status:empty { display: none; }
.status {
  font: 400 16px/26px var(--sans);
  color: var(--bone);
}
/* Success: the form and supporting line keep their space (hidden), and the message is
   centred over the whole block, so nothing below it moves. */
.waitlist { position: relative; }
.waitlist.is-done .waitlist-form,
.waitlist.is-done .support { visibility: hidden; }
.status.is-success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.support {
  position: relative;
  max-width: 328px;
  font: 400 16px/26px var(--sans);
  color: var(--bone-muted);
}
/* Extra local scrim: the backdrop moves, so its brightest band can pass behind this line.
   Together with the centre scrim this keeps bone-muted at >= 4.5:1 on the brightest
   colour the backdrop can produce. Not in the Figma frame. */
.support::before {
  content: "";
  position: absolute;
  inset: -24px -64px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(11, 9, 16, 0.4) 0%, rgba(11, 9, 16, 0.4) 75%, rgba(11, 9, 16, 0) 100%);
}

.footer {
  flex: none;
}
.footer p {
  font: 500 12px/16px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Sizes ---------- */

/* Desktop on short screens: the logo drops to 2x so the page still fits without scrolling. */
@media (min-width: 1148px) and (max-height: 719px) {
  .godward img { width: 680px; }
}

/* In between: desktop layout, logo at 2x. */
@media (max-width: 1147px) {
  .page { padding-left: 40px; padding-right: 40px; }
  .godward img { width: 680px; }
}

/* Mobile layout (Figma "B — Mobile", 390 x 844). */
@media (max-width: 759px) {
  .page {
    gap: 24px;
    padding: 32px max(10px, min(24px, calc((100vw - 340px) / 2))) 33px;
    padding-top: max(32px, env(safe-area-inset-top));
    padding-bottom: max(33px, env(safe-area-inset-bottom));
  }
  .page::before {
    height: 140px;
    background: linear-gradient(to bottom, rgba(11, 9, 16, 0.55), rgba(11, 9, 16, 0));
  }
  .page::after { height: 124px; }

  .stack { gap: 32px; width: 100%; max-width: 420px; }
  .stack::before { inset: -95px -104px; } /* 550 x 560 ellipse around the 342 x 371 stack */
  .title { gap: 24px; width: 100%; }
  .godward img { width: 340px; }
  .tagline { font-size: 28px; line-height: 34px; }

  .soon { gap: 12px; }
  .rule { width: 44px; }

  .waitlist { width: 100%; }
  .waitlist-form { flex-direction: column; }
  .field { flex: none; width: 100%; }
  .button { width: 100%; }
  .support { max-width: none; }
}

/* Narrower than 340 + 2 x 10 px: no whole multiple of 340 CSS px fits, so the logo uses a
   whole multiple of 340 *device* pixels where the screen density allows it. */
@media (max-width: 359px) {
  .godward { width: 100%; display: flex; justify-content: center; }
  .godward img { width: 100%; max-width: 340px; }
}
@media (max-width: 359px) and (min-resolution: 2dppx) {
  .godward img { width: 170px; }      /* 340 device px at 2x */
}
@media (max-width: 359px) and (min-resolution: 3dppx) {
  .godward img { width: 226.667px; }  /* 680 device px at 3x */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
