/* ============================================================
   moosehaus.io — components
   Styles for the reusable pieces: header, footer, credenza
   cards, the front door, starbursts, and page heroes.
   Requires: tokens.css, base.css
   ============================================================ */

/* ---------- site header (<mh-header>) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--outline);
}
.site-header .nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: var(--heading);
}
.wordmark .dot { color: var(--orange); }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.10em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}
.nav-links a:not(.btn):hover { border-color: var(--orange); color: var(--accent-deep); }
.nav-links a[aria-current="page"] {
  border-color: var(--mustard);
  color: var(--accent-deep);
}

/* ---------- theme toggle (<mh-theme-toggle>) ---------- */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--outline);
  background: transparent;
  color: var(--heading);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--ease-snap), transform var(--ease-snap);
}
.theme-toggle:hover { background: var(--surface-deep); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ---------- page hero (interior pages) ---------- */
.page-hero { padding: 72px 0 56px; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero .lede { margin-bottom: 0; }

/* ---------- home hero ---------- */
.hero { position: relative; padding: 88px 0 140px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; position: relative; }
.moose-badge { width: min(340px, 80%); aspect-ratio: 1; position: relative; }
.moose-badge svg { width: 100%; height: 100%; }

/* ---------- starbursts ---------- */
.starburst { position: absolute; color: var(--mustard); pointer-events: none; }
.starburst svg.spin { animation: spin-slow 60s linear infinite; transform-origin: center; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.starburst.sb-1 { top: 6%; right: 4%; width: 74px; }
.starburst.sb-2 { bottom: 14%; left: 2%; width: 52px; color: var(--sage); }
.starburst.sb-3 { top: 40%; right: -14px; width: 40px; color: var(--orange); }

/* ---------- credenza cards (on hairpin legs) ---------- */
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.credenza { position: relative; padding-bottom: 40px; }
.credenza .card {
  position: relative;
  background: var(--surface);
  border: var(--border-heavy);
  border-radius: var(--radius-card);
  padding: 30px 26px 26px;
  height: 100%;
  box-shadow: var(--shadow-card);
  transition: transform var(--ease-lift), box-shadow var(--ease-lift);
}
.credenza:hover .card {
  transform: translateY(-6px);
  box-shadow: 8px 12px 0 var(--shadow-tint);
}
.credenza::before, .credenza::after {
  content: "";
  position: absolute; bottom: 2px;
  width: 3px; height: 38px;
  background: var(--outline);
  border-radius: 2px;
  transform-origin: bottom center;
  z-index: -1;
}
.credenza::before { left: 14%; transform: rotate(14deg); }
.credenza::after  { right: 14%; transform: rotate(-14deg); }

.card .room-no {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 18px;
}
.card .glyph {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-bottom: 20px;
  border: var(--border-heavy);
}
.glyph.g-orange  { background: var(--orange); }
.glyph.g-green   { background: var(--forest); }
.glyph.g-mustard { background: var(--mustard); }

.card h3 { margin-bottom: 4px; }
.card .room-sub {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  margin-bottom: 14px;
}
.card > p { font-size: 0.98rem; color: var(--text-secondary); margin-bottom: 18px; }

.card-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.card-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--link-green);
  display: inline-flex; align-items: center; gap: 8px;
}
.card-links a::before {
  content: "→";
  color: var(--orange);
  transition: transform var(--ease-snap);
}
.card-links a:hover { color: var(--accent-deep); }
.card-links a:hover::before { transform: translateX(4px); }

/* ---------- the front door (SSO panel) ---------- */
.fd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 64px;
  align-items: center;
}
.fd-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 34px; }
.fd-list li { display: flex; gap: 12px; align-items: baseline; color: var(--on-forest-soft); }
.fd-list li::before { content: "◆"; color: var(--mustard); font-size: 0.7rem; }

.door {
  justify-self: center;
  width: 100%;
  max-width: 340px;
  background: var(--band-forest-deep);
  border: 2px solid var(--cream);
  border-radius: 16px;
  padding: 34px 30px 30px;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.25);
}
.door .peephole {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--cream);
  display: grid; place-items: center;
  margin: 0 auto 20px;
}
.door h3 { text-align: center; margin-bottom: 6px; }
.door p { text-align: center; font-size: 0.92rem; margin-bottom: 24px; }
.door .btn { width: 100%; text-align: center; }
.door .fineprint { margin-top: 16px; text-align: center; font-size: 0.78rem; color: var(--on-forest-faint); margin-bottom: 0; }

/* ---------- site footer (<mh-footer>) ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--cream);
  padding: 44px 0 36px;
  margin-top: auto;
}
.site-footer .foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.site-footer .wordmark { color: var(--cream); font-size: 1.2rem; }
.site-footer .wordmark .dot { color: var(--mustard); }
.foot-links { display: flex; gap: 22px; list-style: none; }
.foot-links a {
  font-family: var(--font-display);
  font-size: var(--text-small);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-decoration: none;
  color: #D8CDBB;
}
.foot-links a:hover { color: var(--mustard); }
.site-footer small { color: #A59882; font-size: 0.8rem; width: 100%; }

/* keep footer pinned to the bottom on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; }
  .moose-badge { width: min(240px, 70%); }
  .room-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .fd-grid { grid-template-columns: 1fr; }
  .door { justify-self: start; }
  .starburst.sb-3 { display: none; }
  .nav-links li:not(.keep) { display: none; }
}
