/* Reva LeNasó — site styles
   Palette: deep plum base, ice teal pulled from the Mer-Cer cover, fog silver type. */

:root {
  --night: #1a0c1c;      /* deepest aubergine: footer, hero shadow */
  --plum: #2a1430;       /* base background */
  --plum-lift: #3a1f40;  /* panels */
  --plum-edge: #573360;  /* borders, rules */
  --fog: #ece6ee;        /* primary text */
  --mist: #b5a6ba;       /* secondary text */
  --ice: #7fd3d6;        /* accent from the cover's teal half */
  --ice-deep: #4fa9ad;

  --display: "Gloock", "Bodoni 72", "Didot", Georgia, serif;
  --text: "Newsreader", "Iowan Old Style", Georgia, serif;

  --measure: 36rem;
  --wrap: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--plum);
  color: var(--fog);
  font-family: var(--text);
  font-size: 1.1875rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

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

a { color: var(--ice); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--fog); }

:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ice); color: var(--night); padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 50; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 0.6em; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1.1em; }
.lede { font-size: 1.3rem; color: var(--fog); }
.quiet { color: var(--mist); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--plum) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--plum-edge) 60%, transparent);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.wordmark {
  font-family: var(--display); font-size: 1.45rem; color: var(--fog);
  text-decoration: none; letter-spacing: 0.01em;
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--plum-edge);
  color: var(--fog); font: inherit; font-size: 1rem; padding: 0.35rem 0.85rem; border-radius: 3px; cursor: pointer;
}
.site-nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.site-nav a { color: var(--mist); text-decoration: none; font-size: 1.05rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fog); }
.site-nav a[aria-current="page"] { border-bottom: 1px solid var(--ice); }
.site-nav .nav-cta { color: var(--ice); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--plum); border-bottom: 1px solid var(--plum-edge); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 1.25rem 1rem; }
  .site-nav a { display: block; padding: 0.6rem 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--text); font-size: 1.05rem; font-weight: 500;
  padding: 0.8rem 1.5rem; border-radius: 2px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ice); transition: background-color .2s, color .2s;
}
.btn-solid { background: var(--ice); color: var(--night); }
.btn-solid:hover { background: var(--fog); border-color: var(--fog); color: var(--night); }
.btn-line { background: transparent; color: var(--ice); }
.btn-line:hover { background: var(--ice); color: var(--night); }

