/* ============================================================
   NIGHT MACARON — Base, Utilities & Shared Components
   ============================================================ */

html {
  scroll-behavior: smooth;
  font-size: 16px;
  cursor: none; /* custom cursor */
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Restore default cursor on touch devices */
@media (hover: none) {
  html { cursor: auto; }
  a, button { cursor: pointer; }
}

/* ── Grain texture overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Stars canvas ── */
#starsCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-stars);
  pointer-events: none;
}

/* ── Global links ── */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
  cursor: none;
}

button { cursor: none; }

@media (hover: none) {
  a, button { cursor: pointer; }
}

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

/* ── Section base ── */
section {
  position: relative;
  z-index: var(--z-content);
}

/* ── Section inner wrapper ── */
.section-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--section-pad-v) var(--section-pad-h);
}

/* ── Eyebrow label ── */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

/* ── Section heading ── */
.section-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1.2rem;
}

/* ── Gold rule divider ── */
.title-line {
  display: block;
  width: 40px;
  height: 0.5px;
  background: var(--gold);
  opacity: 0.55;
  margin-bottom: 2.5rem;
}

/* ── Body text ── */
.body-text {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.95;
  color: var(--muted-light);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: none;
  transition: all var(--t-base);
  padding: 0.9rem 2.6rem;
  border: none;
  background: none;
  position: relative;
  overflow: hidden;
}

.btn-gold {
  background: var(--gold);
  color: var(--bg);
  font-weight: 500;
  border: 1px solid var(--gold);
  padding: 1.05rem 3.2rem;
  letter-spacing: 0.2em;
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: 0 8px 40px rgba(200, 169, 110, 0.25);
}

.btn-outline {
  border: 0.5px solid var(--border-gold);
  color: var(--gold);
  padding: 0.9rem 2.4rem;
  transition: border-color var(--t-base), color var(--t-base), transform var(--t-base);
}

.btn-outline:hover {
  border-color: var(--border-gold-hover);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-link {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-light);
  border-bottom: 0.5px solid var(--muted);
  padding-bottom: 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.btn-link:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ── Line reveal animation for titles ── */
.line-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.line-inner {
  display: inline-block;
  transform: translateY(108%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.line-inner.line--visible {
  transform: translateY(0);
}

/* ── Fade-in scroll animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within containers */
.fade-in:nth-child(1) { transition-delay: 0.00s; }
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }
.fade-in:nth-child(5) { transition-delay: 0.32s; }
.fade-in:nth-child(6) { transition-delay: 0.40s; }
.fade-in:nth-child(7) { transition-delay: 0.48s; }

/* ── Shimmer keyframe (reusable) ── */
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --section-pad-v: 5rem;
    --section-pad-h: 1.5rem;
  }
}
