/* ═══════════════════════════════════════
   THE HIDDEN CANON — Global Stylesheet
   Issue I: The Visitor Trilogy
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --black:      #080808;
  --deep:       #0f0e0c;
  --gold:       #c9a84c;
  --gold-light: #e2c97e;
  --gold-dim:   #7a6230;
  --white:      #f0ead8;
  --grey:       #4a4540;
  --text:       #c8bfb0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  /* NO cursor:crosshair — breaks mobile keyboard */
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.4;
}

/* ── ANIMATIONS ── */
@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: scaleY(0); transform-origin: top; }
  to   { opacity: 1; transform: scaleY(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.12);
  padding: 1rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-subscribe {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--gold);
  border: none;
  padding: 0.6rem 1.4rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: background 0.3s;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.nav-subscribe:hover { background: var(--gold-light); }

/* ── UTILITIES ── */
.section-label {
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--gold);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 0 3rem;
  margin: 2rem auto;
  max-width: 900px;
}
.ornament-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(201,168,76,0.2)); }
.ornament-line.right { background: linear-gradient(to left, transparent, rgba(201,168,76,0.2)); }

/* ── SUBSCRIBE ── */
.subscribe-section {
  text-align: center;
  padding: 8rem 3rem;
  background: var(--deep);
  position: relative;
  overflow: hidden;
}
.subscribe-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.05);
  box-shadow: 0 0 0 100px rgba(201,168,76,0.02), 0 0 0 200px rgba(201,168,76,0.01);
  pointer-events: none;
}
.subscribe-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 0.75rem;
  position: relative;
}
.subscribe-section p {
  font-size: 0.8rem;
  color: #5a5248;
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
  position: relative;
}

/* Subscribe form — mobile safe */
.subscribe-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.subscribe-form input {
  flex: 1;
  background: rgba(201,168,76,0.04);
  border: 1px solid rgba(201,168,76,0.25);
  border-right: none;
  padding: 1rem 1.5rem;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; /* min 16px prevents iOS zoom */
  outline: none;
  transition: border-color 0.3s;
  cursor: text;
  -webkit-appearance: none;
  border-radius: 0;
}
.subscribe-form input::placeholder { color: #3a3530; }
.subscribe-form input:focus { border-color: rgba(201,168,76,0.6); }
.subscribe-form button {
  background: var(--gold);
  border: none;
  padding: 1rem 1.8rem;
  color: var(--black);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
  white-space: nowrap;
  -webkit-appearance: none;
  border-radius: 0;
}
.subscribe-form button:hover { background: var(--gold-light); }

/* ── FOOTER ── */
footer {
  padding: 2.5rem 3rem;
  border-top: 1px solid rgba(201,168,76,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
}
.footer-text {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ── ARTICLE SHARED STYLES ── */
.article-hero {
  position: relative;
  padding: 7rem 3rem 5rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim));
}
.article-category {
  font-size: 0.58rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.article-category::before,
.article-category::after { content: ''; width: 24px; height: 1px; background: var(--gold-dim); }

.article-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 1rem;
}
.article-title em { color: var(--gold); font-style: italic; }

.article-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.2rem;
  color: #7a7060;
  margin-bottom: 3rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  flex-wrap: wrap;
}
.meta-dot { width: 3px; height: 3px; background: var(--gold-dim); border-radius: 50%; }

.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 3rem 6rem;
}
.article-body p {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.18rem;
  line-height: 1.92;
  color: var(--text);
  margin-bottom: 2rem;
}
.article-body p:first-of-type::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  font-weight: 600;
  float: left;
  line-height: 0.72;
  margin-right: 0.1em;
  margin-top: 0.12em;
  color: var(--gold);
}
.article-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  color: var(--white);
  margin: 4.5rem 0 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(201,168,76,0.14);
}
.article-body em { color: var(--gold-light); font-style: italic; }
.article-body strong { color: var(--white); font-weight: 400; }

.pull-quote {
  border-left: 2px solid var(--gold);
  margin: 3.5rem 0;
  padding: 1.8rem 2.5rem;
  background: rgba(201,168,76,0.025);
}
.pull-quote p {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 1.45rem !important;
  line-height: 1.65 !important;
  color: var(--white) !important;
  margin-bottom: 0.8rem !important;
}
.pull-quote p::first-letter { all: unset !important; float: none !important; }
.pull-quote cite {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  font-style: normal;
}

.callout {
  background: rgba(201,168,76,0.04);
  border: 1px solid rgba(201,168,76,0.15);
  padding: 2rem 2.5rem;
  margin: 3rem 0;
}
.callout-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.callout p {
  font-size: 1rem !important;
  line-height: 1.8 !important;
  color: #8a8070 !important;
  margin-bottom: 0 !important;
}
.callout p::first-letter { all: unset !important; }

.section-break {
  text-align: center;
  color: var(--gold-dim);
  font-size: 0.8rem;
  letter-spacing: 0.6em;
  margin: 4rem 0;
  opacity: 0.4;
}

.footnote-block {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201,168,76,0.1);
}
.footnote-block p {
  font-size: 0.8rem !important;
  line-height: 1.7 !important;
  color: #4a4540 !important;
  margin-bottom: 0.6rem !important;
  font-family: 'DM Sans', sans-serif !important;
}
.footnote-block p::first-letter { all: unset !important; float: none !important; }

.article-tags {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 3rem 3rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.52rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.18);
  padding: 0.32rem 0.8rem;
}

.back-link { max-width: 700px; margin: 0 auto; padding: 2rem 3rem 5rem; }
.back-link a {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s;
}
.back-link a::before { content: '←'; }
.back-link a:hover { gap: 0.8rem; }

.next-part {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(201,168,76,0.1);
  padding-top: 2rem;
}
.next-part-label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
}
.next-part a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: gap 0.3s;
}
.next-part a::after { content: '→'; }
.next-part a:hover { gap: 1.2rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .article-hero { padding: 5rem 1.5rem 3rem; }
  .article-body, .article-tags, .back-link, .next-part { padding-left: 1.5rem; padding-right: 1.5rem; }
  .ornament { padding: 0 1.5rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .subscribe-form { flex-direction: column; }
  .subscribe-form input { border-right: 1px solid rgba(201,168,76,0.25); border-bottom: none; }
  .subscribe-form button { padding: 1rem; }
}
