/* ============================================================
   THE UNFOLDING — shared styles
   Palette pulled from cover: teal-black, mairee rose, ivory, moss
   ============================================================ */

@font-face {
  font-family: 'Chiller';
  src: url('assets/chiller.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #061619;
  --ink-2: #0b2227;
  --ink-3: #133138;
  --teal: #2d5b66;
  --teal-soft: #3b7682;
  --rose: #e94a7c;
  --rose-deep: #c72f63;
  --rose-soft: #f39bb4;
  --ivory: #f4ead9;
  --ivory-2: #e8dcc5;
  --muted: #7a9097;
  --line: rgba(244, 234, 217, 0.14);
  --line-strong: rgba(244, 234, 217, 0.32);

  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  --hand: 'Caveat', cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(233,74,124,0.08), transparent 40%),
    radial-gradient(ellipse at 80% 90%, rgba(45,91,102,0.25), transparent 50%);
}

/* Grain overlay — applied via ::before on body or a wrapper */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Type ---------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: clamp(3rem, 8vw, 7rem); line-height: 0.95; }
h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); line-height: 1.0; }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.15; }

.mono-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
}

.mono-label.muted { color: var(--muted); }

.hand { font-family: var(--hand); }

/* Nav ----------------------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: linear-gradient(to bottom, rgba(6,22,25,0.9), rgba(6,22,25,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 16px var(--rose); }

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  align-items: center;
}
.nav-links a { opacity: 0.75; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover { opacity: 1; color: var(--rose); }
.nav-buy-btn {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-buy-btn:hover { background: var(--rose); border-color: var(--rose); color: var(--ink); }

/* Containers ---------------------------------------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }

/* Buttons ------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }

.btn-primary {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--ink);
}
.btn-primary:hover { background: var(--rose-deep); border-color: var(--rose-deep); color: var(--ivory); }

.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--line-strong); }

/* Ink splatter SVG helper ------------------------------- */
.splatter {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
}

/* Footer -------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  margin-top: 120px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory);
  margin-bottom: 18px;
}
.footer-grid a { display: block; padding: 4px 0; opacity: 0.7; text-transform: uppercase; }
.footer-grid a:hover { color: var(--rose); opacity: 1; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
}

/* Section spacing ---------------------------------------- */
section { padding: 120px 0; position: relative; }
section + section { border-top: 1px solid var(--line); }

/* utility */
.glow-rose { text-shadow: 0 0 24px rgba(233,74,124,0.5); }
.drop-cap::first-letter {
  font-family: var(--serif);
  font-size: 4.5em;
  float: left;
  line-height: 0.85;
  padding: 0.12em 0.08em 0 0;
  color: var(--rose);
  font-weight: 500;
}

/* scrollbars subtle */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--rose); }

/* Responsive --------------------------------------------- */
@media (max-width: 780px) {
  .nav { padding: 14px 20px; }
  .nav-links { gap: 14px; font-size: 0.62rem; }
  .nav-links a:not(.nav-buy-btn):not(.always-show) { display: none; }
  section { padding: 80px 0; }
  .container, .container-narrow { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
