/* ============================================================
   The Heptadic Foundry — styles.css
   Palette: obsidian ground, arcane gold, resonant violet, ley cyan
   ============================================================ */

:root {
  --bg:        #0a0a0f;
  --bg-2:      #101019;
  --panel:     #14141f;
  --panel-2:   #191926;
  --ink:       #ece9f5;
  --ink-soft:  #a7a2c0;
  --ink-dim:   #6f6a8c;
  --line:      rgba(232, 200, 106, 0.14);
  --gold:      #e8c86a;
  --gold-hot:  #f6dd8f;
  --ember:     #f47a2b;
  --cyan:      #58e6d9;
  --glow-gold: rgba(232, 200, 106, 0.35);
  --glow-vio:  rgba(244, 122, 43, 0.28);
  --serif: "Cinzel", Georgia, serif;
  --sans:  "Space Grotesk", system-ui, sans-serif;
  --maxw: 1160px;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* background wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 700px at 78% -8%, var(--glow-vio), transparent 60%),
    radial-gradient(900px 600px at 10% 12%, rgba(88, 230, 217, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 60%, var(--bg));
}

#constellation {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--glow-gold); color: #1a1405; }

/* ---------- shared ---------- */
section { padding: clamp(4.5rem, 9vw, 8.5rem) clamp(1.25rem, 5vw, 3rem); }
.section-head { max-width: 820px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.9rem); }
.section-head .muted { color: var(--ink-dim); }
.section-sub { color: var(--ink-soft); margin-top: 1.1rem; font-size: 1.05rem; }

.grad {
  background: linear-gradient(100deg, var(--gold-hot), var(--gold) 40%, var(--ember));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn-primary {
  background: linear-gradient(100deg, var(--gold), var(--gold-hot));
  color: #1a1405;
  box-shadow: 0 0 0 0 var(--glow-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px var(--glow-gold); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem clamp(1.25rem, 5vw, 3rem);
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px var(--glow-gold)); }
.hept { fill: none; stroke: var(--gold); stroke-width: 4; }
.brand-seven { font-family: var(--serif); font-weight: 700; fill: var(--gold); font-size: 46px; text-anchor: middle; dominant-baseline: central; }
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; letter-spacing: 0.04em; }

.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a { font-size: 0.9rem; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 1.1rem; color: var(--gold) !important;
}
.nav-cta:hover { background: var(--glow-gold); color: #1a1405 !important; border-color: transparent; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: 0.3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 7rem;
  /* shared so the glyph and the Seed of Life stay perfectly concentric */
  --glyph-right: -6vw;
  --glyph-size: min(48vw, 620px);
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero-title {
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  margin: 0.6rem 0 1.4rem;
  letter-spacing: 0.005em;
}
.hero-sub { font-size: clamp(1.02rem, 1.7vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2.2rem 0 2.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.4rem; color: var(--ink-dim); font-size: 0.82rem; letter-spacing: 0.04em; }
.hero-badges span { position: relative; padding-left: 1rem; }
.hero-badges span::before { content: "◆"; position: absolute; left: 0; color: var(--gold); font-size: 0.6rem; top: 0.25em; }

/* ---- compute-your-number widget ---- */
.numberwidget {
  margin: 2.2rem 0 0;
  max-width: 460px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.3rem 1.4rem 1.2rem;
  position: relative; overflow: hidden;
}
.numberwidget::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(300px 120px at 80% -30%, var(--glow-gold), transparent 70%);
  opacity: 0.5;
}
.nw-label {
  font-family: var(--sans); font-weight: 500; font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.8rem; position: relative;
}
.nw-row { display: flex; gap: 0.6rem; position: relative; }
.nw-row input {
  flex: 1; min-width: 0;
  font-family: var(--sans); font-size: 0.98rem; font-weight: 300; color: var(--ink);
  background: rgba(10,10,15,0.6); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.9rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.nw-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,200,106,0.12); }
.nw-row .btn { padding: 0.7rem 1.3rem; }

.nw-display {
  margin-top: 1rem; text-align: center;
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 0.7rem 0.5rem; background: rgba(10,10,15,0.45);
  position: relative;
}
.nw-num {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.2rem, 8vw, 3.1rem);
  letter-spacing: 0.14em; line-height: 1;
  color: var(--gold); text-shadow: 0 0 26px var(--glow-gold);
  font-variant-numeric: tabular-nums;
  display: inline-block;
}
.nw-num.rolling { color: var(--ink-soft); text-shadow: none; }
.nw-num.six-figure { color: var(--gold-hot); animation: nw-pop 0.5s var(--ease); }
@keyframes nw-pop { 0% { transform: scale(0.9); } 55% { transform: scale(1.08); } 100% { transform: scale(1); } }
.nw-cap { margin-top: 0.75rem; font-size: 0.86rem; color: var(--ink-soft); position: relative; min-height: 1.2em; }
.nw-cap.special { color: var(--gold); font-family: var(--serif); }

