/* ============================================================
   NOAH BOREAL · Sistema visual compartido
   Paleta: crema papel · tinta noche · oro Lumbre · coral atardecer · bosque
   ============================================================ */

:root {
  /* Papeles */
  --paper: #f5efe1;
  --paper-soft: #faf6ec;
  --paper-warm: #efe6d0;

  /* Tintas */
  --ink: #1a1b2e;
  --ink-soft: #2c2f4a;
  --ink-mute: #4a4d6b;

  /* Oros (Lumbre) */
  --gold: #b08a3e;
  --gold-soft: #c9a35a;
  --gold-glow: #e6c079;
  --gold-deep: #8a6a2a;

  /* Acentos del universo */
  --coral: #d97757;         /* atardecer */
  --coral-soft: #e89b7f;
  --forest: #2f4a3a;        /* bosque profundo */
  --forest-soft: #4a6b52;
  --violet: #3a2b52;        /* noche mágica */

  /* Líneas */
  --rule: #cdb98c;
  --rule-soft: rgba(176, 138, 62, 0.25);

  /* Sombras editoriales */
  --shadow-book: 0 30px 60px -20px rgba(26, 27, 46, 0.45),
                 0 12px 24px -12px rgba(26, 27, 46, 0.3);
  --shadow-card: 0 12px 28px -18px rgba(26, 27, 46, 0.25);

  /* Layout */
  --container: 1200px;
  --gutter: 32px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Lora', 'Times New Roman', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* Textura sutil de papel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(176,138,62,0.05), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(217,119,87,0.04), transparent 55%);
}

main, header, footer { position: relative; z-index: 1; }

/* ------------------- Tipografía ------------------- */
.display {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.05;
}

.eyebrow {
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

h1.display { font-size: clamp(48px, 6.4vw, 96px); }
h2.display { font-size: clamp(36px, 4.2vw, 60px); }
h3.display { font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; }

p { max-width: 62ch; text-wrap: pretty; hanging-punctuation: first last; }

.lead {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 58ch;
}

.rule {
  border: none;
  height: 1px;
  background: var(--rule);
  width: 72px;
  margin: 24px 0;
}

.rule.center { margin-left: auto; margin-right: auto; }

/* ------------------- Header / Nav ------------------- */
.site-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(245, 239, 225, 0.88);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.brand .spark {
  width: 14px; height: 14px;
  display: inline-block;
  background: radial-gradient(circle at 30% 30%, var(--gold-glow), var(--gold) 55%, var(--gold-deep));
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold-glow), 0 0 22px rgba(230, 192, 121, 0.35);
}

.brand small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav a {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 180ms ease;
  position: relative;
  padding: 4px 0;
}

.nav a:hover { color: var(--gold-deep); }

.nav a.active {
  color: var(--ink);
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--gold-glow);
}

.nav .cta {
  padding: 10px 20px;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  border-radius: 999px;
  background: transparent;
  letter-spacing: 0.22em;
  font-size: 11px;
  transition: all 180ms ease;
}
.nav .cta:hover {
  background: var(--gold);
  color: var(--paper-soft);
}

/* ------------------- Container ------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container.narrow { max-width: 780px; }
.container.wide { max-width: 1360px; }

/* ------------------- Buttons ------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper-soft);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(26,27,46,0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep));
  color: var(--paper-soft);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(176, 138, 62, 0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
}

/* ------------------- Section spacing ------------------- */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
section.hero { padding: 72px 0 96px; }

.section-head {
  text-align: center;
  margin-bottom: 64px;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .rule { margin: 20px auto 0; }

/* ------------------- Backgrounds ------------------- */
.bg-night {
  background: linear-gradient(180deg, #1a1836 0%, #2b1f47 45%, #3a2b52 100%);
  color: var(--paper-soft);
  position: relative;
  overflow: hidden;
}
.bg-night::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(230,192,121,0.9) 0.5px, transparent 1.5px),
    radial-gradient(circle at 78% 15%, rgba(230,192,121,0.7) 0.5px, transparent 1.5px),
    radial-gradient(circle at 45% 8%, rgba(230,192,121,0.8) 0.4px, transparent 1.5px),
    radial-gradient(circle at 88% 35%, rgba(230,192,121,0.6) 0.5px, transparent 1.5px),
    radial-gradient(circle at 22% 55%, rgba(230,192,121,0.5) 0.4px, transparent 1.5px),
    radial-gradient(circle at 62% 62%, rgba(230,192,121,0.7) 0.5px, transparent 1.5px),
    radial-gradient(circle at 8% 80%, rgba(230,192,121,0.5) 0.4px, transparent 1.5px),
    radial-gradient(circle at 92% 82%, rgba(230,192,121,0.6) 0.4px, transparent 1.5px),
    radial-gradient(circle at 38% 40%, rgba(230,192,121,0.4) 0.3px, transparent 1px);
  background-size: 100% 100%;
  pointer-events: none;
}
.bg-night .eyebrow { color: var(--gold-glow); }
.bg-night .rule { background: var(--gold-soft); }

.bg-warm {
  background: var(--paper-warm);
}

.bg-cream-soft {
  background: var(--paper-soft);
}

/* ------------------- Star ornament ------------------- */
.star {
  display: inline-block;
  color: var(--gold);
  font-size: 12px;
  vertical-align: middle;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--gold);
}
.ornament::before, .ornament::after {
  content: "";
  height: 1px;
  width: 64px;
  background: var(--rule);
}
.ornament svg { width: 18px; height: 18px; }

/* ------------------- Footer ------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper-soft);
  padding: 72px 0 32px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(230,192,121,0.5) 0.4px, transparent 1.2px),
    radial-gradient(circle at 70% 40%, rgba(230,192,121,0.4) 0.4px, transparent 1.2px),
    radial-gradient(circle at 40% 70%, rgba(230,192,121,0.35) 0.3px, transparent 1px),
    radial-gradient(circle at 85% 75%, rgba(230,192,121,0.4) 0.4px, transparent 1.2px);
  pointer-events: none;
}
.site-footer .container { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(205, 185, 140, 0.2);
}

.footer-grid h4 {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 20px 0;
}

.footer-grid a, .footer-grid p {
  color: rgba(245, 239, 225, 0.75);
  font-size: 14px;
  display: block;
  margin: 8px 0;
  line-height: 1.6;
}

.footer-grid a:hover { color: var(--gold-glow); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 239, 225, 0.4);
}

/* ------------------- Book card ------------------- */
.book-cover {
  aspect-ratio: 5 / 8;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-book);
  background: var(--ink);
  position: relative;
  transform: perspective(1000px) rotateY(-6deg);
  transition: transform 400ms ease;
}
.book-cover:hover {
  transform: perspective(1000px) rotateY(0deg);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }

.book-cover::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,0.35), transparent);
  pointer-events: none;
}

/* Drop cap */
.dropcap::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 4.2em;
  float: left;
  line-height: 0.85;
  padding: 8px 12px 0 0;
  color: var(--gold-deep);
}

/* Utility */
.gold { color: var(--gold-deep); }
.italic { font-style: italic; }
.center { text-align: center; }
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ------------------- Cards genéricas ------------------- */
.card {
  background: var(--paper-soft);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

/* ------------------- Responsive ------------------- */
@media (max-width: 900px) {
  .nav { gap: 20px; }
  .nav a { font-size: 11px; letter-spacing: 0.14em; }
  section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

@media (max-width: 640px) {
  .site-header .container { flex-direction: column; gap: 16px; }
  .nav { flex-wrap: wrap; justify-content: center; }
  .nav .cta { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
