/* =========================================================================
   Stage & Step — editorial theme for tap dance & musical theater
   Palette: stage black / spotlight gold / warm cream paper
   Type: Playfair Display (serif display) + Source Sans 3 (body)
   Framework: Bootstrap 5 (themed). Custom CSS = brand tokens + small tweaks.
   ========================================================================= */

:root {
  --stage-black: #12100E;
  --stage-black-2: #1B1712;
  --ink: #211E1A;
  --ink-soft: #4A443C;
  --gold: #C79A3B;
  --gold-deep: #A87E28;
  --gold-soft: #E4C77E;
  --cream: #F7F3EA;
  --cream-2: #EFE8D8;
  --paper: #FFFFFF;
  --line: #E0D7C3;
  --maxread: 44rem;
  --shadow-sm: 0 2px 10px rgba(20, 15, 8, .08);
  --shadow-md: 0 14px 40px rgba(20, 15, 8, .16);
}

/* ---- Safeguard: content must NEVER be hidden waiting on JS (AOS trap) ---- */
[data-aos] { opacity: 1 !important; transform: none !important; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 1.075rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, .footer-brand, .brand-text, .hero-title {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.18;
  font-weight: 700;
}

a { color: var(--gold-deep); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: .5rem; z-index: 2000;
  background: var(--gold); color: var(--stage-black); padding: .5rem .9rem; border-radius: 6px; font-weight: 600;
}

/* ------------------------------- NAVBAR ---------------------------------- */
.site-nav {
  background: rgba(18, 16, 14, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(199, 154, 59, .22);
  padding-top: .55rem; padding-bottom: .55rem;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-nav.scrolled { background: rgba(14, 12, 10, .98); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.navbar-brand { display: flex; align-items: center; gap: .6rem; }
.brand-mark {
  font-family: "Playfair Display", serif; font-weight: 800;
  color: var(--stage-black); background: var(--gold);
  width: 2.1rem; height: 2.1rem; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; letter-spacing: -1px; box-shadow: 0 2px 8px rgba(199,154,59,.35);
}
.brand-mark .amp { font-size: .62rem; opacity: .8; margin: 0 -1px; }
.brand-text { color: var(--cream); font-size: 1.28rem; font-weight: 700; letter-spacing: .2px; }
.brand-text .amp2, .footer-brand .amp2 { color: var(--gold); font-style: italic; }
.site-nav .nav-link {
  color: rgba(247, 243, 234, .82); font-weight: 600; font-size: .96rem;
  padding: .5rem .85rem !important; border-radius: 6px;
}
.site-nav .nav-link:hover, .site-nav .nav-link:focus { color: var(--gold-soft); }
.site-nav .nav-link.active { color: var(--gold); }
.navbar-toggler { border-color: rgba(199,154,59,.45); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(199,154,59,.35); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23E4C77E' stroke-width='2.2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.dropdown-menu {
  background: var(--stage-black-2); border: 1px solid rgba(199,154,59,.25);
  border-radius: 10px; padding: .4rem; box-shadow: var(--shadow-md);
}
.dropdown-item {
  color: rgba(247,243,234,.85); border-radius: 6px; font-weight: 500; padding: .5rem .8rem; white-space: normal;
}
.dropdown-item:hover, .dropdown-item:focus { background: rgba(199,154,59,.16); color: var(--gold-soft); }
.dropdown-item.active { background: var(--gold); color: var(--stage-black); }

/* -------------------------------- HERO ----------------------------------- */
.page-hero {
  margin-top: 58px; /* clears fixed nav */
  background: radial-gradient(1200px 400px at 70% -10%, rgba(199,154,59,.14), transparent 60%), var(--stage-black);
  color: var(--cream);
  padding: clamp(3.4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  background-size: cover; background-position: center;
  border-bottom: 3px solid var(--gold);
}
.page-hero.has-image { background-repeat: no-repeat; }
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft), var(--gold-deep));
  opacity: .0;
}
.hero-inner { max-width: 62rem; }
.hero-kicker {
  text-transform: uppercase; letter-spacing: .28em; font-size: .78rem; font-weight: 700;
  color: var(--gold); margin-bottom: 1rem;
}
.hero-title {
  color: #fff; font-size: clamp(2.15rem, 5.2vw, 3.7rem); margin: 0 0 1rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.4);
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
.hero-lede {
  font-size: clamp(1.08rem, 2.2vw, 1.32rem); color: rgba(247,243,234,.9);
  max-width: 40rem; margin: 0; font-weight: 300;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) .08s both;
}
.page-index .hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-title, .hero-lede { animation: none; } html { scroll-behavior: auto; } }

/* ------------------------------- ARTICLE --------------------------------- */
.site-main { padding: clamp(2.6rem, 6vw, 4.5rem) 0 1rem; }
.article-body { font-size: 1.09rem; }
.article-body > p:first-of-type, .lead-404 {
  font-size: 1.22rem; line-height: 1.68; color: var(--ink);
}
.article-body h2 {
  font-size: clamp(1.5rem, 3vw, 1.95rem); margin: 2.4rem 0 1rem;
  padding-bottom: .5rem; position: relative;
}
.article-body h2::after {
  content: ""; display: block; width: 3.2rem; height: 3px; margin-top: .55rem;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 3px;
}
.article-body h3 { font-size: 1.3rem; margin: 1.8rem 0 .7rem; color: var(--ink); }
.article-body p { margin: 0 0 1.15rem; }
.article-body ul, .article-body ol { margin: 0 0 1.3rem; padding-left: 0; }
.article-body ul { list-style: none; }
.article-body ul li {
  position: relative; padding-left: 1.7rem; margin-bottom: .6rem;
}
.article-body ul li::before {
  content: "\\f0a4"; /* placeholder overridden below */
}
.article-body ul li::before {
  content: ""; position: absolute; left: .1rem; top: .72em;
  width: .5rem; height: .5rem; background: var(--gold); border-radius: 2px; transform: rotate(45deg);
}
.article-body ol { padding-left: 1.3rem; }
.article-body ol li { margin-bottom: .6rem; padding-left: .3rem; }
.article-body ol li::marker { color: var(--gold-deep); font-weight: 700; }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body em { color: var(--ink-soft); }
.article-body a { border-bottom: 1px solid rgba(168,126,40,.35); }
.article-body a:hover { border-bottom-color: var(--ink); text-decoration: none; }
.article-body a[target="_blank"]::after {
  content: "\\2197"; font-size: .72em; margin-left: .12em; color: var(--gold-deep); vertical-align: super;
}

/* figures */
.content-figure {
  margin: 2rem 0 2.2rem; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.content-figure img { width: 100%; }

/* home feature emphasis */
.page-index .article-body > p:first-of-type { font-size: 1.3rem; }

/* Contact form */
.contact-form {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.6rem; box-shadow: var(--shadow-sm); margin: 1.4rem 0 1rem;
}
.form-row { margin-bottom: 1rem; display: flex; flex-direction: column; }
.form-row label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--ink-soft); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background: var(--cream); transition: border-color .18s, box-shadow .18s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,154,59,.2); background: #fff;
}
.form-note { font-size: .95rem; color: var(--ink-soft); font-style: italic; }

