/* Embersgate Books — launch page
   Edit colors here; everything else follows from these tokens. */

:root {
  /* sampled directly from the logo */
  --ink:        #1a2c4a;   /* brand navy — matches the logo badge */
  --ink-soft:   #14223a;   /* inset fields */
  --ember:      #d7786c;   /* brand coral */
  --ember-hot:  #e8a197;   /* lighter coral */
  --ember-deep: #ca7362;   /* deeper coral */
  --parchment:  #f2ece9;   /* primary text */
  --muted:      #9aa7bd;   /* secondary text, navy-tinted */
  --line:       rgba(215,120,108,.32);

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

/* the hidden attribute must beat display:flex on .form */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ambient ember glow behind everything */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 112%, rgba(215,120,108,.26), transparent 70%),
    radial-gradient(38% 30% at 50% 100%, rgba(232,161,151,.16), transparent 72%),
    radial-gradient(90% 70% at 50% 0%,  rgba(10,18,32,.55),     transparent 65%);
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  text-align: center;
}

/* ---------- brand ---------- */

.logo {
  display: block;
  width: 96px; height: 96px;
  margin: 0 auto 24px;
  border-radius: 18px;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 6px 26px rgba(0,0,0,.45));
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 8vw, 3.4rem);
  letter-spacing: .02em;
  line-height: 1.12;
  color: var(--parchment);
}

.rule {
  width: 84px; height: 1px;
  margin: 26px auto 0;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
}

/* ---------- lede ---------- */

.lede { margin-top: 34px; }

.kicker {
  margin: 0 0 16px;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ember-hot);
}

.blurb {
  margin: 0 auto;
  max-width: 44ch;
  font-size: clamp(1rem, 2.4vw, 1.08rem);
  color: var(--muted);
}

/* ---------- signup ---------- */

.signup { margin-top: 42px; }

.form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto;
  max-width: 460px;
}

.form input[type="email"] {
  flex: 1 1 230px;
  min-width: 0;
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--parchment);
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color .2s, box-shadow .2s;
}
.form input[type="email"]::placeholder { color: #5f6f88; }
.form input[type="email"]:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(232,128,31,.16);
}

.form button {
  flex: 0 0 auto;
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(180deg, var(--ember), var(--ember-deep));
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: filter .2s, transform .1s;
}
.form button:hover  { filter: brightness(1.1); }
.form button:active { transform: translateY(1px); }
.form button:disabled { opacity: .55; cursor: default; }

.form-note {
  flex: 1 0 100%;
  margin: 4px 0 0;
  min-height: 1.3em;
  font-size: .86rem;
  color: var(--ember-hot);
}
.form-note.error { color: #f0a9a0; }

.fineprint {
  flex: 1 0 100%;
  margin: 6px 0 0;
  font-size: .74rem;
  letter-spacing: .04em;
  color: #6b7a92;
}

.placeholder {
  margin: 0;
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- footer ---------- */

.foot {
  margin-top: 64px;
  font-size: .73rem;
  letter-spacing: .06em;
  color: #6b7a92;
}
.foot p { margin: 0; }

/* ---------- utility ---------- */

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

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