:root {
  --bg-deep: #0d1218;
  --bg-panel: #1a232d;
  --sandstone: #c6a36d;
  --papyrus: #eadfbe;
  --gold: #d4af37;
  --lapis: #26619c;
  --turquoise: #3aa6a1;
  --shadow: #07090c;
  --text-main: #f5f0df;
  --text-muted: #c7bea7;
  --line: rgba(212, 175, 55, 0.28);
  --focus: #6dd3ff;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 10%, rgba(58, 166, 161, 0.1), transparent 40%),
    radial-gradient(circle at 88% 0%, rgba(38, 97, 156, 0.12), transparent 35%),
    linear-gradient(180deg, #0c131a 0%, #111922 48%, #0a0e13 100%);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(234, 223, 190, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 223, 190, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: -2;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.section-head h2,
h1,
.footer-title,
.brand-text {
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.03em;
}

.section-head {
  margin-bottom: 1.4rem;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  margin: 0;
}

.section-head p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  background: rgba(10, 15, 20, 0.7);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.brand-mark {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(212, 175, 55, 0.45);
}

.nav-list,
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  gap: 0.8rem;
}

.nav-list a,
.footer-links a {
  text-decoration: none;
  color: var(--papyrus);
  font-weight: 600;
}

.nav-list a:hover,
.footer-links a:hover {
  color: var(--gold);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--focus);
  color: #0a1017;
  padding: 0.5rem 0.75rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
}

.skip-link:focus {
  left: 1rem;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.temple-frame {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(125deg, rgba(198, 163, 109, 0.08), rgba(38, 97, 156, 0.06));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.4rem, 4vw, 2.6rem);
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sandstone);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 4rem);
  line-height: 1.07;
  color: var(--papyrus);
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 55ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.68rem 1.1rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn-primary {
  color: #1b1506;
  background: linear-gradient(180deg, #f2d474, #cda33a);
  box-shadow: 0 8px 26px rgba(212, 175, 55, 0.34);
}

.btn-secondary {
  color: var(--papyrus);
  border: 1px solid var(--line);
  background: rgba(17, 25, 34, 0.7);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-media {
  display: grid;
  gap: 0.8rem;
}

.hero-media-title {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.2rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.panel {
  background: linear-gradient(180deg, rgba(29, 40, 52, 0.72), rgba(19, 27, 36, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.panel h3 {
  margin-top: 0;
  font-size: 1.1rem;
  font-family: "Cinzel", Georgia, serif;
}

.embed-slot {
  border-radius: 12px;
  min-height: 220px;
  border: 1px dashed rgba(234, 223, 190, 0.28);
  padding: 0.75rem;
  background: rgba(5, 8, 12, 0.24);
}

.embed-slot iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 8px;
}

.hero-media iframe.lazyload {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
}

.link-cards .panel,
.portal-grid .panel,
#schedule-content .panel {
  grid-column: span 6;
}

.portal-grid .panel {
  grid-column: span 4;
}

.portal-link {
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.portal-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(212, 175, 55, 0.2), transparent 45%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.portal-link:hover::after,
.portal-link:focus-visible::after {
  opacity: 1;
}

.top-gap {
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 14, 0.92);
  padding: 1.6rem 0 2.6rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy,
.footer-note {
  color: var(--text-muted);
  margin: 0.35rem 0;
}

.fallback-card {
  display: grid;
  gap: 0.7rem;
  align-content: center;
  min-height: 180px;
}

.offline-preview {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  width: fit-content;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: var(--sandstone);
  font-size: 0.85rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--sandstone);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .link-cards .panel,
  .portal-grid .panel,
  #schedule-content .panel {
    grid-column: span 12;
  }

  .embed-slot iframe {
    min-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
