/* ==========================================================================
   Fellthorn Launch Site D, Round 4 — Ornamental Gold Banner Bar, Inputs & CTA
   Typography: Self-hosted PP Charlevoix (Regular 400 + Bold 700) for all copy
   and UI, plus Newsreader exclusively for input placeholders & Sign Up button.
   ========================================================================== */

@font-face {
  font-family: "PP Charlevoix";
  src: url("../assets/fonts/PPCharlevoix-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PP Charlevoix";
  src: url("../assets/fonts/PPCharlevoix-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-obsidian: #0a0a0a;

  /* Banner linen palette (#d7d2c6-ish) */
  --linen-top: #dbd6c9;
  --linen-mid: #d3cec1;
  --linen-low: #c6c0b2;
  --linen-tail: #bcb7aa;
  --banner-heading: #2d2823;
  --banner-body: #34312b;
  --banner-rule: rgba(45, 40, 35, 0.22);
  --banner-stitch: rgba(45, 40, 35, 0.18);

  /* Hero & charcoal form palette */
  --genre-grey: #abb3b6;
  --charcoal-bg: rgba(54, 58, 61, 0.86);
  --charcoal-solid: #363a3d;
  --gold-edge: rgba(188, 154, 68, 0.62);
  --gold-seam: rgba(188, 154, 68, 0.52);
  --form-lede: #d0c9bc;
  --form-label: #bcb7aa;
  --input-bg: #efebe2;
  --input-ink: #25221e;
  --input-placeholder: #6b665d;

  /* Magma accents & feedback */
  --magma: #d95b26;
  --magma-deep: #be4a1a;
  --magma-bright: #ef8345;
  --magma-diamond: #99411c;
  --magma-soft: rgba(217, 91, 38, 0.24);
  --danger: #eb8477;
  --ok: #88bda0;

  /* Font stacks */
  --f-sans: "PP Charlevoix", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-serif: "Newsreader", Georgia, serif;

  /* Structural dimensions */
  --banner-w: 760px;
  --col-gutter: 36px;
  --video-overhang: 52px;
  --chev-h: 135px;
  --panel-under-trailer: 164px;
  --cloth-bleed: 36px;
}

@media (max-width: 920px) {
  :root {
    --video-overhang: 24px;
    --chev-h: 108px;
    --panel-under-trailer: 138px;
  }
}

@media (max-width: 600px) {
  :root {
    --col-gutter: 48px;
    --video-overhang: 14px;
    --chev-h: 80px;
    --panel-under-trailer: 116px;
    --cloth-bleed: 18px;
  }
}

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

html {
  background: var(--bg-obsidian);
  color: var(--form-lede);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html.shot {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg-obsidian);
  color: var(--form-lede);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg, canvas {
  display: block;
  max-width: 100%;
}

img.px {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--magma-bright);
  outline-offset: 3px;
}

.sr-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 950;
  padding: 10px 16px;
  background: #141517;
  color: #fff;
  border: 1px solid var(--magma-bright);
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.96px;
  text-transform: uppercase;
}
.skip:focus {
  top: 14px;
}

.page-frame {
  position: relative;
  background: var(--bg-obsidian);
  overflow-x: clip;
}

/* ==========================================================================
   1. Hero Key Art (Lone Warrior, Ruined Tower & Planted Swords) + Genre Line
   ========================================================================== */

.hero-top {
  position: relative;
  width: 100%;
  height: clamp(300px, 25vw, 444px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px clamp(58px, 4.4vw, 76px);
  background: var(--bg-obsidian);
  overflow: hidden;
}

.hero-top__art {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-top__art picture,
.hero-top__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 84%;
}

@media (max-width: 720px) {
  .hero-top {
    height: 300px;
    padding-bottom: 52px;
  }
  .hero-top__art img {
    object-position: 50% 80%;
  }
}

.hero-top__ash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-top__fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.08) 0%,
      rgba(10, 10, 10, 0.04) 52%,
      rgba(10, 10, 10, 0.56) 78%,
      rgba(10, 10, 10, 0.95) 94%,
      var(--bg-obsidian) 100%
    );
  pointer-events: none;
}

.hero-top__genre {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--f-sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--genre-grey);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.88), 0 1px 3px rgba(0, 0, 0, 0.9);
}

@media (max-width: 600px) {
  .hero-top__genre {
    font-size: 13px;
    letter-spacing: 0.72px;
  }
}

/* ==========================================================================
   2. Central Column: Overlapping Magma Wordmark + Hanging Beige Cloth Banner
   ========================================================================== */

