/* ============================================================
   moosehaus.io — base
   Reset, typography, buttons, and utilities shared by all pages.
   Requires: tokens.css
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--mustard); color: var(--walnut); }

a { color: inherit; }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

.section { padding: var(--section-y) 0; }

/* dark green band (SSO section, callouts) */
.band-forest {
  background: var(--band-forest);
  color: var(--on-forest);
  position: relative;
  overflow: hidden;
}
.band-forest h1, .band-forest h2, .band-forest h3 { color: var(--on-forest); }
.band-forest p { color: var(--on-forest-soft); }

/* clerestory window strip along the top of a forest band */
.band-forest.clerestory::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    var(--mustard) 0 64px,    var(--band-forest-deep) 64px 72px,
    var(--sage) 72px 136px,   var(--band-forest-deep) 136px 144px,
    var(--orange) 144px 208px, var(--band-forest-deep) 208px 216px
  );
  opacity: 0.85;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.1;
}
h1 { font-weight: 700; font-size: var(--text-hero); letter-spacing: -0.01em; }
h2 { font-weight: 700; font-size: var(--text-h2); }
h3 { font-weight: 600; font-size: var(--text-h3); }

.lede { font-size: var(--text-lede); color: var(--text-secondary); max-width: 46ch; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 42px; height: 3px;
  background: var(--mustard);
  border-radius: 2px;
}

/* highlighted word in a heading */
.hl {
  font-style: normal;
  color: var(--orange);
  position: relative;
  white-space: nowrap;
}
.hl::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 6px;
  height: 0.14em;
  background: var(--mustard);
  z-index: -1;
  border-radius: 3px;
}

.section-head { max-width: 60ch; margin-bottom: 64px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); font-size: 1.05rem; }
.band-forest .section-head p { color: var(--on-forest-soft); }

/* long-form article text (blog posts, résumé, wiki) */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.7rem; margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.25rem; margin: 1.8em 0 0.5em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1em; color: var(--text-secondary); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose a { color: var(--accent-deep); text-decoration-color: var(--mustard); text-underline-offset: 3px; }
.prose a:hover { color: var(--orange); }
.prose code {
  font-size: 0.9em;
  background: var(--surface-deep);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}
.prose pre {
  background: var(--forest-deep);
  color: var(--on-forest);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 1.2em;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  border-left: 4px solid var(--mustard);
  padding-left: 20px;
  font-style: italic;
  margin-bottom: 1em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--outline);
  cursor: pointer;
  transition: transform var(--ease-snap), box-shadow var(--ease-snap), background var(--ease-snap);
}
.btn-orange {
  background: var(--orange);
  color: var(--cream);
  border-color: var(--orange-deep);
  box-shadow: var(--shadow-btn);
}
.btn-orange:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--shadow-ink); }

.btn-green {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest-deep);
  box-shadow: var(--shadow-btn);
}
.btn-green:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--shadow-ink); }

.btn-ghost {
  background: transparent;
  color: var(--heading);
  box-shadow: 3px 3px 0 var(--shadow-tint);
}
.btn-ghost:hover { background: var(--surface-deep); }

.btn-cream {
  background: var(--cream);
  color: var(--forest-deep);
  border-color: var(--cream);
  box-shadow: 3px 3px 0 var(--forest-deep);
}
.btn-cream:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--forest-deep); }

/* ---------- small bits ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-deep);
  color: var(--heading);
  border: 1.5px solid var(--outline);
  vertical-align: middle;
}

/* zig-zag roofline divider between sections */
.roofline {
  height: 64px;
  background: var(--forest);
  clip-path: polygon(0 100%, 0 62%, 12% 30%, 26% 62%, 40% 12%, 55% 62%, 68% 26%, 82% 62%, 100% 20%, 100% 100%);
  opacity: var(--roofline-opacity);
  margin-top: -64px;
  pointer-events: none;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  .spin { animation: none !important; }
}
