/* =====================================================================
   EMPIRE PUBLISHING — site styles (v1)
   Hand-written, zero external dependencies → fully self-hostable.
   Brand: deep navy + classical gold. Serif display, clean sans body.
   ===================================================================== */

:root {
  /* palette */
  --navy-950: #070c1a;
  --navy-900: #0a1124;
  --navy-850: #0c1530;
  --navy-800: #0f1b3a;
  --navy-700: #16264d;
  --line:     #233459;

  --gold:        #c8a24c;
  --gold-bright: #e7cd84;
  --gold-deep:   #9c7c34;

  --ink:    #eef2fb;
  --muted:  #9fabc7;
  --muted2: #74819f;

  /* type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1140px;
  --radius: 14px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.75);
  --shadow-gold: 0 0 0 1px rgba(200,162,76,.18), 0 22px 60px -24px rgba(200,162,76,.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--navy-900);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* constellation backdrop — pure CSS, echoes the covers */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(200,162,76,.10), transparent 60%),
    radial-gradient(900px 600px at 8% 4%, rgba(33,52,89,.55), transparent 55%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900) 40%, var(--navy-850));
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(231,205,132,.55), transparent),
    radial-gradient(1.2px 1.2px at 70% 20%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.6px 1.6px at 40% 70%, rgba(231,205,132,.40), transparent),
    radial-gradient(1.1px 1.1px at 85% 60%, rgba(255,255,255,.30), transparent),
    radial-gradient(1.3px 1.3px at 55% 45%, rgba(231,205,132,.30), transparent),
    radial-gradient(1.1px 1.1px at 12% 80%, rgba(255,255,255,.25), transparent);
  background-repeat: no-repeat;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- typography ---------- */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: .2px; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 .4em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.12; margin: 0 0 .5em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
.lead { font-size: 1.18rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

/* gold accent rule */
.rule { width: 64px; height: 3px; border: 0; margin: 1.4rem 0;
  background: linear-gradient(90deg, var(--gold), transparent); }
.rule.center { margin-left: auto; margin-right: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(8,13,28,.72);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.brand .brand-text { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); letter-spacing: .5px; }
.brand .brand-text b { color: var(--gold); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .25s ease, background .2s;
}
.btn-gold {
  color: #1a1303;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 10px 30px -10px rgba(200,162,76,.6);
}
.btn-gold:hover { color: #1a1303; transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(200,162,76,.7); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.02); }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); transform: translateY(-2px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 92px); padding-bottom: clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted2); }

/* featured book card in hero */
.feature-card {
  position: relative;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-850));
  border: 1px solid var(--line);
  border-radius: 20px; padding: 26px;
  box-shadow: var(--shadow);
}
.feature-card .live-badge {
  position: absolute; top: -13px; left: 26px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1303; font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  padding: 6px 14px; border-radius: 999px; text-transform: uppercase;
}
.feature-card img.cover {
  width: 100%; border-radius: 10px; box-shadow: var(--shadow);
  transition: transform .4s ease;
}
.feature-card:hover img.cover { transform: translateY(-4px) scale(1.01); }
.feature-card .fc-title { font-family: var(--serif); font-size: 1.3rem; margin: 18px 0 4px; }
.feature-card .fc-sub { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }

/* ---------- clusters ---------- */
.clusters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cluster {
  background: linear-gradient(165deg, rgba(22,38,77,.5), rgba(12,21,48,.5));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .2s ease, border-color .2s ease;
}
.cluster:hover { transform: translateY(-4px); border-color: var(--gold-deep); }
.cluster .tag { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.cluster h3 { margin: 12px 0 8px; }
.cluster p { color: var(--muted); font-size: .96rem; margin: 0 0 16px; }
.cluster .count { font-size: .85rem; color: var(--muted2); }

/* ---------- book grid (library) ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 36px 28px; }
.book {
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, rgba(22,38,77,.42), rgba(12,21,48,.42));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.book:hover { transform: translateY(-6px); border-color: var(--gold-deep); box-shadow: var(--shadow-gold); }
.book .cover-frame { position: relative; aspect-ratio: 1600/2560; overflow: hidden; background: var(--navy-950); }
.book .cover-frame img { width: 100%; height: 100%; object-fit: cover; }
.book .status {
  position: absolute; top: 12px; right: 12px;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(4px);
}
.status.live { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1a1303; }
.status.soon { background: rgba(10,17,36,.78); color: var(--muted); border: 1px solid var(--line); }
.book .book-body { padding: 18px 18px 22px; display: flex; flex-direction: column; flex: 1; }
.book .series-tag { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.book h3 { font-size: 1.12rem; margin: 8px 0 4px; }
.book .bsub { color: var(--muted); font-size: .86rem; flex: 1; margin: 0 0 16px; }
.book .book-foot { display: flex; gap: 10px; align-items: center; }
.book .book-foot a { font-size: .9rem; font-weight: 600; }

/* ---------- book detail page ---------- */
.detail-grid { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: start; }
.detail-cover { position: sticky; top: 96px; }
.detail-cover img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; }
.detail-cover .meta { margin-top: 22px; display: grid; gap: 10px; }
.detail-body .series-line { color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .76rem; }
.detail-body h1 { margin-top: 10px; }
.detail-body .subtitle { font-family: var(--serif); font-size: 1.35rem; color: var(--muted); margin: -.2em 0 1.2em; }
.detail-body .desc p { margin: 0 0 1.1em; color: #d7def0; }
.detail-body .desc ul { margin: 0 0 1.3em; padding-left: 1.2em; color: #d7def0; }
.detail-body .desc li { margin-bottom: .5em; }
.detail-body .desc b { color: var(--ink); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv span:first-child { color: var(--muted2); }
.kv span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.pill {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.pill.live { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1a1303; }
.pill.soon { background: rgba(255,255,255,.04); color: var(--muted); border: 1px solid var(--line); }

/* ---------- newsletter / lead magnet ---------- */
.capture {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-850));
  border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(34px, 5vw, 60px); text-align: center; box-shadow: var(--shadow);
}
.capture h2 { margin-bottom: .3em; }
.capture .lead { margin: 0 auto 28px; }
.capture form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.capture input[type=email] {
  flex: 1; min-width: 240px;
  background: rgba(7,12,26,.8); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); padding: 13px 22px; font-size: 1rem; font-family: var(--sans);
}
.capture input[type=email]:focus { outline: none; border-color: var(--gold); }
.capture .form-note { margin-top: 16px; font-size: .88rem; color: var(--muted2); min-height: 1.2em; }

/* ---------- about ---------- */
.prose { max-width: 70ch; }
.prose p { margin: 0 0 1.2em; color: #d7def0; }
.values { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-top: 40px; }
.value { background: rgba(22,38,77,.4); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.value h3 { color: var(--gold-bright); font-size: 1.1rem; }
.value p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; background: rgba(7,12,26,.5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--muted); font-size: .94rem; }
.footer-grid a:hover { color: var(--ink); }
.footer-brand img { height: 46px; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: .92rem; max-width: 34ch; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted2); font-size: .85rem; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .feature-card { max-width: 380px; }
  .clusters { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-cover { position: static; max-width: 320px; }
  .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 680px) {
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--navy-850); border-bottom: 1px solid var(--line);
    padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links.open { max-height: 320px; padding: 8px 24px 20px; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