.central-column {
  position: relative;
  z-index: 4;
  margin-top: -34px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 600px) {
  .central-column {
    margin-top: -24px;
  }
}

.hero-wordmark {
  position: relative;
  z-index: 7;
  margin: 0 0 calc(-0.46 * var(--wm-h, 209px));
  font-size: 0;
  line-height: 0;
  pointer-events: none;
}

/* Soft, smooth, unbanded ambient cushion behind the stone wordmark plate */
.hero-wordmark__ambient {
  position: absolute;
  inset: 8% -4% -28% -4%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(
    ellipse 58% 54% at 50% 52%,
    rgba(10, 8, 6, 0.26) 0%,
    rgba(10, 8, 6, 0.17) 36%,
    rgba(10, 8, 6, 0.07) 68%,
    rgba(10, 8, 6, 0) 100%
  );
  filter: blur(28px);
  pointer-events: none;
}

.hero__mark {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--wm-w, min(628px, calc(100vw - 44px)));
  aspect-ratio: 3 / 1;
  margin-inline: auto;
  filter: drop-shadow(0 18px 36px rgba(10, 8, 6, 0.30));
}

.hero__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.hero__mark canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__mark--live img {
  opacity: 0;
}

/* Hanging Beige Cloth Banner */
.cloth-banner {
  position: relative;
  z-index: 4;
  width: min(var(--banner-w), calc(100% - var(--col-gutter)));
  color: var(--banner-body);
}

/* Gold Ornamental Hanging Bar across the top of the pinned banner (below wordmark plate) */
.banner-rod {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: 100%;
  height: 24px;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

@media (max-width: 640px) {
  .banner-rod__hanger {
    display: none;
  }
  .banner-rod__finial {
    transform: scale(0.60, 0.80);
  }
}

/* Static CSS Linen Banner Fallback (shown before WebGL, under reduced-motion, or when WebGL unavailable) */
.cloth-banner__static {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.09) 0px,
      rgba(255, 255, 255, 0.09) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(52, 46, 38, 0.03) 0px,
      rgba(52, 46, 38, 0.03) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(
      180deg,
      var(--linen-top) 0%,
      var(--linen-mid) 48%,
      var(--linen-low) 100%
    );
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--chev-h)),
    50% 100%,
    0 calc(100% - var(--chev-h))
  );
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.62));
  transition: opacity 0.24s ease;
}

/* Inset stitched border inside static fallback */
.cloth-banner__static::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 9px;
  right: 9px;
  bottom: calc(var(--chev-h) + 2px);
  border-top: 1px dashed var(--banner-stitch);
  border-left: 1px dashed var(--banner-stitch);
  border-right: 1px dashed var(--banner-stitch);
}

.cloth-banner.is-cloth-live .cloth-banner__static {
  opacity: 0;
}

/* Three.js WebGL Canvas with bleed room for cursor push & idle sway */
.cloth-banner__canvas {
  position: absolute;
  top: -8px;
  left: calc(-1 * var(--cloth-bleed));
  width: calc(100% + 2 * var(--cloth-bleed));
  height: calc(100% + 8px + var(--cloth-bleed));
  max-width: none;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cloth-banner.is-cloth-live .cloth-banner__canvas {
  opacity: 1;
}

/* Upper Banner Content */
.cloth-banner__upper {
  position: relative;
  z-index: 2;
  padding: clamp(86px, 8vw, 120px) clamp(20px, 5vw, 56px) clamp(24px, 2.4vw, 32px);
  text-align: center;
}

@media (max-width: 600px) {
  .cloth-banner__upper {
    padding: 72px 18px 22px;
  }
}

.diamond-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(198px, 68%);
  margin: 0 auto 28px;
  color: var(--magma-diamond);
}

.diamond-rule--bottom {
  margin: 28px auto 0;
}

@media (max-width: 600px) {
  .diamond-rule {
    margin-bottom: 20px;
  }
  .diamond-rule--bottom {
    margin-top: 20px;
  }
}

.diamond-rule i {
  flex: 1;
  height: 1px;
  background: var(--banner-rule);
}

.diamond-rule svg {
  flex: none;
  width: 7px;
  height: 7px;
}

.banner-heading {
  margin: 0 auto 20px;
  max-width: 560px;
  font-family: var(--f-sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--banner-heading);
}

@media (max-width: 600px) {
  .banner-heading {
    font-size: 15px;
    letter-spacing: 0.72px;
    margin-bottom: 14px;
  }
}