.hero-glyph {
  position: absolute; right: var(--glyph-right); top: 50%; transform: translateY(-50%);
  width: var(--glyph-size); aspect-ratio: 1; z-index: 1;
  opacity: 0.09; pointer-events: none;
  filter: drop-shadow(0 0 40px var(--glow-vio));
}
.hero-glyph svg { width: 100%; height: 100%; overflow: visible; }

/* ---- sacred-geometry backdrop ---- */
.hero-sacred { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: 0.7; }
.sg { position: absolute; height: auto; }
.sg * {
  fill: none;
  stroke: var(--sg, rgba(232, 200, 106, 0.12));
  stroke-width: 1;
  vector-effect: non-scaling-stroke;   /* stay crisp & faint at any scale */
}
.sg-seed {
  --sg: rgba(232, 200, 106, 0.10);
  top: 50%; right: var(--glyph-right); transform: translateY(-50%);
  width: var(--glyph-size);   /* same box as .hero-glyph → concentric */
}
.sg-star1 {
  --sg: rgba(232, 200, 106, 0.15);
  top: 8%; left: 3%; width: clamp(120px, 15vw, 190px);
  animation: sg-spin 120s linear infinite;
}
.sg-star2 {
  --sg: rgba(88, 230, 217, 0.13);
  bottom: 13%; right: 15%; width: clamp(90px, 11vw, 150px);
  animation: sg-spin 90s linear infinite reverse;
}
.sg-rings {
  --sg: rgba(244, 122, 43, 0.11);
  top: -130px; left: -100px; width: clamp(260px, 34vw, 460px);
  animation: sg-spin 200s linear infinite;
}
.sg-vesica {
  --sg: rgba(88, 230, 217, 0.10);
  bottom: 5%; left: 1%; width: clamp(150px, 20vw, 260px);
}
@keyframes sg-spin { to { transform: rotate(360deg); } }

.wire { fill: none; stroke: rgba(236, 233, 245, 0.22); stroke-width: 1.4; }
.wire.faint { stroke: rgba(244, 122, 43, 0.38); }
.wire.gold { stroke: var(--gold); stroke-width: 1.8; filter: drop-shadow(0 0 6px var(--glow-gold)); }
.core { fill: var(--gold); filter: drop-shadow(0 0 12px var(--gold)); }

/* rotation is driven by requestAnimationFrame in script.js (sets the group's
   `transform` attribute) — reliable and centered across all browsers */

.scroll-cue {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  color: var(--ink-dim); font-size: 1.3rem; animation: bob 2.2s ease-in-out infinite; z-index: 2;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
  overflow: hidden;
  font-family: var(--serif); letter-spacing: 0.18em; font-size: 0.85rem;
  color: var(--ink-dim);
}
/* two identical groups; translating exactly -50% lands group 2 where group 1
   began. Each group's trailing padding equals the internal gap, so the seam
   between copies is indistinguishable from every other gap → seamless loop. */
.marquee-track {
  display: flex; width: max-content;
  animation: marquee var(--marquee-dur, 38s) linear infinite;
}
.marquee-group {
  flex: none;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem 2rem 0.9rem 0;
  white-space: nowrap;
}
.marquee-group span:nth-child(even) { color: var(--gold); }
/* --marquee-shift is set by script.js to exactly one group's width; the -50%
   fallback keeps a reasonable loop if JS is disabled. */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); } }

/* ============================================================
   DOCTRINE
   ============================================================ */
.doctrine { max-width: var(--maxw); margin: 0 auto; }
.doctrine-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 960px; margin: 0 auto; align-items: start;
}
.doctrine-grid .lead {
  grid-column: 1 / -1;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.4;
  color: var(--ink);
}
.doctrine-grid p { color: var(--ink-soft); }
.doctrine-grid strong { color: var(--gold); font-weight: 500; }
.doctrine-grid em { color: var(--cyan); font-style: italic; }

/* ============================================================
   PILLARS
   ============================================================ */
