:root {
  --night-0: #06101f;
  --night-1: #0a1628;
  --night-2: #11213b;
  --night-3: #1a2f52;
  --silver-0: #e8ebf0;
  --silver-1: #c8cdd6;
  --silver-2: #8a93a3;
  --silver-3: #5a6275;
  --ivory: #f4f1e8;
  --gold: #c9a96a;
  --gold-dim: #8a7444;
  --bg: var(--night-1);
  --fg: var(--silver-0);
  --muted: var(--silver-2);
  --accent: var(--gold);
  --rule: rgba(200, 205, 214, 0.18);
}
[data-mode="day"] {
  --bg: #f4f1e8;
  --fg: #1a2136;
  --muted: #5a6275;
  --rule: rgba(26, 33, 54, 0.18);
  --night-1: #f4f1e8;
  --night-2: #ebe6d6;
  --night-3: #e0d9c4;
  --silver-0: #1a2136;
  --silver-1: #3a4258;
  --silver-2: #5a6275;
  --silver-3: #8a93a3;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
}

/* ============ STARFIELD ============ */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.starfield canvas { display: block; width: 100%; height: 100%; }
[data-mode="day"] .starfield { opacity: 0.15; }

/* ============ LAYOUT ============ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 2;
}

/* ============ NAV ============ */
nav.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--rule);
  transition: background 0.6s ease;
}
nav.top .brand {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  letter-spacing: 0.22em;
  font-size: 13px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
}
nav.top .brand .sigil {
  width: 22px; height: 22px;
  display: inline-block;
}
nav.top ul {
  list-style: none;
  display: flex;
  gap: 34px;
  align-items: center;
}
nav.top a {
  color: var(--fg);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
  transition: letter-spacing 0.4s ease, color 0.3s ease;
}
nav.top a::before, nav.top a::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
nav.top a::before { right: 100%; margin-right: 8px; }
nav.top a::after { left: 100%; margin-left: 8px; }
nav.top a:hover {
  letter-spacing: 0.28em;
  color: var(--accent);
}
nav.top a:hover::before, nav.top a:hover::after { width: 14px; }

@media (max-width: 860px) {
  nav.top ul { display: none; }
}
nav.top .hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--fg);
  width: 34px;
  height: 34px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
nav.top .hamburger span {
  width: 16px;
  height: 1px;
  background: var(--fg);
  display: block;
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 150;
  padding: 88px 32px 40px;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-menu a:hover { color: var(--accent); }
@media (max-width: 860px) {
  nav.top .hamburger { display: flex; }
  nav.top { padding: 16px 24px; }
  .container { padding: 0 24px; }
  .hero { padding: 120px 24px 80px; }
  section { padding: 100px 0; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  nav.top { padding: 14px 20px; }
  nav.top .brand { font-size: 11px; letter-spacing: 0.18em; }
  .hero { padding: 110px 20px 70px; }
  section { padding: 80px 0; }
  .compass-wrap { width: 160px; height: 160px; margin-bottom: 36px; }
  .compass-core svg { width: 100px; height: 100px; }
  h2.section-title { font-size: 34px; margin-bottom: 32px; }
  .principio { padding: 32px 24px; }
  .grado-detail { padding: 28px; }
  .grado-detail h3 { font-size: 28px; }
  .ingreso-cta { padding: 32px 20px; }
  .ingreso-cta h3 { font-size: 24px; }
  form.tejo { padding: 28px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 300px; text-align: center; }
}

/* ============ FRATERNA ============ */
.fraterna-section {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}
.fraterna-card {
  border-radius: 14px;
  padding: 88px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 85% 10%, #f4c9ff 0%, #c8a6ff 35%, #9b7ef0 70%, #7a5bd6 100%);
  box-shadow: 0 30px 80px -20px rgba(123, 91, 214, 0.5);
}
.fraterna-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 90%, rgba(255,255,255,0.25), transparent 60%),
    radial-gradient(40% 60% at 80% 20%, rgba(255,255,255,0.3), transparent 60%);
  pointer-events: none;
}
.fraterna-card > * { position: relative; z-index: 2; }
.fraterna-card .kick {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.fraterna-card .kick::before, .fraterna-card .kick::after {
  content: '';
  width: 32px; height: 1px;
  background: rgba(255,255,255,0.7);
}
.fraterna-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(34px, 5.4vw, 60px);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}
.fraterna-card h2 strong {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: 'Cinzel', serif;
  font-size: 0.82em;
  display: inline-block;
  margin-right: 14px;
  vertical-align: 0.03em;
}
.fraterna-card .soon {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(28px, 4.2vw, 48px);
  color: rgba(255,255,255,0.95);
  margin-top: 8px;
  line-height: 1;
}
.fraterna-card .meta {
  margin-top: 40px;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
}
.fraterna-card .meta .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.25);
  animation: fraternaPulse 2.4s ease-in-out infinite;
}
@keyframes fraternaPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(255,255,255,0.25); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(255,255,255,0.08); }
}
@media (max-width: 480px) {
  .fraterna-card { padding: 56px 24px; }
  .fraterna-card h2 strong { display: block; margin-right: 0; margin-bottom: 6px; }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 140px 48px 100px;
  text-align: center;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 900px;
}