.banner-prose {
  max-width: 526px;
  margin: 0 auto;
}

.banner-prose p {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 24px;
  color: var(--banner-body);
}

.banner-prose p + p {
  margin-top: 16px;
}

@media (max-width: 600px) {
  .banner-prose p {
    font-size: 15px;
    line-height: 22px;
  }
  .banner-prose p + p {
    margin-top: 13px;
  }
}

/* ==========================================================================
   3. Overlapping Wider Trailer Video (Ornate Gold Frame + Autoplay / Unmute)
   ========================================================================== */

.trailer-breakout {
  position: relative;
  z-index: 5;
  width: calc(100% + 2 * var(--video-overhang));
  margin-left: calc(-1 * var(--video-overhang));
}

.film {
  margin: 0;
}

.banner-frame {
  position: relative;
  padding: 4px;
  background: #13100c;
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.58),
    0 6px 15px rgba(0, 0, 0, 0.40),
    0 0 0 1px rgba(24, 18, 12, 0.50);
}

.trailer-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

.theater {
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 9;
  background: #080706;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.theater video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theater__poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.theater.is-live .theater__poster {
  opacity: 0;
  pointer-events: none;
}

.theater.is-reduced-waiting .theater__poster {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.theater__poster picture,
.theater__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theater__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 92% 88%,
      rgba(8, 7, 6, 0.44) 0%,
      rgba(8, 7, 6, 0.16) 22%,
      transparent 52%
    );
  pointer-events: none;
}

/* Ornamental Gold Unmute / Mute / Reduced-Motion Play Medallion */
.trailer-medallion {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  filter:
    drop-shadow(0 5px 12px rgba(0, 0, 0, 0.80))
    drop-shadow(0 1px 3px rgba(0, 0, 0, 0.88));
  transition:
    transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.18s ease;
}

.trailer-medallion::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
}