/* ---------- Hero: the fracture ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 78% 40%, color-mix(in srgb, var(--ice) 10%, transparent), transparent 70%),
    linear-gradient(180deg, var(--plum) 0%, var(--night) 100%);
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero-byline { font-family: var(--display); font-size: 1.35rem; color: var(--mist); margin-bottom: 1.25rem; }

.fracture-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(4.5rem, 13vw, 9.5rem); line-height: 0.9;
  margin: 0 0 0.7em; display: flex; align-items: flex-start; gap: 0.06em;
  position: relative;
}
.fracture-title .mer { color: var(--fog); text-shadow: 0.03em 0.16em 0 color-mix(in srgb, var(--fog) 7%, transparent); }
.fracture-title .seam {
  width: 1px; align-self: stretch; margin-inline: 0.06em;
  background: linear-gradient(180deg, transparent, var(--ice) 25%, var(--ice) 75%, transparent);
}
.fracture-title .cer {
  color: var(--mist); transform: translateY(0.32em) rotate(9deg); transform-origin: left top;
  text-shadow: -0.04em 0.05em 0 color-mix(in srgb, var(--ice) 18%, transparent),
               0.06em -0.03em 0 color-mix(in srgb, var(--ice) 9%, transparent);
}
.series { font-size: 1.05rem; color: var(--mist); margin-bottom: 2rem; }
.tagline { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.3; margin: 0 0 2.25rem; }
.tagline span { display: block; }
.tagline span + span { padding-left: 2.2em; color: var(--ice); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.ships { font-size: 1rem; color: var(--mist); margin: 1.1rem 0 0; }

.cover-frame { position: relative; max-width: 22rem; margin-inline: auto; }
.cover-frame img { box-shadow: 0 30px 60px -20px rgba(0,0,0,.75), 0 0 0 1px color-mix(in srgb, var(--fog) 10%, transparent); }

/* One orchestrated moment: the title breaks apart on load. */
@media (prefers-reduced-motion: no-preference) {
  .fracture-title .mer { animation: settle-left 1.4s cubic-bezier(.2,.7,.1,1) both; }
  .fracture-title .cer { animation: break-away 1.6s cubic-bezier(.2,.7,.1,1) .25s both; }
  .fracture-title .seam { animation: seam 1.2s ease-out both; }
}
@keyframes settle-left { from { transform: translateX(0.12em); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes break-away {
  from { transform: translateY(0) rotate(0deg); opacity: 0; }
  40% { opacity: 1; }
  to { transform: translateY(0.32em) rotate(9deg); opacity: 1; }
}
@keyframes seam { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .cover-frame { max-width: 16rem; order: -1; }
  .hero-text { text-align: left; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-dark { background: var(--night); }
.prose { max-width: var(--measure); }
.prose p { line-height: 1.75; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- Pre-order tiers ---------- */
.tiers { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.5rem; margin-top: 2.5rem; align-items: start; }
@media (max-width: 820px) { .tiers { grid-template-columns: 1fr; } }

.tier {
  background: var(--plum-lift); padding: 2rem 2rem 2.25rem; position: relative;
  border-top: 2px solid var(--plum-edge); display: flex; flex-direction: column;
}
.tier-feature { border-top-color: var(--ice); background: linear-gradient(180deg, color-mix(in srgb, var(--ice) 7%, var(--plum-lift)), var(--plum-lift) 40%); }
.tier h3 { margin-bottom: 0.25rem; }
.tier .tier-sub { color: var(--mist); font-size: 1.05rem; margin-bottom: 1.25rem; }
.price { font-family: var(--display); font-size: 2.75rem; line-height: 1; margin: 0 0 0.35rem; }
.price-note { font-size: 0.98rem; color: var(--mist); margin-bottom: 1.5rem; }
.tier ul { margin: 0 0 1.75rem; padding: 0; list-style: none; flex: 1; }
.tier li { padding: 0.55rem 0 0.55rem 1.4rem; position: relative; border-bottom: 1px solid color-mix(in srgb, var(--plum-edge) 55%, transparent); font-size: 1.05rem; line-height: 1.5; }
.tier li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 0.55rem; height: 1px; background: var(--ice); }
.tier .btn { align-self: flex-start; }

.fine-print { margin-top: 2rem; font-size: 1rem; color: var(--mist); max-width: 46rem; }

/* ---------- Forms ---------- */
.signup { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; max-width: 32rem; }
.signup input[type="email"] { flex: 1 1 14rem; }
input, textarea, select {
  font: inherit; font-size: 1.05rem; color: var(--fog); background: var(--plum);
  border: 1px solid var(--plum-edge); border-radius: 2px; padding: 0.75rem 0.9rem; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--ice); outline: none; box-shadow: 0 0 0 1px var(--ice); }
label { display: block; font-size: 1rem; color: var(--mist); margin-bottom: 0.35rem; }
.field { margin-bottom: 1.25rem; }
.hidden { position: absolute; left: -9999px; }
.contact-form { max-width: 36rem; }
.contact-form .btn { margin-top: 0.5rem; }

/* ---------- Book page ---------- */
.book-hero .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 820px) { .book-hero .wrap { grid-template-columns: 1fr; } .book-hero .cover-frame { max-width: 15rem; margin: 0; } }
.pull {
  font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.3;
  border-left: 1px solid var(--ice); padding-left: 1.5rem; margin: 0 0 4.5rem; max-width: 40rem;
}

/* ---------- Page headers ---------- */
.page-head { padding: clamp(3rem, 7vw, 5rem) 0 0; }
.page-head h1 { font-size: clamp(2.75rem, 7vw, 4.75rem); margin-bottom: 0.3em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); border-top: 1px solid color-mix(in srgb, var(--plum-edge) 50%, transparent); padding: 3rem 0 2.5rem; font-size: 1rem; color: var(--mist); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: baseline; }
.site-footer .wordmark { font-size: 1.25rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--fog); }

/* ---------- Author photo ---------- */
.author-photo {
  width: 100%; max-width: 20rem; margin-top: 1.5rem;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.7), 0 0 0 1px color-mix(in srgb, var(--fog) 10%, transparent);
}
.about-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-grid .author-photo { margin-top: 0.4rem; }
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .author-photo { max-width: 15rem; }
}

/* ---------- Bundle image ---------- */
.tier-figure { margin: -2rem -2rem 1.75rem; }
.tier-figure img { width: 100%; }
.tier-figure figcaption { font-size: 0.9rem; color: var(--mist); padding: 0.6rem 2rem 0; font-style: italic; }

/* MailerLite form: keep the site's own look */
.ml-form-formContent { flex: 1 1 14rem; margin: 0; }
.ml-form-embedSubmit { display: flex; }
.ml-error input { border-color: #e88 !important; }