/* rotating compass symbol */
.compass-wrap {
  width: 220px;
  height: 220px;
  margin: 0 auto 56px;
  position: relative;
}
.compass-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  animation: spin 80s linear infinite;
}
.compass-orbit::before, .compass-orbit::after {
  content: '';
  position: absolute;
  background: var(--accent);
}
.compass-orbit::before {
  top: -3px; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  transform: translateX(-50%);
}
.compass-orbit::after {
  bottom: -3px; right: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  transform: translateX(50%);
}
.compass-orbit.inner {
  inset: 28px;
  animation: spinRev 120s linear infinite;
}
.compass-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.compass-core svg {
  width: 140px;
  height: 140px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinRev { to { transform: rotate(-360deg); } }

.kicker {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.kicker::before, .kicker::after {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
h1.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
h1.hero-title .ital {
  font-style: italic;
  font-weight: 300;
  color: var(--silver-1);
}
.hero-num {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--muted);
  margin: 28px 0 40px;
  text-transform: uppercase;
}
.hero-num span {
  display: inline-block;
  padding: 0 18px;
  position: relative;
}
.hero-num span::before, .hero-num span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--rule);
}
.hero-num span::before { right: 100%; }
.hero-num span::after { left: 100%; }

.hero-latin {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--muted);
  margin-bottom: 44px;
  letter-spacing: 0.04em;
}
.hero-cta {
  display: inline-flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============ BUTTONS ============ */
.btn {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 18px 38px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease, letter-spacing 0.4s ease;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
  z-index: -1;
}
.btn:hover {
  color: var(--night-1);
  letter-spacing: 0.34em;
}
[data-mode="day"] .btn:hover { color: #f4f1e8; }
.btn:hover::before { transform: scaleX(1); }
.btn.ghost {
  border-color: var(--rule);
  color: var(--fg);
}
.btn.ghost::before { background: var(--fg); }
.btn.ghost:hover { color: var(--bg); }

/* ============ SECTIONS ============ */
section {
  position: relative;
  padding: 140px 0;
  z-index: 2;
}
.section-label {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-label .num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--muted);
  letter-spacing: 0;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 180px;
}
h2.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.05;
  margin-bottom: 48px;
  letter-spacing: -0.005em;
  max-width: 900px;
}
h2.section-title em {
  font-weight: 300;
  color: var(--silver-1);
}