@media (max-width: 600px) {
  .trailer-medallion {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}

.trailer-medallion__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Medallion glyph states: muted (crossed-out speaker), unmuted (speaker + waves), play (reduced-motion) */
.trailer-medallion[data-state="muted"] .med-glyph--play,
.trailer-medallion[data-state="unmuted"] .med-glyph--play {
  display: none;
}

.trailer-medallion[data-state="muted"] .med-waves {
  opacity: 0.28;
}

.trailer-medallion[data-state="muted"] .med-wave-outer {
  opacity: 0;
}

.trailer-medallion[data-state="muted"] .med-ember {
  opacity: 0.72;
}

.trailer-medallion[data-state="unmuted"] .med-slash {
  display: none;
}

.trailer-medallion[data-state="unmuted"] .med-waves,
.trailer-medallion[data-state="unmuted"] .med-wave-outer {
  opacity: 1;
}

.trailer-medallion[data-state="unmuted"] .med-ember {
  fill: #f0833c;
  opacity: 1;
}

.trailer-medallion[data-state="play"] .med-glyph--speaker {
  display: none;
}

.trailer-medallion[data-state="play"] .med-glyph--play {
  display: block;
}

.trailer-medallion[data-state="play"] .med-ember {
  fill: #ea7b35;
  opacity: 0.94;
}

/* Hover, pressed, and visible keyboard-focus states */
.trailer-medallion:hover {
  transform: translateY(-1px) scale(1.06);
  filter:
    brightness(1.10)
    drop-shadow(0 7px 15px rgba(0, 0, 0, 0.86))
    drop-shadow(0 0 10px rgba(238, 152, 70, 0.44));
}

.trailer-medallion:hover .med-ember {
  fill: #ffa057;
  opacity: 1;
}

.trailer-medallion:active {
  transform: translateY(1px) scale(0.94);
  filter:
    brightness(0.92)
    drop-shadow(0 2px 5px rgba(0, 0, 0, 0.90));
  transition-duration: 0.06s;
}

.trailer-medallion:focus-visible {
  outline: 2px solid #f6e1aa;
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(13, 11, 9, 0.92),
    0 0 0 6px rgba(239, 131, 69, 0.92);
}

@media (prefers-reduced-motion: reduce) {
  .theater__poster {
    transition: none;
  }
  .trailer-medallion {
    transition: filter 0.15s ease;
  }
  .trailer-medallion:hover {
    transform: none;
  }
  .trailer-medallion:active {
    transform: scale(0.96);
  }
}

.theater.has-error .trailer-medallion {
  display: none;
}

.film__error {
  margin: 10px auto 0;
  max-width: 92%;
  padding: 10px 14px;
  background: #2b1311;
  border: 1px solid var(--danger);
  color: #ffdcd6;
  font-family: var(--f-sans);
  font-size: 14px;
  text-align: center;
}

.film__error button {
  margin-left: 8px;
  padding: 4px 10px;
  background: none;
  color: #fff;
  border: 1px solid currentColor;
  font-family: var(--f-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ==========================================================================
   4a. Lower Banner: "JOIN THE PLAYTEST" + Downward Chevron Tail
   ========================================================================== */

.cloth-banner__lower {
  position: relative;
  z-index: 2;
  padding-top: clamp(38px, 3.8vw, 58px);
  text-align: center;
  pointer-events: none;
}

.playtest-heading {
  margin: 0 0 3px;
  padding: 0 20px;
  font-family: var(--f-sans);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--banner-heading);
}

@media (max-width: 600px) {
  .playtest-heading {
    font-size: 19px;
    letter-spacing: 0.76px;
    margin-bottom: 2px;
  }
}

.chevron-tail {
  height: var(--chev-h);
  padding: 0 24px 0;
}

.playtest-sub {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 22px;
  color: var(--banner-body);
}

@media (max-width: 600px) {
  .chevron-tail {
    height: calc(var(--chev-h) + 14px);
    padding-top: 0;
  }
  .playtest-sub {
    font-size: 14.5px;
    line-height: 19px;
  }
}

/* ==========================================================================
   4b. Dark Charcoal Form Panel (BEHIND cloth banner & continuing up behind trailer)
   ========================================================================== */

.form-panel {
  position: relative;
  z-index: 3;
  width: calc(min(var(--banner-w), 100% - var(--col-gutter)) - 4px);
  margin-top: calc(-1 * (var(--chev-h) + var(--panel-under-trailer)));
  padding: calc(var(--chev-h) + var(--panel-under-trailer) + 34px) clamp(20px, 6vw, 98px) clamp(38px, 4vw, 52px);
  background: var(--charcoal-bg);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-top: 0;
  border-left: 1px solid var(--gold-edge);
  border-right: 1px solid var(--gold-edge);
  border-bottom: 1px solid var(--gold-edge);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.68);
}

@media (max-width: 600px) {
  .form-panel {
    padding: calc(var(--chev-h) + var(--panel-under-trailer) + 24px) 18px 34px;
  }
}

.signup__form[hidden],
.signup__done[hidden] {
  display: none !important;
}

.form-panel__lede {
  margin: 0 auto 28px;
  font-family: var(--f-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 24px;
  color: var(--form-lede);
  text-align: center;
}

@media (max-width: 600px) {
  .form-panel__lede {
    font-size: 15px;
    line-height: 22px;
    margin-bottom: 22px;
  }
}

.form-stack {
  max-width: 558px;
  margin: 0 auto;
  text-align: left;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--form-label);
}

@media (max-width: 600px) {
  .field {
    margin-bottom: 15px;
  }
  .field label {
    font-size: 15px;
  }
}

.field .req,
.field .opt {
  color: var(--form-label);
  font-weight: 400;
}

/* Ornamental Gold Input & Select Wrapper (thin antique-gold border + small corners) */
.input-ornate {
  position: relative;
  background: var(--input-bg);
  box-shadow:
    0 3px 9px rgba(0, 0, 0, 0.28),
    inset 0 1px 2px rgba(24, 18, 10, 0.08);
  transition:
    background-color 0.18s ease,
    box-shadow 0.2s ease;
}

.input-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
  transition: filter 0.2s ease;
}

