/* The Unveiling - Michael Apicello
   Palette sampled from the cover's night scene and torn parchment. */

@font-face {
  font-family: 'Gelasio';
  src: url('fonts/gelasio-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gelasio';
  src: url('fonts/gelasio-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --night:      #070f11;   /* deep sky above the street */
  --night-2:    #0c171a;
  --surface:    #101e22;   /* cards */
  --surface-2:  #16272c;
  --line:       #24383d;   /* cool slate from the storm */
  --line-soft:  #1a2b30;

  --text:       #e7ddcc;   /* lit parchment */
  --muted:      #a9b3b4;   /* rain grey */
  --amber:      #d9a862;   /* street lamp, lit window */
  --amber-hi:   #e6b872;
  --parchment:  #caa773;
  --ink:        #0a1214;   /* text on amber */

  --measure: 34rem;
  --radius: 3px;
}

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

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

body {
  margin: 0;
  background: var(--night);
  background-image: linear-gradient(180deg, #050c0e 0%, var(--night) 22%, var(--night-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Gelasio', Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--amber); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3rem 0; }
section + section { border-top: 1px solid var(--line-soft); }

h1, h2 {
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment);
  text-align: center;
  text-wrap: balance;
  margin-bottom: 1.75rem;
}

/* ---------- hero ---------- */

.hero {
  padding: 2.75rem 0 3rem;
  text-align: center;
}

.hero-cover {
  width: min(62vw, 15rem);
  margin: 0 auto 2rem;
  border: 1px solid #3a2f22;
  box-shadow:
    0 1px 0 rgba(202, 167, 115, 0.18),
    0 18px 45px -12px rgba(0, 0, 0, 0.9),
    0 4px 14px rgba(0, 0, 0, 0.6);
}

.hero h1 {
  font-size: clamp(2.6rem, 13vw, 4.25rem);
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #f0e7d7;
  margin-bottom: 0.9rem;
}
.hero h1 .the {
  display: block;
  font-size: 0.46em;
  letter-spacing: 0.3em;
  color: var(--parchment);
  margin-bottom: 0.25em;
  text-indent: 0.3em;
}

.byline {
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.5rem;
}

.rule {
  width: 4.5rem;
  height: 1px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(90deg, rgba(202, 167, 115, 0), var(--parchment), rgba(202, 167, 115, 0));
}

.tagline {
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 22rem;
  line-height: 1.5;
  text-wrap: balance;
}

/* ---------- buy ---------- */

.buy-grid {
  display: grid;
  gap: 0.7rem;
  max-width: 24rem;
  margin: 0 auto;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background-color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--parchment); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--amber-hi);
  border-color: var(--amber-hi);
}

.btn-all {
  background: none;
  border-style: dashed;
  color: var(--parchment);
}
.btn-all:hover { background: var(--surface); }

.buy-soon {
  text-align: center;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1rem;
  max-width: 24rem;
  margin: 0 auto;
}

/* ---------- description ---------- */

.description {
  max-width: var(--measure);
  margin: 0 auto;
}
.description p { margin: 0 0 1.15rem; }
.description p:last-child { margin-bottom: 0; }
.description p.lead {
  font-size: 1.1875rem;
  color: #f0e7d7;
}
.description p.close {
  font-style: italic;
  color: var(--muted);
}
/* comp line: muted and upright, so the italic book titles inside it read */
.description p.comp {
  margin-top: 1.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 1rem;
  color: var(--muted);
}
.description p.comp em { font-style: italic; color: var(--text); }

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

.signup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.35rem 1.65rem;
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}
.signup-card h2 { margin-bottom: 0.65rem; }
.signup-intro {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}
.signup-fineprint {
  margin: 0.9rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* MailerLite embed, restyled to match the site. The embed keeps its own
   class names so MailerLite's script still works; these rules replace its
   default look. */
.ml-embedded, .signup-card form { margin: 0; }
.signup-card .ml-form-embedContainer,
.signup-card .ml-form-align-center,
.signup-card .ml-form-embedWrapper,
.signup-card .ml-form-embedBody,
.signup-card .ml-form-embedContent,
.signup-card .ml-form-formContent,
.signup-card .ml-form-fieldRow,
.signup-card .ml-field-group,
.signup-card .ml-form-embedSubmit,
.signup-card .ml-form-successBody {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  float: none;
  display: block;
  box-sizing: border-box;
}
.signup-card .ml-form-fieldRow { margin-bottom: 0.7rem; }

/* success state, after a successful submit */
.signup-card .ml-form-successContent h4 {
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--parchment);
  margin: 0 0 0.6rem;
}
.signup-card .ml-form-successContent p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

/* validation errors, in the site's palette rather than MailerLite's red */
.signup-card .ml-error input { border-color: #c2605a; }
.signup-card .ml-error .label-description,
.signup-card .ml-error label:first-child { color: #d98b84; }

/* the spinner button MailerLite swaps in while submitting */
.signup-card .ml-form-embedSubmit button.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup-card input[type="email"],
.signup-card input[type="text"],
.signup-card .ml-form-formContent input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.7rem;
  background: #0a1619;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.signup-card input::placeholder { color: #7f8c8e; opacity: 1; }
.signup-card input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(217, 168, 98, 0.22);
}

.signup-card button[type="submit"],
.signup-card input[type="submit"],
.signup-card .ml-form-embedSubmit button {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1.1rem;
  background: var(--amber);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .18s ease;
}
.signup-card button[type="submit"]:hover,
.signup-card .ml-form-embedSubmit button:hover { background: var(--amber-hi); }

.signup-card .ml-form-successBody,
.signup-card .ml-form-successContent { color: var(--text); }
.signup-card .ml-form-embedContent h4,
.signup-card .ml-form-successContent h4 { color: var(--parchment); }

/* ---------- about ---------- */

.about-inner { max-width: var(--measure); margin: 0 auto; text-align: center; }
.about-photo {
  margin: 0 auto 1.6rem;
  max-width: 26rem;
  border: 1px solid var(--line);
}
.bio { margin: 0; color: var(--text); }

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

footer {
  padding: 2.5rem 0 3.25rem;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.875rem;
  height: 2.875rem;
  border-radius: 50%;
  color: var(--muted);
  transition: color .18s ease, background-color .18s ease;
}
.social a:hover { color: var(--amber); background: var(--surface); }
.social svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

.colophon {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
  line-height: 1.6;
}
.colophon a { color: var(--muted); text-decoration-color: var(--line); }
.colophon a:hover { color: var(--amber); }

/* ---------- privacy page ---------- */

.page { max-width: var(--measure); margin: 0 auto; padding: 3rem 0; }
.page h1 {
  font-size: 1.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 1.5rem;
}
.page h2 {
  font-size: 1.0625rem;
  text-align: left;
  margin: 2rem 0 0.5rem;
}
.page p { margin: 0 0 1rem; }
.back { display: inline-block; margin-top: 1.5rem; }

/* ---------- wider screens ---------- */

@media (min-width: 46rem) {
  body { font-size: 1.125rem; }
  section { padding: 4.5rem 0; }
  .hero { padding: 4.5rem 0 4rem; }
  .hero-cover { width: 17.5rem; }
  h2 { font-size: 1.625rem; margin-bottom: 2.25rem; }
  .buy-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 34rem;
  }
  .buy-grid .btn-primary:first-child { grid-column: 1 / -1; }
  .btn-all { grid-column: 1 / -1; }
}

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

/* visually hidden, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
