/* ---------------------------------------------------------------
   One Sky Ally — base tokens, reset, typography
   Family DNA shared with Ear Clef: warm near-black, gold accents,
   film grain, Fraunces display type. Here the black leans night-sky.
   --------------------------------------------------------------- */

:root {
  --bg: #0e111a;
  --bg-elevated: #141827;
  --bg-card: #12151f;
  --text: #f2ede4;
  --text-soft: #cfc8bb;
  --text-muted: #9d9689;
  --gold: #f2a93b;
  --gold-deep: #c97f1a;
  --gold-soft: rgba(242, 169, 59, 0.12);
  --fioh: #f0776b;
  --fioh-soft: rgba(240, 119, 107, 0.13);
  --earclef: #f2a93b;
  --pastime: #7fd4c1;
  --pastime-soft: rgba(127, 212, 193, 0.12);
  --border: rgba(242, 237, 228, 0.09);
  --border-strong: rgba(242, 237, 228, 0.2);
  --hover-wash: rgba(242, 237, 228, 0.04);
  --max-width: 1060px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Analog film grain over everything — pure CSS, no requests */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

img,
svg {
  max-width: 100%;
}

img {
  display: block;
}

::selection {
  background: var(--gold);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: min(100% - 2.75rem, var(--max-width));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
  border-radius: 6px;
  transform: translateY(-300%);
}

.skip-link:focus {
  transform: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn:hover {
  background: var(--hover-wash);
  border-color: var(--text-soft);
  transform: translateY(-1px);
}

.btn--solid {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1206;
}

.btn--solid:hover {
  background: #f7b95e;
  border-color: #f7b95e;
}

.btn svg {
  flex: none;
}

/* Section scaffolding ------------------------------------------- */

.section {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
  scroll-margin-top: 4rem;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-dot, var(--gold));
  box-shadow: 0 0 12px 2px var(--accent-glow, var(--gold-soft));
}

/* Scroll reveals — .reveal elements fade up when they enter view */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.65, 0.3, 1), transform 0.9s cubic-bezier(0.22, 0.65, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