.field input,
.field select {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--input-ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.35;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

/* Input placeholders & unselected select dropdowns in Newsreader (as mockup) */
.field input::placeholder {
  font-family: var(--f-serif);
  font-weight: 400;
  color: var(--input-placeholder);
  opacity: 1;
}

.field select[data-empty="true"] {
  font-family: var(--f-serif);
  font-weight: 400;
  color: var(--input-placeholder);
}

.input-ornate:hover .input-frame {
  filter: brightness(1.07);
}

/* Warm golden-hearth focus glow */
.input-ornate:focus-within {
  background: #f8f4ec;
  box-shadow:
    0 0 0 1px rgba(247, 218, 144, 0.68),
    0 0 15px rgba(240, 178, 78, 0.50),
    0 0 30px rgba(219, 102, 40, 0.28),
    inset 0 0 10px rgba(245, 196, 108, 0.18);
}

.input-ornate:focus-within .input-frame {
  filter: brightness(1.13) drop-shadow(0 0 4px rgba(244, 186, 86, 0.50));
}

.input-ornate:focus-within .if-rail-hi,
.input-ornate:focus-within .if-rail-side,
.input-ornate:focus-within .if-rail-lo {
  stroke: #f6df9e;
}

.field.is-bad .input-ornate {
  box-shadow:
    0 0 0 1px rgba(224, 99, 82, 0.85),
    0 0 12px rgba(214, 85, 69, 0.34);
}

.field.is-bad .if-rail-hi,
.field.is-bad .if-rail-side,
.field.is-bad .if-rail-lo {
  stroke: #df6956;
}

.field.is-ok .if-rail-hi,
.field.is-ok .if-rail-side {
  stroke: #ecd08b;
}

.select {
  position: relative;
}

.select__arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 2;
  width: 12px;
  height: 10px;
  transform: translateY(-50%);
  pointer-events: none;
  transition: transform 0.18s ease;
}

.select:focus-within .select__arrow {
  transform: translateY(-42%);
}

.select select {
  padding-right: 38px;
  cursor: pointer;
}

.select select option {
  font-family: var(--f-sans);
  background: var(--input-bg);
  color: var(--input-ink);
}

.field__err {
  min-height: 1.35em;
  margin: 5px 0 0;
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.35;
  color: var(--danger);
}

.field__err:empty {
  min-height: 0;
  margin: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Consent Checkbox (required by form contract, styled with matching antique-gold rim) */
.check {
  position: relative;
  margin: 6px 0 4px;
}

.check input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.42;
  color: var(--form-label);
}

