/* Real licensed brand fonts, self-hosted from /fonts (project root, alongside /assets).
   Playfair Display remains loaded as the fallback while these load / if a file is missing. */
@font-face{
  font-family:'Migra';
  src:url('../fonts/Migra-Extrabold.otf') format('opentype');
  font-weight:800;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:'Migra';
  src:url('../fonts/Migra-Extralight.otf') format('opentype');
  font-weight:200;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:'Glacial Indifference';
  src:url('../fonts/GlacialIndifference-Bold.otf') format('opentype');
  font-weight:700;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:'Glacial Indifference';
  src:url('../fonts/GlacialIndifference-Regular.otf') format('opentype');
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

:root{
  --red:#BC2217;
  --red-dark:#8f1a10;
  --ink:#2b2b2b;
  --ink-soft:rgba(0,0,0,0.65);
  --cream:#F7F4EF;
  --offwhite:#EDEDED;
  --line:rgba(0,0,0,0.12);
  --serif:'Migra', 'Playfair Display', Georgia, serif;
  --sans:'Glacial Indifference', 'Figtree', -apple-system, sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:var(--sans);color:var(--ink);background:var(--cream);line-height:1.6;}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
.wrap{max-width:1200px;margin:0 auto;padding:0 40px;}

/* Header */
header{position:fixed;top:0;left:0;right:0;z-index:50;background:rgba(247,244,239,0.96);backdrop-filter:blur(6px);border-bottom:1px solid var(--line);}
header .bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 40px;max-width:1200px;margin:0 auto;min-height:87px;box-sizing:border-box;}
.logo{display:flex;align-items:center;gap:12px;font-family:var(--serif);font-weight:800;font-size:1.05rem;letter-spacing:.2px;white-space:nowrap;}
.logo .mark{width:44px;height:44px;border-radius:50%;display:block;overflow:hidden;flex-shrink:0;}
.logo .mark img{width:100%;height:100%;object-fit:cover;}
nav ul{display:flex;gap:24px;list-style:none;font-size:.9rem;font-weight:700;white-space:nowrap;}
nav a{opacity:.85;transition:opacity .2s;}
nav a:hover{opacity:1;color:var(--red);}
.header-right{display:flex;align-items:center;gap:20px;flex-shrink:0;}
.social{display:flex;gap:14px;}
.social a{width:30px;height:30px;border:1px solid var(--line);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.8rem;color:var(--red);}
.social a svg{width:15px;height:15px;fill:currentColor;}
.lang-btn{font-size:.78rem;border:1px solid var(--line);border-radius:20px;padding:6px 14px;white-space:nowrap;background:none;cursor:pointer;font-family:inherit;color:var(--ink);display:inline-flex;gap:4px;transition:border-color .2s,background .2s;}
.lang-btn:hover{border-color:var(--red);}
.lang-btn span{opacity:.45;transition:opacity .2s,font-weight .2s;}
.lang-btn span.is-active{opacity:1;font-weight:700;color:var(--red);}
.mobile-nav-lang{margin:16px 32px 0;}

/* Music toggle: floating button, bottom-right, plays a looping ambient
   track. Autoplay-on-load isn't reliable (or good UX) — browsers block
   audible autoplay before any user interaction — so this is a plain
   click-to-play control instead. */