/* HISTORIA */
.historia {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.historia-col p {
  font-size: 17px;
  color: var(--silver-1);
  margin-bottom: 22px;
  max-width: 46ch;
}
.historia-col p:first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 58px;
  float: left;
  line-height: 0.9;
  padding: 6px 12px 0 0;
  color: var(--accent);
  font-weight: 500;
}
.historia-timeline {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
  margin-top: 8px;
}
.historia-timeline .tl-item {
  margin-bottom: 36px;
  position: relative;
}
.historia-timeline .tl-item::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 10px;
  width: 11px; height: 11px;
  background: var(--bg);
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}
.tl-year {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-bottom: 6px;
}
.tl-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  margin-bottom: 4px;
}
.tl-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 38ch;
}
@media (max-width: 860px) {
  .historia { grid-template-columns: 1fr; gap: 60px; }
}

/* PRINCIPIOS */
.principios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.principio {
  padding: 44px 36px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 0.4s ease;
}
.principio:hover { background: color-mix(in oklch, var(--accent) 4%, transparent); }
.principio .ord {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.principio h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 30px;
  margin-bottom: 14px;
  line-height: 1.1;
}
.principio h3 .lat {
  display: block;
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.principio p {
  font-size: 15px;
  color: var(--silver-1);
  line-height: 1.6;
}
@media (max-width: 860px) {
  .principios-grid { grid-template-columns: 1fr; }
}

/* GRADOS */
.grados {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 80px;
  align-items: start;
}
.grado-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}
.grado-list li {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 14px;
  transition: padding 0.3s ease;
}
.grado-list li:hover { padding-left: 10px; }
.grado-list li.active { padding-left: 10px; }
.grado-list .idx {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
}
.grado-list .name {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.grado-list li.active .name { color: var(--accent); }
.grado-list .arrow {
  color: var(--muted);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateX(-8px);
}
.grado-list li.active .arrow, .grado-list li:hover .arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.grado-detail {
  background: color-mix(in oklch, var(--fg) 3%, transparent);
  border: 1px solid var(--rule);
  padding: 56px;
  min-height: 440px;
  position: relative;
}
.grado-detail::before, .grado-detail::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid var(--accent);
}
.grado-detail::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.grado-detail::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.grado-detail .lat {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.grado-detail h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 44px;
  margin-bottom: 24px;
  line-height: 1;
}
.grado-detail p {
  color: var(--silver-1);
  font-size: 16px;
  max-width: 52ch;
  margin-bottom: 20px;
}
.grado-simbolo {
  display: flex;
  gap: 18px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.grado-simbolo span {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  padding: 8px 16px;
  border: 1px solid var(--rule);
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 860px) {
  .grados { grid-template-columns: 1fr; gap: 40px; }
  .grado-detail { padding: 36px; }
  .grado-detail h3 { font-size: 32px; }
}

/* MIEMBROS */
.miembros {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
.venerable-card {
  background: color-mix(in oklch, var(--fg) 3%, transparent);
  border: 1px solid var(--rule);
  padding: 48px;
  position: relative;
}
.venerable-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklch, var(--fg) 6%, transparent) 0 2px, transparent 2px 14px),
    color-mix(in oklch, var(--fg) 4%, transparent);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.venerable-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.venerable-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 6px;
}
.venerable-role {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 17px;
}
.venerable-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--silver-1);
  border-top: 1px solid var(--rule);
  padding-top: 22px;
  line-height: 1.5;
}

