/* ═══════════════════════════════════════════════════════════════════
   shared.css — Canonical shell CSS for all Exstemplar pages.

   Load order: shared.css → inline <style> → theme.css
   Cascade: inline styles override shared, theme.css overrides both
            (theme.css intentionally loads last for mode overrides).

   This file consolidates the reset, :root vars, cursor, canvas,
   nav, menu overlay, and footer that used to be duplicated inline
   across ~25 pages (~260 lines each).

   New pages should link this and only inline page-specific CSS.
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #060202;
  --text: #EEE0C9;
  --maroon: #3D0000;
  --crimson: #7e1e25;
  --orange: #CC4400;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hind", sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* Custom cursor */
#cursor {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
#cursor-ring {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(238,224,201,.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}
@media (hover: none) {
  #cursor, #cursor-ring { display: none; }
  body { cursor: auto; }
}

/* Background star canvas */
#star-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Nav bar */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.4rem;
  background: linear-gradient(to bottom, rgba(6,2,2,.95), transparent);
}
#nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: none;
}
#nav-logo img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

/* Menu (hamburger) button */
#menu-btn {
  background: none;
  border: 1px solid rgba(238,224,201,.22);
  color: var(--text);
  cursor: none;
  padding: .3rem .55rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: "Hind", sans-serif;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: border-color .3s;
}
#menu-btn:hover { border-color: var(--crimson); }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar { width: 18px; height: 1px; background: var(--text); }

/* Menu overlay */
#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s, visibility .5s;
}
#menu-overlay.open { opacity: 1; visibility: visible; }
#menu-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 38%, rgba(126,30,37,.22) 0%, rgba(61,0,0,.1) 45%, transparent 72%);
  pointer-events: none;
  z-index: 1;
}
#menu-star-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
#menu-close {
  position: absolute;
  top: 1.4rem;
  right: 2.4rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: none;
  opacity: .45;
  transition: opacity .3s;
  font-family: "Hind", sans-serif;
  z-index: 2;
}
#menu-close:hover { opacity: 1; }
#menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  position: relative;
  z-index: 2;
}
#menu-links a {
  font-family: "Hind", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  opacity: .7;
  transition: opacity .3s, color .3s, text-shadow .3s;
  cursor: none;
}
#menu-links a:hover, #menu-links a.active {
  opacity: 1;
  color: var(--crimson);
  text-shadow: 0 0 40px rgba(126,30,37,.5);
}
#menu-sub {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 2;
}
#menu-sub a {
  font-family: "Hind", sans-serif;
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  opacity: .2;
  transition: opacity .3s;
  cursor: none;
}
#menu-sub a:hover { opacity: .6; }

/* Page hero (standard subpage header) */
#page { position: relative; z-index: 10; padding-top: 11rem; }
.page-hero {
  padding: 5rem 2.4rem 4rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp .9s ease .2s forwards;
}
.page-label {
  font-family: "Hind", sans-serif;
  font-size: .62rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--crimson);
  opacity: .95;
  margin-bottom: 1.2rem;
}
.page-hero h1 {
  font-family: "Cardo", serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.02em;
  margin-bottom: 1.4rem;
}
.page-hero h1 em { font-style: italic; color: var(--crimson); }
.page-hero p {
  font-family: "Hind", sans-serif;
  font-size: 1.1rem;
  line-height: 1.85;
  opacity: .88;
  font-weight: 300;
  max-width: 640px;
  margin: 0 auto;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Common structural utilities */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(238,224,201,.12), transparent);
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.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;
}