.check__box {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  background: var(--input-bg);
  border: 1px solid #b89044;
  box-shadow: inset 0 0 0 1px rgba(68, 48, 18, 0.48), 0 2px 5px rgba(0, 0, 0, 0.25);
  color: transparent;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.check__box svg {
  width: 11px;
  height: 11px;
}

.check input:checked + label .check__box {
  background: linear-gradient(180deg, #e2642b 0%, var(--magma) 55%, #b44014 100%);
  border-color: #eed394;
  box-shadow: inset 0 0 0 1px rgba(36, 17, 8, 0.65), 0 0 10px rgba(226, 108, 46, 0.36);
  color: #fffaf0;
}

.check input:focus-visible + label .check__box {
  outline: none;
  border-color: #f6df9e;
  box-shadow:
    0 0 0 1px rgba(247, 218, 144, 0.72),
    0 0 12px rgba(240, 178, 78, 0.52),
    0 0 22px rgba(219, 102, 40, 0.28);
}

.check.is-bad .check__box {
  border-color: #df6956;
  box-shadow: 0 0 0 2px rgba(214, 85, 69, 0.28);
}

/* Ornamental Gold & Molten Magma "SIGN UP" Button (Newsreader, as mockup) */
.signup__actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.btn {
  position: relative;
  min-width: 206px;
  min-height: 50px;
  padding: 12px 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: none;
  border: 0;
  color: #fffaf0;
  font-family: var(--f-serif);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(28, 9, 3, 0.80);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.46),
    0 2px 6px rgba(0, 0, 0, 0.56);
  transition:
    transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease,
    color 0.16s ease;
}

.btn__fill {
  position: absolute;
  inset: 2px;
  z-index: 1;
  background:
    radial-gradient(ellipse 78% 68% at 50% 14%, rgba(255, 198, 124, 0.34) 0%, rgba(255, 140, 66, 0) 72%),
    linear-gradient(180deg, #e5682f 0%, #cf4f1d 50%, #ad3911 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 180, 0.32),
    inset 0 -2px 4px rgba(34, 9, 3, 0.54);
  transition: background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
  transition: filter 0.18s ease;
}

.signup__label,
.signup__spin {
  position: relative;
  z-index: 3;
}

.btn:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 13px 28px rgba(0, 0, 0, 0.54),
    0 0 18px rgba(239, 126, 58, 0.46),
    0 0 6px rgba(244, 206, 126, 0.32);
}

.btn:hover .btn__fill {
  background:
    radial-gradient(ellipse 84% 74% at 50% 12%, rgba(255, 214, 144, 0.44) 0%, rgba(255, 148, 72, 0) 74%),
    linear-gradient(180deg, #ef783b 0%, #de5b25 50%, #bd4216 100%);
}

.btn:hover .btn-frame {
  filter: brightness(1.10) drop-shadow(0 0 5px rgba(244, 188, 90, 0.40));
}

.btn:active {
  color: #f6ede0;
  transform: translateY(1px) scale(0.985);
  box-shadow:
    0 3px 9px rgba(0, 0, 0, 0.64),
    0 0 8px rgba(217, 91, 38, 0.26);
  transition-duration: 0.06s;
}

.btn:active .btn__fill {
  background:
    linear-gradient(180deg, #c14819 0%, #a83810 52%, #8a2a0b 100%);
  box-shadow:
    inset 0 3px 7px rgba(24, 7, 2, 0.64),
    inset 0 -1px 0 rgba(255, 198, 136, 0.16);
}

.btn:active .btn-frame {
  filter: brightness(0.93);
}

.btn:focus-visible {
  outline: 2px solid #f6e1aa;
  outline-offset: 6px;
  box-shadow:
    0 0 22px 4px rgba(239, 131, 69, 0.72),
    0 10px 24px rgba(0, 0, 0, 0.52);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover {
    transform: none;
  }
  .btn:active {
    transform: scale(0.985);
  }
}

.signup.is-busy .signup__submit {
  opacity: 0.78;
  cursor: progress;
}

.signup__spin {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.signup.is-busy .signup__spin {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.signup.is-shake {
  animation: shake 0.36s ease;
}

@keyframes shake {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.signup__status {
  margin: 12px 0 0;
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.signup__status:empty {
  margin: 0;
}

.signup__status.is-bad {
  color: var(--danger);
}

/* Confirmation State (#signup-done) */
.signup__done {
  padding: 20px 0 8px;
  text-align: center;
}

.signup__done:focus {
  outline: none;
}

.seal {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
}

.seal img {
  width: 42px;
  height: 62px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 14px rgba(239, 131, 69, 0.45));
}

.seal__ring {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(239, 131, 69, 0.4);
  transform: rotate(45deg);
}

.seal__ring--2 {
  inset: 12px;
  border-color: rgba(236, 235, 232, 0.22);
  transform: rotate(0deg);
}

.signup__done h3 {
  margin: 0 0 8px;
  font-family: var(--f-sans);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #f4f3ef;
}

.signup__done p {
  margin: 0 auto;
  max-width: 460px;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 24px;
  color: var(--form-lede);
}

.signup__done .done-sub {
  margin-top: 14px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--magma-bright);
}

.burst {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--magma-bright);
  box-shadow: 0 0 8px var(--magma);
  pointer-events: none;
  z-index: 950;
}

/* ==========================================================================
   5. Bottom Flag / Coastline Key Art + Small Wordmark
   ========================================================================== */

.coast-bottom {
  position: relative;
  z-index: 1;
  margin-top: -500px;
  height: 825px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  background: var(--bg-obsidian);
}

@media (max-width: 920px) {
  .coast-bottom {
    margin-top: -360px;
    height: 640px;
  }
}

@media (max-width: 600px) {
  .coast-bottom {
    margin-top: -210px;
    height: 500px;
  }
}

.coast-bottom__art {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.coast-bottom__art picture,
.coast-bottom__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}

@media (max-width: 720px) {
  .coast-bottom__art img {
    object-position: 28% 45%;
  }
}

.coast-bottom__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      var(--bg-obsidian) 0%,
      rgba(10, 10, 10, 0.52) 11%,
      rgba(10, 10, 10, 0.06) 28%,
      rgba(10, 10, 10, 0.08) 84%,
      rgba(10, 10, 10, 0.72) 96%,
      var(--bg-obsidian) 100%
    );
  pointer-events: none;
}

.coast-bottom__foot {
  position: relative;
  z-index: 2;
  padding: 0 20px clamp(26px, 2.5vw, 38px);
}

.coast-bottom__brand {
  display: inline-block;
  line-height: 0;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.78));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.coast-bottom__brand:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.88)) brightness(1.06);
}

.coast-bottom__brand img {
  width: 186px;
  height: 62px;
  image-rendering: pixelated;
}

/* Footer contact and copyright (owner, 17 Nov) */
.coast-bottom__legal {
  margin: 14px 0 0;
  font-family: var(--font-body, "PP Charlevoix", serif);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: #858a92;
  text-align: center;
}
.coast-bottom__legal a { color: #b9bcc0; text-decoration: none; border-bottom: 1px solid rgba(201, 162, 90, 0.45); }
.coast-bottom__legal a:hover, .coast-bottom__legal a:focus-visible { color: #ecebe8; border-bottom-color: #c9a25a; }