.oficiales {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.oficial {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  transition: padding 0.3s ease;
}
.oficial:hover { padding-left: 14px; }
.oficial:first-child { border-top: 1px solid var(--rule); }
.oficial .pos {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 14px;
}
.oficial .tit {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.oficial .nom {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--silver-1);
}
@media (max-width: 860px) {
  .miembros { grid-template-columns: 1fr; }
  .oficial { grid-template-columns: 60px 1fr; }
  .oficial .nom { grid-column: 1 / -1; padding-left: 60px; color: var(--muted); font-size: 15px; }
}

/* INGRESO */
.ingreso-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 40px;
  position: relative;
}
.ingreso-steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--rule);
}
.step {
  text-align: center;
  position: relative;
  padding: 0 16px;
}
.step .dot {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  background: var(--bg);
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 26px;
  position: relative;
  z-index: 2;
  transform: rotate(45deg);
}
.step .dot span { transform: rotate(-45deg); display: block; }
.step h4 {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.step p {
  font-size: 14px;
  color: var(--muted);
  max-width: 28ch;
  margin: 0 auto;
  line-height: 1.5;
}
.ingreso-cta {
  margin-top: 72px;
  padding: 48px;
  border: 1px solid var(--rule);
  text-align: center;
  background: color-mix(in oklch, var(--accent) 3%, transparent);
}
.ingreso-cta .lat {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.ingreso-cta h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 34px;
  margin-bottom: 22px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.1;
}
@media (max-width: 860px) {
  .ingreso-steps { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .ingreso-steps::before { display: none; }
}

/* TEMPLO / UBICACIÓN */
.templo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
}
.templo-visual {
  aspect-ratio: 4 / 5;
  position: relative;
  background:
    linear-gradient(180deg,
      color-mix(in oklch, var(--fg) 4%, transparent),
      color-mix(in oklch, var(--fg) 8%, transparent));
  border: 1px solid var(--rule);
  overflow: hidden;
  display: grid;
  place-items: center;
}
/* chessboard floor */
.templo-floor {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 55%;
  background-image:
    linear-gradient(color-mix(in oklch, var(--fg) 14%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--fg) 14%, transparent) 1px, transparent 1px);
  background-size: 14% 20%;
  transform: perspective(600px) rotateX(60deg);
  transform-origin: bottom;
  opacity: 0.8;
}
.templo-floor::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(
      color-mix(in oklch, var(--fg) 10%, transparent) 0% 25%,
      transparent 25% 50%
    );
  background-size: 28% 40%;
  opacity: 0.5;
}
.templo-columns {
  position: absolute;
  top: 8%;
  left: 0; right: 0;
  height: 58%;
  display: flex;
  justify-content: space-between;
  padding: 0 14%;
  z-index: 2;
}
.templo-col {
  width: 36px;
  background: linear-gradient(180deg,
    color-mix(in oklch, var(--fg) 22%, transparent),
    color-mix(in oklch, var(--fg) 12%, transparent));
  position: relative;
  border: 1px solid color-mix(in oklch, var(--fg) 20%, transparent);
}
.templo-col::before, .templo-col::after {
  content: '';
  position: absolute;
  left: -8px; right: -8px;
  height: 10px;
  background: color-mix(in oklch, var(--fg) 22%, transparent);
  border: 1px solid color-mix(in oklch, var(--fg) 28%, transparent);
}
.templo-col::before { top: -10px; }
.templo-col::after { bottom: -10px; }
.templo-col .letter {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.templo-g {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 68px;
  color: var(--accent);
  z-index: 3;
  text-shadow: 0 0 24px color-mix(in oklch, var(--accent) 40%, transparent);
}
.templo-g-ring {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -12%);
  width: 130px; height: 130px;
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  border-radius: 50%;
  z-index: 2;
}

.templo-info h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 36px;
  margin-bottom: 10px;
  line-height: 1.1;
}
.templo-info .lat {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 28px;
  font-size: 15px;
}
.templo-info dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.templo-info dt {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 4px;
}
.templo-info dd {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--silver-1);
}
.templo-info dd em { font-style: italic; color: var(--muted); }
@media (max-width: 860px) {
  .templo { grid-template-columns: 1fr; }
  .templo-map { max-width: 100%; margin-left: 0; }
}

.templo-map {
  aspect-ratio: 4 / 3;
  max-width: 480px;
  margin-left: auto;
  border: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
  background: color-mix(in oklch, var(--fg) 4%, transparent);
}
.templo-map::before, .templo-map::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 1px solid var(--accent);
  z-index: 2;
  pointer-events: none;
}
.templo-map::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.templo-map::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.templo-map iframe {
  width: 100%; height: 100%;
  display: block;
  filter: grayscale(0.3) contrast(1.05);
}
[data-mode="night"] .templo-map iframe {
  filter: grayscale(0.5) invert(0.92) hue-rotate(180deg) contrast(0.9) brightness(0.95);
}

