/* ============================================================
   BASE - reset, typography, buttons, shared primitives.
   You will rarely need to touch this file.
   ============================================================ */

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--brass); color: var(--pine-950); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
strong { color: var(--ink); font-weight: 600; }

h1, h2, h3 { line-height: 1.12; font-weight: 400; }

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

/* ---------- discourage casual image saving (NOT real protection) ---------- */
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* ---------- sections ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section--ivory  { background: var(--ivory); }
.section--ivory2 { background: var(--ivory-2); }
.section--dark   { background: var(--pine-950); color: var(--cream-70); }

/* faint blueprint grid + grain, dark sections only */
.section--dark::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 100%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 100%);
  pointer-events: none;
}
.section--dark > .container { position: relative; z-index: 1; }

/* ---------- section headers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex: none;
}
.section--dark .eyebrow { color: var(--brass); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 52px);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.section--dark .section-title { color: var(--cream); }
.section-title em { font-style: italic; color: var(--brass-deep); }
.section--dark .section-title em { color: var(--brass-hi); }

.section-intro { max-width: 620px; color: var(--mute); margin-bottom: 46px; }
.section--dark .section-intro { color: var(--cream-70); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; }

.btn--brass {
  background: linear-gradient(160deg, var(--brass-hi), var(--brass));
  color: var(--pine-950);
  box-shadow: 0 6px 18px rgba(194, 147, 47, 0.28);
}
.btn--brass:hover { box-shadow: 0 10px 26px rgba(194, 147, 47, 0.4); }

.btn--ghost { border-color: var(--line-dark); color: var(--cream); }
.btn--ghost:hover { border-color: var(--brass); color: var(--brass-hi); }

.btn--ghost-light { border-color: var(--line-light); color: var(--ink); }
.btn--ghost-light:hover { border-color: var(--brass-deep); color: var(--brass-deep); }

/* ---------- tags & chips ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.03em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  color: var(--mute);
  background: rgba(255, 255, 255, 0.4);
}
.section--dark .tag,
.tag--dark {
  border-color: var(--line-dark);
  color: var(--cream-70);
  background: rgba(242, 238, 223, 0.05);
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ivory-3);
  color: var(--ink);
  white-space: nowrap;
}
.badge--win {
  background: linear-gradient(160deg, var(--brass-hi), var(--brass));
  color: var(--pine-950);
}

/* ---------- link with arrow ---------- */
.arrow-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 500;
  color: var(--brass-deep);
  transition: gap .25s var(--ease);
}
.arrow-link svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.arrow-link:hover { gap: 10px; }
.arrow-link:hover svg { transform: translate(2px, -2px); }
.section--dark .arrow-link { color: var(--brass-hi); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal--left  { transform: translateX(-30px); }
.reveal--scale { transform: scale(0.94); }
.reveal.in { opacity: 1; transform: none; }

/* flash highlight when jumping from the gantt */
@keyframes flashRing {
  0%   { box-shadow: 0 0 0 0 rgba(194, 147, 47, 0.55); }
  100% { box-shadow: 0 0 0 18px rgba(194, 147, 47, 0); }
}
.flash { animation: flashRing 1.1s var(--ease) 2; border-radius: var(--radius); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
