*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.18; font-weight: 700; letter-spacing: -0.025em; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--mint-2); color: var(--brand-2); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-shell[aria-busy="true"] { cursor: progress; }
#main { flex: 1; }

/* Page transition */
.view { animation: viewIn var(--t-slow) var(--ease-out) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Reusable motion helpers */
.fade-up { animation: fadeUp var(--t-slow) var(--ease-out) both; }
.fade-up-1 { animation-delay: 60ms; }
.fade-up-2 { animation-delay: 120ms; }
.fade-up-3 { animation-delay: 180ms; }
.fade-up-4 { animation-delay: 240ms; }
.fade-up-5 { animation-delay: 300ms; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.pop-in { animation: popIn var(--t-base) var(--ease-out) both; }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}

.shimmer {
  background: linear-gradient(100deg, var(--surface-3) 20%, #e7ece5 40%, var(--surface-3) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pulse-dot { animation: pulseDot 1.8s var(--ease) infinite; }
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.text-amber { color: var(--amber); }
.text-rose { color: var(--rose); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.06; }
.display em { color: var(--brand); font-style: italic; }

.section-title { font-size: var(--fs-2xl); letter-spacing: -0.035em; }
.section-sub { color: var(--muted); font-size: var(--fs-base); max-width: 58ch; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .view, .fade-up, .pop-in, .clip-grid .clip-card, .hero-float, .progress-fill {
    opacity: 1 !important;
    transform: none !important;
  }
}