/* Buttons */
.btn-primary, .contact-form button, .btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-family: inherit;
  border-radius: 8px; padding: .7rem 1.4rem; cursor: pointer; border: 2px solid var(--gold);
  transition: transform .15s ease, box-shadow .15s ease, background .18s ease, color .18s ease;
  text-decoration: none;
}
.btn-primary, .contact-form button {
  background: var(--gold); color: var(--stage-black) !important; border-color: var(--gold);
}
.btn-primary:hover, .contact-form button:hover {
  background: var(--gold-deep); border-color: var(--gold-deep); color: #fff !important;
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(168,126,40,.35); text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--ink) !important; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep) !important; transform: translateY(-2px); text-decoration: none; }

/* 404 */
.notfound-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

/* Post-nav (bottom explore strip) */
.post-nav {
  display: flex; flex-wrap: wrap; gap: .6rem; margin: 3rem 0 1rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.post-nav-link {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--cream-2); color: var(--ink); border: 1px solid var(--line);
  padding: .5rem .95rem; border-radius: 100px; font-weight: 600; font-size: .92rem;
}
.post-nav-link i { color: var(--gold-deep); }
.post-nav-link:hover { background: var(--stage-black); color: var(--gold-soft); border-color: var(--stage-black); text-decoration: none; }
.post-nav-link:hover i { color: var(--gold-soft); }

/* ------------------------------- FOOTER ---------------------------------- */
.site-footer {
  background: var(--stage-black); color: rgba(247,243,234,.72);
  padding: 3.4rem 0 1.6rem; margin-top: 3.5rem;
  border-top: 3px solid var(--gold);
}
.footer-brand { color: #fff; font-size: 1.6rem; font-weight: 700; margin-bottom: .6rem; }
.footer-tag { color: rgba(247,243,234,.82); font-size: 1.02rem; margin-bottom: .8rem; }
.footer-note { font-size: .86rem; color: rgba(247,243,234,.52); line-height: 1.55; max-width: 24rem; }
.footer-h {
  font-family: "Source Sans 3", sans-serif; text-transform: uppercase; letter-spacing: .16em;
  font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: rgba(247,243,234,.75); font-size: .96rem; }
.footer-links a:hover { color: var(--gold-soft); text-decoration: none; }
.footer-bottom {
  margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(199,154,59,.2);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  font-size: .86rem; color: rgba(247,243,234,.55);
}
.footer-bottom a { color: var(--gold-soft); }

/* ------------------------------ RESPONSIVE ------------------------------- */
@media (max-width: 991.98px) {
  .site-nav { background: rgba(14,12,10,.98); }
  .navbar-collapse { margin-top: .6rem; padding-bottom: .5rem; }
  .dropdown-menu { background: transparent; border: none; box-shadow: none; padding-left: .8rem; }
  .dropdown-item { color: rgba(247,243,234,.75); }
}
@media (max-width: 575.98px) {
  body { font-size: 1.04rem; }
  .hero-inner { padding-right: .5rem; }
  .article-body > p:first-of-type, .lead-404 { font-size: 1.12rem; }
  .footer-bottom { flex-direction: column; }
}