/* CONTACTO */
.contacto {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
}
.contacto-info p {
  color: var(--silver-1);
  font-size: 17px;
  max-width: 46ch;
  margin-bottom: 32px;
}
.contacto-channels {
  border-top: 1px solid var(--rule);
}
.contacto-ch {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: baseline;
}
.contacto-ch .l {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.contacto-ch .v {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  color: var(--silver-0);
}
.contacto-ch .v em {
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
  display: block;
  margin-top: 2px;
}

form.tejo {
  background: color-mix(in oklch, var(--fg) 3%, transparent);
  border: 1px solid var(--rule);
  padding: 44px;
  position: relative;
}
form.tejo::before, form.tejo::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 1px solid var(--accent);
}
form.tejo::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
form.tejo::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
form.tejo h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 28px;
  margin-bottom: 6px;
}
form.tejo .sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 28px;
}
.field {
  margin-bottom: 22px;
}
.field label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.3s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}
.field textarea { min-height: 80px; }
form.tejo .btn { margin-top: 10px; width: 100%; }
.contacto-form-only {
  display: block;
  max-width: 680px;
  margin: 0 auto;
}
@media (max-width: 860px) {
  .contacto { grid-template-columns: 1fr; gap: 48px; }
}

/* FOOTER */
footer {
  padding: 80px 0 48px;
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 2;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.foot-brand .mk {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.foot-brand p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--muted);
  max-width: 34ch;
  font-size: 15px;
}
.foot-col h5 {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: 10px; }
.foot-col a {
  color: var(--silver-1);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  transition: color 0.3s, padding-left 0.3s;
}
.foot-col a:hover { color: var(--accent); padding-left: 6px; }

.foot-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-bottom .lat {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.05em;
  font-size: 13px;
  color: var(--accent);
}
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ============ REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s cubic-bezier(0.2, 0.7, 0.3, 1), transform 1.1s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.45s; }
.reveal.delay-5 { transition-delay: 0.6s; }

/* word-by-word reveal */
.word-reveal .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.word-reveal.in .w {
  opacity: 1;
  transform: none;
}

/* MODE TOGGLE BUTTON */
nav.top .mode-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--fg);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  transition: border-color 0.3s, color 0.3s, transform 0.5s;
  padding: 0;
}
nav.top .mode-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(180deg);
}

/* ============ TWEAKS PANEL ============ */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 280px;
  background: color-mix(in oklch, var(--bg) 94%, black);
  border: 1px solid var(--rule);
  padding: 22px;
  z-index: 200;
  font-family: 'Cinzel', serif;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-panel h4 .close {
  cursor: pointer;
  color: var(--muted);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 0;
}
.tweak {
  margin-bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.tweak label {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 9px;
}
.tweak .opts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tweak .opts button {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--fg);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}
.tweak .opts button.active {
  border-color: var(--accent);
  color: var(--accent);
}
.tweak input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECCIONES — VARIACIÓN TONAL DENTRO DE LA PALETA
   Sin blanco puro en modo noche.
   Ritmo: night-1 / night-2 / night-1+velo / night-2
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Historia: night-1 con velo plateado 3% + halo plata esquina superior */
#historia {
  background:
    radial-gradient(ellipse 60% 45% at 96% 5%,
      rgba(200,205,214,0.055) 0%, transparent 48%),
    color-mix(in oklch, var(--silver-2) 3%, var(--night-1));
}

/* Principios: night-2 (más profundo) + halos de oro en esquinas opuestas */
#principios {
  background:
    radial-gradient(ellipse 55% 55% at 2% 100%,
      rgba(201,169,106,0.055) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 98% 0%,
      rgba(201,169,106,0.04) 0%, transparent 45%),
    var(--night-2);
}

/* Grados: night-1 con viñeta de oro central + pavimento ajedrezado al 2.5% */
#grados {
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%,
      rgba(201,169,106,0.042) 0%, transparent 58%),
    var(--night-1);
}
#grados::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-conic-gradient(
    rgba(200,205,214,0.022) 0% 25%,
    transparent 25% 50%
  );
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}
#grados .container { position: relative; z-index: 1; }