.pillars { max-width: var(--maxw); margin: 0 auto; }
.pillar-accordion { max-width: 900px; margin: 0 auto; display: grid; gap: 0.7rem; }
.pillar-item {
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.pillar-item.open { border-color: var(--gold); box-shadow: 0 18px 50px -34px var(--glow-gold); }

.pillar-head {
  width: 100%; cursor: pointer; text-align: left;
  background: none; border: 0; color: inherit; font: inherit;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 0.4rem 1.1rem;
  padding: 1.15rem 1.35rem;
  transition: background 0.25s;
}
.pillar-head:hover { background: rgba(232,200,106,0.05); }
.pillar-head:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.pillar-num {
  grid-row: span 2;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700;
  color: var(--gold); letter-spacing: 0.06em;
  border: 1px solid var(--line); border-radius: 8px;
  width: 3.25rem; box-sizing: border-box; padding: 0.3rem 0;
  text-align: center;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.pillar-item.open .pillar-num { background: var(--gold); color: #1a1405; border-color: var(--gold); }

.pillar-title { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; align-self: end; }
.pillar-lead { color: var(--ink-soft); font-size: 0.88rem; align-self: start; }

.pillar-chev {
  grid-row: span 2; align-self: center;
  width: 12px; height: 12px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(45deg); transition: transform 0.35s var(--ease);
}
.pillar-item.open .pillar-chev { transform: rotate(-135deg); }

/* the collapse itself: animate the grid row from 0fr to 1fr for a smooth open */
.pillar-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.pillar-item.open .pillar-panel { grid-template-rows: 1fr; }
.pillar-panel-inner { overflow: hidden; }
.pillar-panel-inner p {
  color: var(--ink-soft); font-size: 0.98rem; line-height: 1.7;
  /* align text with the title: numeral width + column gap + head padding */
  padding: 0 1.35rem 1.35rem calc(3.25rem + 1.1rem + 1.35rem);
  max-width: 74ch;
}

.pillar-key { background: linear-gradient(100deg, rgba(232,200,106,0.08), var(--panel-2)); border-color: rgba(232,200,106,0.3); }

/* ============================================================
   PLATFORM
   ============================================================ */
.platform { max-width: var(--maxw); margin: 0 auto; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.product {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.8rem 1.6rem; display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.product:hover { transform: translateY(-6px); border-color: rgba(244,122,43,0.5); box-shadow: 0 24px 60px -34px var(--glow-vio); }
.product-feature { border-color: rgba(232,200,106,0.32); background: linear-gradient(180deg, rgba(232,200,106,0.06), var(--panel-2)); }
.product-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.prod-icon { width: 40px; height: 40px; }
.prod-icon polygon { fill: none; stroke: var(--gold); stroke-width: 2; }
.prod-icon path, .prod-icon line { stroke: var(--cyan); stroke-width: 2; fill: none; }
.prod-icon circle { fill: none; stroke: var(--ember); stroke-width: 2; }
.tag {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.tag-gold { color: var(--gold); border-color: rgba(232,200,106,0.4); }
.product h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.product > p { color: var(--ink-soft); font-size: 0.95rem; }
.feat { list-style: none; margin-top: 1.2rem; display: grid; gap: 0.55rem; }
.feat li { position: relative; padding-left: 1.5rem; font-size: 0.9rem; color: var(--ink); }
.feat li::before {
  content: "7"; position: absolute; left: 0; top: -1px;
  font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 0.85rem;
}

/* ============================================================
   METRICS
   ============================================================ */
.metrics {
  max-width: var(--maxw); margin: 0 auto;
}
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.metric {
  text-align: center; padding: 2rem 1rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(255,255,255,0.015);
}
.metric-value {
  display: block;
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  color: var(--gold);
  text-shadow: 0 0 30px var(--glow-gold);
  line-height: 1;
}
.metric-label { display: block; margin-top: 0.7rem; color: var(--ink-soft); font-size: 0.86rem; letter-spacing: 0.02em; }

/* ============================================================
   FOUNDRY / ABOUT
   ============================================================ */
.foundry {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.foundry-copy h2 { margin: 0.5rem 0 1.2rem; }
.foundry-copy p { color: var(--ink-soft); margin-bottom: 1rem; }
.values { display: grid; gap: 0.9rem; margin-top: 2rem; }
.value { display: flex; align-items: center; gap: 1rem; }
.value span { font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 1rem; min-width: 2ch; }
.value p { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 1.02rem; }
.foundry-art svg { width: 100%; overflow: visible; filter: drop-shadow(0 0 30px var(--glow-vio)); }
.spoke { stroke: rgba(244,122,43,0.35); stroke-width: 1; }

/* ============================================================
   QUOTE BAND
   ============================================================ */
.quote-band {
  text-align: center; max-width: 900px; margin: 0 auto;
  border-block: 1px solid var(--line);
}
.quote-band blockquote {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.4rem, 3.2vw, 2.2rem); line-height: 1.4;
}
.quote-band em { color: var(--gold); font-style: italic; }
.quote-band cite { display: block; margin-top: 1.4rem; color: var(--ink-dim); font-style: normal; font-size: 0.92rem; letter-spacing: 0.05em; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { max-width: 820px; margin: 0 auto; }
.contact-inner { text-align: center; }
.attune-form {
  margin-top: 2.6rem; text-align: left;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 2.6rem);
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-full { grid-column: 1 / -1; }
label { font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; }
input, select, textarea {
  font-family: var(--sans); font-size: 0.98rem; font-weight: 300;
  color: var(--ink); background: rgba(10,10,15,0.6);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0.8rem 0.95rem; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232,200,106,0.12);
}
select option { background: var(--bg-2); }
.form-foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.3rem; }
.form-note { color: var(--ink-soft); font-family: var(--serif); font-style: italic; font-size: 0.98rem; margin: 0; }

/* ---- physical location card ---- */
.lab-card {
  margin-top: 1.4rem; text-align: left;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r);
  border-left: 3px solid var(--gold);
  padding: clamp(1.3rem, 3vw, 1.9rem);
}
.lab-copy h3 { font-size: 1.35rem; margin: 0.3rem 0 0.7rem; }
.lab-copy address { font-style: normal; color: var(--ink-soft); line-height: 1.9; }
.footer-addr { display: block; margin-top: 0.5rem; color: var(--ink-dim); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 5vw, 3rem) 2rem; background: var(--bg-2); }
.footer-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem;
}
.footer-brand .brand-mark { width: 44px; height: 44px; margin-bottom: 0.8rem; }
.footer-brand p { font-family: var(--serif); font-size: 1.15rem; }
.footer-brand small { color: var(--ink-dim); }
.footer-col h4 { font-family: var(--sans); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--ink-soft); font-size: 0.92rem; padding: 0.28rem 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bar {
  max-width: var(--maxw); margin: 3rem auto 0; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  color: var(--ink-dim); font-size: 0.82rem;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .product-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .foundry { grid-template-columns: 1fr; }
  .foundry-art { max-width: 360px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .doctrine-grid { grid-template-columns: 1fr; }

  .nav-links {
    position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column;
    background: rgba(10,10,15,0.97); backdrop-filter: blur(16px);
    padding: 5.5rem 2rem 2rem; gap: 1.4rem; align-items: flex-start;
    transform: translateY(-100%); transition: transform 0.4s var(--ease);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; z-index: 60; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { --glyph-right: -20vw; }
  .hero-glyph { opacity: 0.09; }
  .sg-star2, .sg-vesica { display: none; }
  .sg-star1 { top: 4%; }
}

@media (max-width: 560px) {
  .pillar-lead { display: none; }
  .pillar-head { grid-template-columns: auto 1fr auto; align-items: center; }
  .pillar-num { grid-row: auto; }
  .pillar-chev { grid-row: auto; }
  .pillar-panel-inner p { padding-left: 1.35rem; }
  .numberwidget { max-width: 100%; }
  .nw-row { flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }
  .attune-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

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

/* ============================================================
   NOSDARETH MODAL + WADJET EYE
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(60% 60% at 50% 40%, rgba(20,10,0,0.55), rgba(5,5,9,0.9));
  backdrop-filter: blur(7px);
}
.modal-overlay.open { display: flex; animation: overlay-in 0.35s ease; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative; text-align: center; width: 100%; max-width: 430px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(232,200,106,0.4); border-radius: var(--r);
  padding: 3rem 2.6rem 2.6rem;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,0.8), 0 0 70px -12px var(--glow-gold);
  animation: modal-in 0.5s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(0.94); } to { opacity: 1; transform: none; } }

.modal-close {
  position: absolute; top: 0.7rem; right: 0.9rem;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-dim); font-size: 1.7rem; line-height: 1;
  transition: color 0.2s, transform 0.2s;
}
.modal-close:hover { color: var(--gold); transform: rotate(90deg); }

.wadjet-wrap { display: flex; justify-content: center; margin-bottom: 0.4rem; }
.wadjet { width: 150px; height: auto; animation: wj-float 4.5s ease-in-out infinite; }
.wadjet .wj { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.wadjet .wj-fill { fill: var(--gold); }
.wadjet { filter: drop-shadow(0 0 14px var(--glow-gold)); }
@keyframes wj-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.hail-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.8rem, 6vw, 2.6rem); letter-spacing: 0.06em;
  margin: 0.6rem 0 0.5rem;
  background: linear-gradient(100deg, var(--gold-hot), var(--gold) 55%, var(--ember));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hail-sub { color: var(--ink-soft); font-size: 0.95rem; letter-spacing: 0.04em; margin: 0; }

.cast-mark { display: flex; justify-content: center; margin-bottom: 0.4rem; }
.cast-mark svg { width: 74px; height: 74px; filter: drop-shadow(0 0 12px var(--glow-gold)); animation: wj-float 4.5s ease-in-out infinite; }
.cast-mark polygon { fill: none; stroke: var(--gold); stroke-width: 4; }
.cast-mark text { fill: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 40px; text-anchor: middle; dominant-baseline: central; }
.modal-text { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6; margin: 0.3rem 0 0; }