.music-toggle{position:fixed;right:24px;bottom:24px;width:52px;height:52px;border-radius:50%;background:var(--red);color:var(--cream);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,0.25);z-index:40;transition:background .2s,transform .2s;}
.music-toggle:hover{background:var(--red-dark);transform:scale(1.06);}
.music-toggle svg{width:20px;height:20px;fill:currentColor;}
.music-toggle .icon-pause{display:none;}
.music-toggle.is-playing .icon-play{display:none;}
.music-toggle.is-playing .icon-pause{display:block;}
.music-toggle.is-playing{animation:musicPulse 2s ease-in-out infinite;}
@keyframes musicPulse{0%,100%{box-shadow:0 4px 16px rgba(0,0,0,0.25);}50%{box-shadow:0 4px 20px rgba(188,34,23,0.45);}}
@media (max-width: 900px){ .music-toggle{right:16px;bottom:16px;width:46px;height:46px;} }
@media (prefers-reduced-motion: reduce){ .music-toggle.is-playing{animation:none;} }
.donate-btn{background:var(--red);color:#fff;padding:9px 20px;border-radius:24px;font-size:.85rem;font-weight:700;white-space:nowrap;}
.donate-btn:hover{background:var(--red-dark);}

/* Hamburger toggle — hidden on desktop, shown on mobile */
.hamburger{display:none;flex-direction:column;justify-content:center;gap:5px;width:32px;height:32px;flex-shrink:0;background:none;border:none;cursor:pointer;padding:0;}
.hamburger span{display:block;width:100%;height:2px;background:var(--ink);border-radius:2px;transition:transform .25s ease, opacity .25s ease;}
.hamburger.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.hamburger.is-open span:nth-child(2){opacity:0;}
.hamburger.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* Mobile nav overlay panel */
.mobile-nav{position:fixed;top:0;right:0;bottom:0;width:min(320px,85vw);background:var(--cream);z-index:60;transform:translateX(100%);transition:transform .35s cubic-bezier(.16,.8,.3,1);box-shadow:-8px 0 30px rgba(0,0,0,0.15);overflow-y:auto;}
.mobile-nav.is-open{transform:translateX(0);}
.mobile-nav-header{display:flex;justify-content:flex-end;padding:16px 20px;}
.mobile-nav-close{width:36px;height:36px;border:none;background:none;cursor:pointer;font-size:1.5rem;color:var(--ink);}
.mobile-nav ul{list-style:none;display:flex;flex-direction:column;padding:0 32px 32px;}
.mobile-nav a{display:block;padding:16px 0;font-family:var(--serif);font-weight:800;font-size:1.4rem;color:var(--ink);border-bottom:1px solid var(--line);}
.mobile-nav-social{display:flex;gap:14px;padding:8px 32px 32px;}
.mobile-nav-social .social-link{font-size:.85rem;font-weight:700;color:var(--red);border:1px solid var(--line);border-radius:20px;padding:8px 16px;}
.nav-scrim{position:fixed;inset:0;background:rgba(0,0,0,0.4);z-index:55;opacity:0;pointer-events:none;transition:opacity .35s ease;}
.nav-scrim.is-open{opacity:1;pointer-events:auto;}

.btn{display:inline-block;padding:13px 28px;border-radius:28px;font-size:.9rem;font-weight:700;transition:all .2s;}
.btn-solid{background:var(--red);color:#fff;}
.btn-solid:hover{background:var(--red-dark);}
.btn-outline{border:1.5px solid rgba(255,255,255,0.85);color:#fff;}
.btn-outline:hover{background:rgba(255,255,255,0.15);}

/* Photo placeholder — used across interior pages wherever real photography
   hasn't been supplied yet. Styled to read clearly as "photo goes here", not
   as a finished image, so it's obvious in review what still needs a real shot. */
.ph-photo{position:relative;aspect-ratio:4/3;border-radius:6px;background:rgba(188,34,23,0.06);border:1.5px dashed rgba(188,34,23,0.35);display:flex;align-items:center;justify-content:center;overflow:hidden;}
.ph-photo span{font-size:.8rem;font-weight:700;color:var(--red);text-align:center;padding:0 16px;letter-spacing:.02em;}
.ph-photo.ph-square{aspect-ratio:1/1;}
.ph-photo.ph-wide{aspect-ratio:16/9;}
/* On dark sections, the faint red tint tuned for cream backgrounds reads as
   muddy brown instead of a clean placeholder — swap to a light tint instead. */
.dark-section .ph-photo{background:rgba(242,237,230,0.08);border-color:rgba(232,168,154,0.5);}
.dark-section .ph-photo span{color:#e8a89a;}

/* Dark solid section — used on interior pages for Mission & Vision-style
   content blocks. Deliberately separate from the homepage's own .meaning
   class (which has homepage-specific grid/layout rules that live in
   index.html, not here) so any page can use this without dragging in
   assumptions about a two-column serpent-banner layout it doesn't have.
   Must stay fully opaque — the fixed seal watermark sits behind every page
   at z-index:0, and a transparent background here would let it bleed through
   unblocked and collide with the text. */
.dark-section{position:relative;background:var(--ink);color:#f2ede6;padding:110px 0;overflow:hidden;}
.dark-section .kicker{color:#e8a89a;}
.dark-section .section-title{color:#fff;}
.dark-section .section-body{color:rgba(242,237,230,0.8);}
.dark-section .underline-accent path{stroke:#e8a89a;}
.dark-section .term{border-left:2px solid var(--red);padding-left:20px;}
.dark-section .term .word{font-family:var(--serif);font-size:1.6rem;font-weight:800;color:#fff;margin-bottom:4px;letter-spacing:-.005em;}
.dark-section .term .def{font-size:1.2rem;line-height:1.7;color:rgba(242,237,230,0.75);}
/* Fallback for any plain <p> placed directly inside a dark section without a
   more specific class — without this, a bare <p> silently inherits body{}'s
   var(--ink) (near-black) and becomes illegible against the dark background.
   Page-specific component classes (.consideration p, .element-item p, etc.)
   still take precedence via specificity when they set their own color. */
.dark-section p{color:rgba(242,237,230,0.8);font-size:1.2rem;line-height:1.7;}
@media (max-width: 700px){
  .dark-section .terms-grid{grid-template-columns:1fr !important;gap:32px !important;}
}

/* Solid red call-to-action band — reused across interior pages */
.cta-band{background:var(--red);color:#fff;text-align:center;}
.cta-band h2{font-family:var(--serif);font-weight:800;font-size:clamp(2rem,4.5vw,2.8rem);}
.cta-band p{max-width:560px;margin:18px auto 0;opacity:.92;}
.cta-band .btn{margin-top:28px;}

/* Interior-page banner — simplified hero (no video) for every page besides
   the homepage. Fixed header height (87px) means this needs enough top
   padding to clear it; kept generous since page titles vary in length. */
.page-banner{position:relative;padding:180px 0 90px;background:var(--ink);color:#fff;overflow:hidden;text-align:center;}
.page-banner .kicker{color:#e8a89a;}
.page-banner h1{font-family:var(--serif);font-weight:800;font-size:clamp(2.6rem,6vw,4.4rem);line-height:1.05;}
@media (max-width: 900px){ .page-banner{padding:150px 0 70px;} }

/* Section rhythm */
section{padding:110px 0;position:relative;}
.section-tight{padding:80px 0;}
.kicker{font-size:.8rem;letter-spacing:.14em;text-transform:uppercase;color:var(--red);font-weight:700;margin-bottom:18px;text-align:center;}
.eyebrow{font-size:.85rem;letter-spacing:.16em;text-transform:uppercase;font-weight:700;opacity:.9;margin-bottom:18px;}
.section-title{font-family:var(--serif);font-size:clamp(2.6rem,5.2vw,4.2rem);font-weight:800;text-align:center;max-width:900px;margin:0 auto;line-height:1.05;letter-spacing:-.01em;}
.section-body{text-align:center;max-width:640px;margin:28px auto 0;color:var(--ink-soft);font-size:1.2rem;line-height:1.7;}

/* Hand-drawn underline accent beneath section headings */
.underline-accent{display:block;margin:14px auto 0;width:120px;height:12px;opacity:.8;}
.underline-accent path{fill:none;stroke:var(--red);stroke-width:2.5;stroke-linecap:round;}

/* Coatl (serpent/movement): the official seal, fixed to the viewport and slowly
   turning like a stamp in motion. Sits beneath every section from "Meaning"
   through the footer, fading in once scrolled past and fading out at the very
   bottom of the page. z-index sits below section backgrounds but the sections
   themselves are transparent-background where this should show through. */
/* Split into two elements: outer handles fixed position + opacity fade
   (plain transition), inner handles the continuous rotation (CSS animation).
   Combining an infinite animation and a separate opacity transition on the
   SAME element caused the opacity change to be silently suppressed in testing —
   splitting them avoids that engine quirk entirely. */
@keyframes sealSpin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}
.seal-watermark{position:fixed;top:50%;left:50%;width:1600px;height:1600px;max-width:none;transform:translate(-50%,-50%);opacity:0;pointer-events:none;z-index:0;transition:opacity 1s ease;}
.seal-watermark.is-visible{opacity:.5;}
.seal-watermark img{width:100%;height:100%;object-fit:contain;animation:sealSpin 90s linear infinite;animation-play-state:paused;}
.seal-watermark.is-visible img{animation-play-state:running;}
@media (prefers-reduced-motion: reduce){ .seal-watermark img{animation:none;} }
@media (max-width: 900px){ .seal-watermark{width:400px;height:400px;} }

/* Small breathing-room strips between sections; fully transparent since the
   sections themselves now let the seal show through everywhere. */
.section-gap{height:64px;background:transparent;position:relative;z-index:0;}
@media (max-width: 900px){ .section-gap{height:40px;} }

/* Torn-edge section divider — jagged mask between color blocks.
   The container background must match the section ABOVE (being exited) so it
   blends with no seam; the SVG path fill matches the section BELOW (being entered)
   so the jagged peaks read as a visible cut, not a flat color-on-color block. */
.torn-edge{position:relative;height:48px;margin-top:-1px;margin-bottom:-1px;line-height:0;}
.torn-edge svg{width:100%;height:100%;display:block;position:relative;z-index:1;}
.torn-edge-to-dark{background:var(--cream);}
.torn-edge-to-light{background:var(--ink);}
/* Continue the tiled spiral texture from the section above through the divider so it doesn't cut off abruptly right before the jagged cut */
.torn-edge-to-dark::before{content:'';position:absolute;inset:0;background-image:url('../assets/web/For_site-480.png');background-repeat:repeat;background-size:160px auto;opacity:.05;z-index:0;}

/* Footer */
footer{position:relative;background:var(--ink);color:rgba(242,237,230,0.85);}
.footer-top{padding-top:60px;padding-bottom:40px;display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;border-bottom:1px solid rgba(255,255,255,0.1);}
.footer-brand .logo-f{display:flex;align-items:center;gap:12px;margin-bottom:16px;}
.footer-brand .mark{width:46px;height:46px;border-radius:50%;display:block;overflow:hidden;flex-shrink:0;}
.footer-brand .mark img{width:100%;height:100%;object-fit:cover;}
.footer-brand h4{font-family:var(--serif);font-weight:800;color:#fff;font-size:1.1rem;}
.footer-brand p{font-size:1rem;color:rgba(242,237,230,0.6);margin-top:8px;line-height:1.55;}
.footer-brand-tag{font-size:.95rem;color:rgba(242,237,230,0.5);margin-top:2px;}
.footer-col h5{color:#fff;font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;margin-bottom:16px;font-weight:700;}
.footer-col ul{list-style:none;display:flex;flex-direction:column;gap:10px;font-size:1.05rem;}
.footer-col a{color:rgba(242,237,230,0.75);}
.footer-col a:hover{color:#e8a89a;}
.footer-bottom{padding-top:22px;padding-bottom:22px;display:flex;justify-content:space-between;font-size:.9rem;color:rgba(242,237,230,0.55);flex-wrap:wrap;gap:10px;}
.footer-bottom a{color:rgba(242,237,230,0.55);margin-left:18px;}

@media (max-width: 900px){
  header .bar > nav{display:none;}
  .hamburger{display:flex;}
  header .bar{padding:14px 20px;}
  .logo{font-size:.92rem;}
  .logo .mark{width:38px;height:38px;}
  .header-right .social,.header-right .lang-btn{display:none;}
  .header-right{gap:12px;}
  .donate-btn{padding:8px 16px;font-size:.8rem;}
  .footer-top{grid-template-columns:1fr 1fr;}
}

@media (max-width: 480px){
  .footer-top{grid-template-columns:1fr;}
}

/* ===== MOTION SYSTEM ===== */
/* Ehecatl (wind): parallax drift — backgrounds move slower than foreground */
.parallax{will-change:transform;}

/* Kalpulli (gathering): elements converge into place from offset positions */
.reveal{opacity:0;transition:opacity .9s cubic-bezier(.16,.8,.3,1), transform .9s cubic-bezier(.16,.8,.3,1);}
.reveal-up{transform:translateY(48px);}
.reveal-left{transform:translateX(-40px);}
.reveal-right{transform:translateX(40px);}
.reveal-scale{transform:scale(.92);}
.reveal.is-visible{opacity:1;transform:translate(0,0) scale(1);}

/* Staggered children — gather in one after another */
.reveal-stagger > *{opacity:0;transform:translateY(36px);transition:opacity .8s cubic-bezier(.16,.8,.3,1), transform .8s cubic-bezier(.16,.8,.3,1);}
.reveal-stagger.is-visible > *{opacity:1;transform:translateY(0);}
.reveal-stagger.is-visible > *:nth-child(1){transition-delay:.05s;}
.reveal-stagger.is-visible > *:nth-child(2){transition-delay:.18s;}
.reveal-stagger.is-visible > *:nth-child(3){transition-delay:.31s;}

/* Coatl (serpent): the underline traces itself like a path being drawn */
.underline-accent path{stroke-dasharray:140;stroke-dashoffset:140;transition:stroke-dashoffset 1.1s cubic-bezier(.65,0,.35,1) .3s;}
.reveal.is-visible .underline-accent path{stroke-dashoffset:0;}

/* Torn edge: gentle ripple settle on scroll-in */
@keyframes rippleSettle{0%{transform:translateY(-6px);}100%{transform:translateY(0);}}
.torn-edge.is-visible svg{animation:rippleSettle 1s cubic-bezier(.34,1.56,.64,1);}

@media (prefers-reduced-motion: reduce){
  .reveal, .reveal-stagger > *, .underline-accent path, .torn-edge svg{
    transition:none !important; animation:none !important; opacity:1 !important; transform:none !important; stroke-dashoffset:0 !important;
  }
}

/* Headings: all caps (client request), except headings that contain quotation marks */
h1, h2, h3 { text-transform: uppercase; text-wrap: balance; overflow-wrap: break-word; }
h1.keep-case, h2.keep-case, h3.keep-case { text-transform: none; }
/* Capitals run wider than mixed case, so the big heading sizes come down a step. */
.section-title { font-size: clamp(1.9rem, 4.4vw, 3.5rem); max-width: 1040px; }
.page-banner h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
.cta-band h2 { font-size: clamp(1.7rem, 3.8vw, 2.4rem); }