/* Ingreso: night-1 base sin textura — respira entre grados y templo */

/* Templo: night-1 + halo de oro desde abajo + hairline dorado arriba */
#templo {
  background:
    radial-gradient(ellipse 70% 45% at 50% 100%,
      rgba(201,169,106,0.04) 0%, transparent 52%),
    var(--night-1);
  border-top: 1px solid rgba(201,169,106,0.14);
}

/* Contacto: night-2 — cierra simétricamente con principios */
#contacto {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%,
      rgba(201,169,106,0.042) 0%, transparent 50%),
    var(--night-2);
}

/* Modo diurno: --night-1 = ivory #f4f1e8, --night-2 = pergamino #ebe6d6
   Las variables CSS ya se encargan — no se necesita override manual */


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO — luz de vela, paleta azul noche únicamente
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 55% at 50% 62%,
      rgba(201,169,106,0.09) 0%, transparent 56%),
    radial-gradient(ellipse 50% 40% at 50% 28%,
      rgba(200,205,214,0.035) 0%, transparent 48%);
}
[data-mode="day"] .hero::before { opacity: 0.45; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DIVISORES ORNAMENTALES ENTRE SECCIONES
   Lema latino en Cormorant itálica flanqueado por hairlines
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sect-ornament {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 0 48px;
  height: 48px;
  pointer-events: none;
}
.sect-ornament::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, rgba(201,169,106,0.26), transparent 80%);
}
.sect-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(201,169,106,0.26), transparent 80%);
}
.sect-ornament .sym {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(201,169,106,0.6);
  letter-spacing: 0.12em;
  padding: 0 28px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}
@media (max-width: 860px) {
  .sect-ornament { padding: 0 24px; }
  .sect-ornament .sym { padding: 0 18px; font-size: 12px; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TIPOGRAFÍA — sombras mínimas, solo en modo noche
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
h2.section-title {
  text-shadow: 0 0 60px rgba(201,169,106,0.08);
}
h1.hero-title {
  text-shadow: 0 0 80px rgba(201,169,106,0.10);
}
[data-mode="day"] h2.section-title,
[data-mode="day"] h1.hero-title {
  text-shadow: none;
}
.section-label, .kicker {
  filter: drop-shadow(0 0 7px rgba(201,169,106,0.20));
}
[data-mode="day"] .section-label,
[data-mode="day"] .kicker {
  filter: none;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TARJETAS Y PANELES — sombra oscura pura, sin color
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.principio:hover {
  background: color-mix(in oklch, var(--accent) 4%, transparent);
  box-shadow: inset 0 1px 0 0 rgba(201,169,106,0.20);
}
.grado-detail,
.venerable-card,
form.tejo {
  box-shadow:
    0 4px 20px -4px rgba(6,16,31,0.55),
    inset 0 1px 0 0 rgba(200,205,214,0.05);
}
.ingreso-cta {
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%,
      rgba(201,169,106,0.06) 0%,
      rgba(201,169,106,0.01) 100%);
  border-color: rgba(201,169,106,0.20);
}
.step:hover .dot {
  box-shadow:
    0 0 0 6px rgba(201,169,106,0.08),
    0 0 22px rgba(201,169,106,0.12);
}
.historia-timeline .tl-item::before {
  transition: box-shadow 0.3s ease;
}
.historia-timeline .tl-item:hover::before {
  box-shadow: 0 0 0 5px rgba(201,169,106,0.14);
}
.templo-g {
  text-shadow:
    0 0 20px rgba(201,169,106,0.45),
    0 0 50px rgba(201,169,106,0.18),
    0 0 100px rgba(201,169,106,0.07);
}
.compass-orbit::before {
  box-shadow: 0 0 7px 2px rgba(201,169,106,0.50);
}
.fraterna-card {
  box-shadow:
    0 30px 80px -20px rgba(123,91,214,0.50),
    inset 0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 0 0 rgba(255,255,255,0.14);
}
