* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--cream);
  color: var(--void);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* The few intentionally dark, focused pages (sign-in, course hero/sales) */
body.page-dark {
  background: var(--void);
  color: var(--smoke);
}

/* Grain overlay — adds texture, reduces digital harshness */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--void);
  margin: 0 0 var(--space-2);
}
body.page-dark h1,
body.page-dark h2,
body.page-dark h3 {
  color: var(--cream);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.15rem;
  letter-spacing: 0;
}

p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--stone);
  margin: 0 0 var(--space-2);
}
body.page-dark p {
  color: var(--smoke);
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--gold2);
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4) var(--px);
}

/* Horizontal-inset-only wrapper for content living inside a .section-*
   band — the band supplies vertical rhythm, this supplies the single
   source of horizontal padding so nothing ever touches the edge. */
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--px);
}

.eyebrow {
  display: block;
  font-family: var(--label);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-1);
}

.t-display {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.t-display.on-light {
  color: var(--void);
}
.t-body {
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ash);
}

/* ══ NAV ══ */
nav {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--nav-h);
  padding: 0 var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 246, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav-seal {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s;
}
.nav-wordmark:hover .nav-seal {
  border-color: var(--gold);
}
.seal-glyph {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: var(--gold);
  line-height: 1;
  padding-top: 2px;
}
.nav-name {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.wordmark-name-top {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--void);
  line-height: 1;
}
.wordmark-name-bottom {
  font-family: "Cinzel", serif;
  font-size: 0.46rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--label);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--void);
}

.nav-cta {
  font-family: var(--label) !important;
  font-size: 0.68rem !important;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--gold-line);
  color: var(--gold) !important;
  background: transparent;
  text-decoration: none;
  transition: all 0.3s;
}
.nav-cta:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}

/* ══ SECTION PATTERNS ══
   Mobile-first: small vertical rhythm at 320px, scaling up at wider
   breakpoints. Horizontal inset always comes from .section-inner/.container
   nested inside — never from the section band itself. */
.section-hero {
  background: var(--void);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.section-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 60% 40%, rgba(196, 134, 74, 0.06), transparent);
}
.section-hero > * {
  position: relative;
  z-index: 1;
}
@media (min-width: 900px) {
  .section-hero { padding: 6rem 0 5rem; }
}

.section-content {
  background: var(--cream);
  padding: 2.5rem 0;
}
@media (min-width: 900px) {
  .section-content { padding: 5rem 0; }
}

.section-linen {
  background: var(--linen);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(46, 32, 16, 0.08);
  border-bottom: 1px solid rgba(46, 32, 16, 0.08);
}
@media (min-width: 900px) {
  .section-linen { padding: 5rem 0; }
}

.section-cta {
  background: var(--void);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-dark);
}
@media (min-width: 900px) {
  .section-cta { padding: 4rem 0; }
}

.section-player {
  background: var(--void);
  padding: var(--space-3) 0;
}
.section-player #media {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ══ FOOTER ══ */
footer {
  background: var(--void);
  color: var(--ash);
  padding: var(--space-4) var(--px);
  border-top: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-logo {
  font-family: var(--label);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
}
.footer-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--label);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
}
.footer-links a:hover {
  color: var(--gold);
}
.footer-copy {
  font-family: var(--label);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--ash);
  opacity: 0.8;
}
@media (min-width: 600px) {
  footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* ── Utility spacing (used by a few pages instead of inline styles) ── */
.section-heading {
  margin-top: var(--space-4);
}
.spaced-top {
  margin-top: var(--space-3);
}

#media audio {
  accent-color: var(--gold);
  color-scheme: dark;
}

#modules section {
  margin-bottom: var(--space-4);
}

/* ── Entrance animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.container {
  animation: fadeUp 0.6s ease both;
}