/* Footer — shared shell */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(238,224,201,.06);
}
.f-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 3rem;
}
.f-brand-col { display: flex; flex-direction: column; gap: .8rem; }
.f-logo img { max-width: 190px; width: 100%; height: auto; opacity: .88; }
.f-tagline {
  font-family: "Cardo", serif;
  font-style: italic;
  font-size: .85rem;
  line-height: 1.75;
  opacity: .55;
  margin: 0;
}
.f-tagline-mobile {
  display: none;
  font-family: "Cardo", serif;
  font-style: italic;
  font-size: .9rem;
  line-height: 1.6;
  opacity: .55;
  text-align: center;
  margin: 0;
}
.f-newsletter { display: flex; gap: .35rem; }
.f-newsletter input {
  flex: 1;
  height: 1.8rem;
  background: rgba(238,224,201,.06);
  border: 1px solid rgba(238,224,201,.12);
  border-radius: 2px;
  color: var(--text);
  font-family: "Hind", sans-serif;
  font-size: .75rem;
  padding: 0 .6rem;
  outline: none;
  transition: border-color .3s;
}
.f-newsletter input::placeholder { color: var(--text); opacity: .3; }
.f-newsletter input:focus { border-color: var(--crimson); }
.f-newsletter button {
  height: 1.8rem;
  padding: 0 .7rem;
  background: var(--crimson);
  border: none;
  border-radius: 2px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-family: "Hind", sans-serif;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: opacity .3s;
}
.f-newsletter button:hover { opacity: .85; }
.f-sub-text { display: none; }
.f-social { display: flex; gap: .8rem; }
.f-social a {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(238,224,201,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: .5;
  transition: opacity .3s;
  text-decoration: none;
}
.f-social a:hover { opacity: .85; }
.f-nav-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
.f-nav-col { display: flex; flex-direction: column; gap: .35rem; }
.f-col-title {
  font-family: "Hind", sans-serif;
  font-size: .55rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .35;
  display: block;
  margin-bottom: .5rem;
}
.f-nav-col a, .f-nav-col p {
  font-family: "Hind", sans-serif;
  font-size: .85rem;
  opacity: .65;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: opacity .3s;
  font-weight: 300;
  margin: 0;
  line-height: 1.55;
}
.f-nav-col a:hover { opacity: 1; }
.f-nav-mobile { display: none; }
.f-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(238,224,201,.06);
  padding: .9rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}
.f-copy {
  font-family: "Hind", sans-serif;
  font-weight: 300;
  font-size: .72rem;
  letter-spacing: .02em;
  opacity: .3;
}
.f-legal { display: flex; gap: 1.2rem; }
.f-legal a {
  font-family: "Hind", sans-serif;
  font-weight: 400;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .38;
  color: var(--text);
  text-decoration: none;
  transition: opacity .3s;
}
.f-legal a:hover { opacity: .75; }

@media (min-width: 961px) {
  .f-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-areas: "brand nav" "bottom bottom";
    gap: 0;
    padding-top: 2.8rem;
    padding-bottom: 0;
  }
  .f-brand-col {
    grid-area: brand;
    padding: 0 2.5rem 2rem 0;
    border-right: 1px solid rgba(238,224,201,.06);
  }
  .f-nav-grid {
    grid-area: nav;
    padding: 0 0 2rem 2.5rem;
    align-content: start;
  }
  .f-bottom {
    grid-area: bottom;
    grid-column: 1 / -1;
  }
}
@media (max-width: 960px) {
  .f-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.8rem 1.2rem;
  }
  .f-brand-col {
    align-items: center;
    padding-bottom: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(238,224,201,.06);
    width: 100%;
  }
  .f-tagline { display: none; }
  .f-tagline-mobile { display: block; }
  .f-newsletter { max-width: 280px; }
  .f-sub-text { display: inline; }
  .f-arrow { display: none; }
  .f-social a { width: 24px; height: 24px; }
  .f-nav-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
  }
  .f-nav-col { align-items: center; }
  .f-nav-col:last-child { display: none; }
  .f-bottom {
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    width: 100%;
  }
  .f-legal { justify-content: center; }
}
@media (max-width: 600px) {
  .f-inner { padding: 2.2rem 1.4rem 1.2rem; }
  .f-newsletter { max-width: 100%; }
  .f-newsletter input { height: 2rem; font-size: .8rem; }
  .f-newsletter button { height: 2rem; padding: 0 .9rem; }
  .f-social a { width: 28px; height: 28px; }
  .f-nav-grid { display: none; }
  .f-nav-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1.2rem;
    width: 100%;
  }
  .f-nav-mobile a {
    font-family: "Hind", sans-serif;
    font-size: .85rem;
    opacity: .55;
    color: var(--text);
    text-decoration: none;
    transition: opacity .3s;
  }
  .f-nav-mobile a:hover { opacity: 1; }
}
@media (max-width: 768px) {
  #nav { padding: 1.1rem 1.4rem; }
  .page-hero { padding: 3.5rem 1.4rem 3rem; }
}
