/* ─── Base Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.hidden { display: none; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: clip;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Paper grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity, 0.05);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Parallax logo watermark */
body::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  background-image: url(../assets/SFS_logos/SFS_LOGO_16-9.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: var(--henna);
  color: var(--paper);
}

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

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

/* ─── Typography ─────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--henna);
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--henna);
  opacity: 0.6;
  flex-shrink: 0;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.018em;
  font-size: clamp(2.9rem, 6.6vw, 5.4rem);
}

.display em {
  font-style: italic;
  color: var(--henna);
  font-weight: 400;
}

h2.section-title {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
}

h2.section-title em {
  font-style: italic;
  color: var(--henna);
}

h2.sec-title {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
}

h2.sec-title em {
  font-style: italic;
  color: var(--henna);
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34ch;
  font-weight: 400;
}

.index-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 28px;
  border: 1px solid var(--henna);
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--henna);
  color: var(--paper);
}

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

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

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-on-dark {
  background: transparent;
  color: var(--paper);
  border-color: rgba(241, 232, 216, 0.35);
}

.btn-on-dark:hover {
  background: var(--paper);
  color: var(--pine);
  border-color: var(--paper);
}

.btn-fill-light {
  background: var(--paper);
  color: var(--pine);
  border-color: var(--paper);
}

.btn-fill-light:hover {
  background: transparent;
  color: var(--paper);
}

.arrow-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--henna);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: gap 0.25s var(--ease);
}

.arrow-link:hover {
  gap: 15px;
}

.arrow-link::after {
  content: "\2192";
}

/* ─── Reveal animations ──────────────────────────────────────────────────── */
.reveal {
  opacity: 1;
  transform: none;
}

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ─── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .proof-track { animation: none; }
  * { transition: none !important; }
}
