/* =============================================================
   The Kith Way — styles
   Palette: warm ivory & soft gold (candlelit, sacred, timeless)
   ============================================================= */

:root {
  color-scheme: light dark;

  --bg: #EDE5D3;
  --ink: #2A2722;
  --gold: #B8956A;
  --taupe: #8A7E6E;        /* decorative only — borders, hairlines */
  --muted-text: #5E5447;   /* meets WCAG AA on --bg (~6.4:1) */

  --surface-header: rgba(237, 229, 211, 0.78);
  --header-border:  rgba(138, 126, 110, 0.12);
  --link-underline: rgba(184, 149, 106, 0.45);

  --bg-warm: #F0E8D7;
  --bg-cool: #E6DDC8;

  --hero-overlay-1: rgba(247, 242, 233, 0.30);
  --hero-overlay-2: rgba(247, 242, 233, 0.15);
  --hero-overlay-mid: rgba(237, 229, 211, 0.55);
  --hero-overlay-3: #EDE5D3;

  --inner-glow-a:   rgba(184, 149, 106, 0.18);
  --inner-glow-b:   rgba(214, 180, 140, 0.14);
  --inner-glow-c:   rgba(184, 149, 106, 0.12);
  --inner-wash-1:   rgba(245, 238, 228, 0.45);
  --inner-wash-2:   rgba(245, 238, 228, 0);
  --inner-wash-3:   rgba(245, 238, 228, 0.35);

  --sparkle-glow:   rgba(245, 220, 170, 0.9);
  --gold-soft:      rgba(184, 149, 106, 0.08);
  --gold-border:    rgba(184, 149, 106, 0.55);
  --gold-shadow:    rgba(184, 149, 106, 0.35);
  --gold-shadow-strong: rgba(184, 149, 106, 0.45);
  --card-shadow:    rgba(42, 39, 34, 0.08);
  --menu-border:    rgba(138, 126, 110, 0.25);
  --footer-rule:    rgba(138, 126, 110, 0.18);

  --cta-bg:         var(--gold);
  --cta-fg:         #FFF8EC;
  --cta-hover:      #A8835A;

  --serif: "Cormorant Garamond", "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --max-text: 32rem;
  --pad-x: clamp(1.25rem, 5vw, 3rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme="dark"] {
  /* candlelit at night — same warm room, dimmed */
  --bg: #1B1714;
  --ink: #EDE3D0;
  --gold: #D4AC7A;
  --taupe: #6B6056;
  --muted-text: #BFB29C;

  --surface-header: rgba(20, 17, 14, 0.78);
  --header-border:  rgba(212, 172, 122, 0.14);
  --link-underline: rgba(212, 172, 122, 0.55);

  --bg-warm: #211C18;
  --bg-cool: #161310;

  --hero-overlay-1: rgba(15, 12, 10, 0.30);
  --hero-overlay-2: rgba(15, 12, 10, 0.15);
  --hero-overlay-mid: rgba(27, 23, 20, 0.55);
  --hero-overlay-3: #1B1714;

  --inner-glow-a:   rgba(212, 172, 122, 0.20);
  --inner-glow-b:   rgba(232, 200, 140, 0.12);
  --inner-glow-c:   rgba(212, 172, 122, 0.14);
  --inner-wash-1:   rgba(20, 17, 14, 0.55);
  --inner-wash-2:   rgba(20, 17, 14, 0);
  --inner-wash-3:   rgba(20, 17, 14, 0.40);

  --sparkle-glow:   rgba(250, 225, 175, 0.85);
  --gold-soft:      rgba(212, 172, 122, 0.10);
  --gold-border:    rgba(212, 172, 122, 0.45);
  --gold-shadow:    rgba(0, 0, 0, 0.55);
  --gold-shadow-strong: rgba(0, 0, 0, 0.65);
  --card-shadow:    rgba(0, 0, 0, 0.45);
  --menu-border:    rgba(212, 172, 122, 0.22);
  --footer-rule:    rgba(212, 172, 122, 0.18);

  --cta-bg:         var(--gold);
  --cta-fg:         #1B1714;
  --cta-hover:      #E2BE8C;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: linear-gradient(180deg,
    var(--bg)      0%,
    var(--bg-warm) 25%,
    var(--bg)      50%,
    var(--bg-cool) 75%,
    var(--bg)      100%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.0625rem, 0.9rem + 0.4vw, 1.25rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--link-underline);
  transition: border-color 240ms var(--ease), color 240ms var(--ease);
}
a:hover { border-bottom-color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -10000px;
  top: 8px;
  background: var(--bg);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold);
  z-index: 200;
}
.skip-link:focus { left: 8px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =============================================================
   Header / Nav
   ============================================================= */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--surface-header);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--header-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad-x);
  max-width: 88rem;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  border: none;
  color: var(--ink);
}

.nav-menu {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 2rem;
}
.nav-menu a {
  font-size: 0.95rem;
  border: none;
  color: var(--muted-text);
}
.nav-menu a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.75rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  position: relative;
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  margin: 5px auto;
  transition: transform 280ms var(--ease), opacity 280ms var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* Theme toggle (sun / moon) */
.nav-theme {
  display: inline-flex;
  align-items: center;
}
.theme-toggle {
  position: relative;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--ink);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease), transform 240ms var(--ease);
}
.theme-toggle:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.theme-toggle svg {
  position: absolute;
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.theme-toggle__sun  { opacity: 1; transform: rotate(0deg)   scale(1); }
.theme-toggle__moon { opacity: 0; transform: rotate(-45deg) scale(0.7); }
:root[data-theme="dark"] .theme-toggle__sun  { opacity: 0; transform: rotate(45deg)  scale(0.7); }
:root[data-theme="dark"] .theme-toggle__moon { opacity: 1; transform: rotate(0deg)   scale(1); }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg { transition: opacity 120ms linear; transform: none !important; }
}

/* Mobile nav (default) */
@media (max-width: 767.98px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms var(--ease);
    z-index: 40;
  }
  .nav-menu.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu a {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.5rem, 6vw, 2rem);
    color: var(--ink);
    padding: 0.5rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* =============================================================
   Hero
   ============================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(0.96);
  z-index: 0;
  transition: filter 320ms var(--ease), opacity 320ms var(--ease);
}
:root[data-theme="dark"] .hero__image {
  filter: saturate(0.7) contrast(0.9) brightness(0.45) hue-rotate(-8deg);
}
:root[data-theme="dark"] .section__media img {
  filter: saturate(0.75) brightness(0.78);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      var(--hero-overlay-1) 0%,
      var(--hero-overlay-2) 35%,
      var(--hero-overlay-mid) 70%,
      var(--hero-overlay-3) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--pad-x) clamp(4rem, 14vh, 9rem);
  max-width: 44rem;
}

.hero__line {
  font-family: var(--serif);
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2rem, 6vw + 0.5rem, 4.25rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.hairline {
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .hero__line { letter-spacing: -0.01em; }
}

/* =============================================================
   Sections (Philosophy, Practice, About, Contact)
   ============================================================= */

.section {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(5rem, 12vh, 9rem) var(--pad-x);
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-content: center;
  align-items: center;
  max-width: 88rem;
  margin: 0 auto;
}

.section--center {
  justify-items: center;
  text-align: center;
}

.section--flush-top {
  min-height: 0;
  padding-top: 0;
}

.section__media img {
  width: 100%;
}

@media (max-width: 767.98px) {
  .section__media img {
    max-height: 38vh;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
  }
}

.section__text { max-width: var(--max-text); }

.section__title {
  font-family: var(--serif);
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  font-size: clamp(1.75rem, 3.5vw + 0.5rem, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1.5rem;
  color: var(--ink);
}
.section__text p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 1rem + 0.7vw, 1.6rem);
  line-height: 1.55;
  margin: 0 0 1.1rem;
  color: var(--ink);
}
.section__text p:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .section { grid-template-columns: 1fr 1fr; }
  .section__title { letter-spacing: -0.01em; }
  .section--right .section__media { order: 2; }
  .section--right .section__text { order: 1; justify-self: end; }
  .section--left  .section__media { order: 1; }
  .section--left  .section__text  { order: 2; justify-self: start; }
  .section--center { grid-template-columns: 1fr; }
}

/* Inner Path */
@media (min-width: 768px) {
  .inner-path__intro { white-space: nowrap; }
}
#inner-path {
  position: relative;
  isolation: isolate;
}
#inner-path::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 25%, var(--inner-glow-a), transparent 70%),
    radial-gradient(ellipse 55% 45% at 20% 80%, var(--inner-glow-b), transparent 70%),
    radial-gradient(ellipse 55% 45% at 80% 75%, var(--inner-glow-c), transparent 70%),
    linear-gradient(180deg, var(--inner-wash-1), var(--inner-wash-2) 40%, var(--inner-wash-3));
  pointer-events: none;
  filter: blur(0.5px);
}
#inner-path .section__title {
  position: relative;
  display: inline-block;
  padding: 0.6em 1.4em;
  font-weight: 500;
  color: var(--ink);
  isolation: isolate;
}
#inner-path .section__title::after {
  content: "";
  position: absolute;
  inset: -1.6em -2.4em;
  z-index: 1;
  pointer-events: none;
  --sparkle-gold: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.4 10.6 L24 12 L13.4 13.4 L12 24 L10.6 13.4 L0 12 L10.6 10.6 Z' fill='%23E8C88C'/></svg>");
  --sparkle-cream: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.4 10.6 L24 12 L13.4 13.4 L12 24 L10.6 13.4 L0 12 L10.6 10.6 Z' fill='%23F8E2B4'/></svg>");
  --sparkle-warm: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.4 10.6 L24 12 L13.4 13.4 L12 24 L10.6 13.4 L0 12 L10.6 10.6 Z' fill='%23D6A86A'/></svg>");
  background-image:
    var(--sparkle-gold), var(--sparkle-cream), var(--sparkle-warm),
    var(--sparkle-cream), var(--sparkle-gold), var(--sparkle-warm),
    var(--sparkle-gold), var(--sparkle-cream), var(--sparkle-warm),
    var(--sparkle-cream), var(--sparkle-gold), var(--sparkle-warm),
    var(--sparkle-gold);
  background-size:
    14px 14px, 10px 10px, 16px 16px,
    8px 8px, 12px 12px, 11px 11px,
    14px 14px, 9px 9px, 13px 13px,
    10px 10px, 15px 15px, 8px 8px,
    11px 11px;
  background-position:
    3% 18%, 11% 82%, 21% 8%,
    32% 92%, 41% 14%, 50% 88%,
    58% 10%, 66% 86%, 74% 16%,
    82% 84%, 89% 12%, 95% 72%,
    98% 32%;
  background-repeat: no-repeat;
  animation: innerPathSparkle 11s ease-in-out infinite;
  filter: drop-shadow(0 0 3px var(--sparkle-glow));
}
@keyframes innerPathSparkle {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  25% { opacity: 1; transform: scale(1.05); }
  50% { opacity: 0.7; transform: scale(0.95); }
  75% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #inner-path .section__title::after { animation: none; opacity: 0.7; }
}
.page-title--sparkle {
  position: relative;
  isolation: isolate;
}
.page-title--sparkle .page-title__text {
  position: relative;
  display: inline-block;
  padding: 0.6em 1.4em;
}
.page-title--sparkle .page-title__text::after {
  content: "";
  position: absolute;
  inset: -1.6em -2.4em;
  z-index: 1;
  pointer-events: none;
  --sparkle-gold: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.4 10.6 L24 12 L13.4 13.4 L12 24 L10.6 13.4 L0 12 L10.6 10.6 Z' fill='%23E8C88C'/></svg>");
  --sparkle-cream: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.4 10.6 L24 12 L13.4 13.4 L12 24 L10.6 13.4 L0 12 L10.6 10.6 Z' fill='%23F8E2B4'/></svg>");
  --sparkle-warm: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.4 10.6 L24 12 L13.4 13.4 L12 24 L10.6 13.4 L0 12 L10.6 10.6 Z' fill='%23D6A86A'/></svg>");
  background-image:
    var(--sparkle-gold), var(--sparkle-cream), var(--sparkle-warm),
    var(--sparkle-cream), var(--sparkle-gold), var(--sparkle-warm),
    var(--sparkle-gold), var(--sparkle-cream), var(--sparkle-warm),
    var(--sparkle-cream), var(--sparkle-gold), var(--sparkle-warm),
    var(--sparkle-gold);
  background-size:
    14px 14px, 10px 10px, 16px 16px,
    8px 8px, 12px 12px, 11px 11px,
    14px 14px, 9px 9px, 13px 13px,
    10px 10px, 15px 15px, 8px 8px,
    11px 11px;
  background-position:
    3% 18%, 11% 82%, 21% 8%,
    32% 92%, 41% 14%, 50% 88%,
    58% 10%, 66% 86%, 74% 16%,
    82% 84%, 89% 12%, 95% 72%,
    98% 32%;
  background-repeat: no-repeat;
  animation: innerPathSparkle 11s ease-in-out infinite;
  filter: drop-shadow(0 0 3px var(--sparkle-glow));
}
@media (prefers-reduced-motion: reduce) {
  .page-title--sparkle .page-title__text::after { animation: none; opacity: 0.7; }
}
#inner-path .section__text p,
#inner-path .inner-path__list { font-weight: 500; }
.inner-path__list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.4rem);
  line-height: 1.9;
}
.inner-path__list li::before {
  content: "·";
  color: var(--gold);
  margin-right: 0.6em;
}
.inner-path__fine {
  color: var(--muted-text);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}
.inner-path__cta {
  display: inline-block;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.85em 2.2em;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px var(--gold-shadow);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), background-color 240ms var(--ease);
}
.inner-path__cta:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--gold-shadow-strong);
}
.inner-path__cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.inner-path__waves {
  display: block;
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  height: clamp(90px, 11vw, 150px);
  margin: 2rem 0 0;
  color: var(--gold);
  overflow: visible;
}

/* Contact */
.contact-form {
  width: min(32rem, 100%);
  margin: 0 auto;
  text-align: left;
}
.contact-form__field {
  display: block;
  margin-block: 1rem;
}
.contact-form__label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 0.4rem;
}
.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid var(--taupe);
  background: transparent;
  font: inherit;
  color: var(--ink);
  border-radius: 4px;
  resize: vertical;
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}
.contact-form__submit {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85em 1.25em;
  background: transparent;
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease);
}
.contact-form__submit:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.contact-form__status {
  min-height: 1.5em;
  margin: 1rem 0 0;
  text-align: center;
  color: var(--muted-text);
  font-style: italic;
}

/* Talks — quiet "submit a topic" disclosure */
.topic-submit {
  width: min(32rem, 100%);
  margin: 0.5rem auto 0;
  text-align: center;
}
.page-subtitle + .topic-submit {
  margin-top: -2.25rem;
}
.topic-submit__summary {
  display: inline-block;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted-text);
  opacity: 0.7;
  padding: 0.25rem 0.5rem;
  list-style: none;
  transition: opacity 240ms var(--ease), color 240ms var(--ease);
}
.topic-submit__summary::-webkit-details-marker { display: none; }
.topic-submit__summary:hover,
.topic-submit__summary:focus-visible {
  opacity: 1;
  color: var(--gold);
}
.topic-submit[open] .topic-submit__summary {
  opacity: 1;
  margin-bottom: 0.5rem;
}
.topic-submit__form {
  margin-top: 0.5rem;
  text-align: left;
}

/* =============================================================
   Footer
   ============================================================= */

.site-footer {
  padding: 3rem var(--pad-x) 4rem;
  text-align: center;
  color: var(--muted-text);
  font-size: 0.95rem;
  border-top: 1px solid var(--footer-rule);
  margin-top: 4rem;
}
.site-footer p { margin: 0; }

/* =============================================================
   Reveal-on-scroll (progressively enhanced by main.js)
   Without JS: content stays visible (no .js class).
   With JS: .js .reveal starts hidden, .is-visible fades in.
   ============================================================= */

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =============================================================
   Reduced motion: respect user preference
   ============================================================= */

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

/* =============================================================
   Login CTA (in nav)
   ============================================================= */

.nav-menu a.nav-cta {
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 0.35em 1em;
  color: var(--ink);
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease);
}
.nav-menu a.nav-cta:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

@media (max-width: 767.98px) {
  .nav-menu a.nav-cta {
    padding: 0.5rem 1.25rem;
  }
}

/* =============================================================
   Login (auth)
   ============================================================= */

.auth {
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 6rem var(--pad-x) 4rem;
}
.auth__card {
  width: min(28rem, 100%);
  text-align: center;
}
.auth__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.auth__subtitle {
  color: var(--muted-text);
  margin: 0 0 2rem;
  font-style: italic;
}
.auth__field {
  display: block;
  margin-block: 1rem;
  text-align: left;
}
.auth__label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 0.4rem;
}
.auth__field input {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid var(--taupe);
  background: transparent;
  font: inherit;
  color: var(--ink);
  border-radius: 4px;
}
.auth__field input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}
.auth__submit {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85em 1.25em;
  background: transparent;
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease);
}
.auth__submit:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.auth__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.auth__actions .auth__submit {
  margin-top: 0;
}
/* Primary button — filled; "Become a member" keeps the outline look. */
.auth__actions .auth__submit:first-child {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-fg);
}
.auth__actions .auth__submit:first-child:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
}

/* =============================================================
   Inner Path pages
   ============================================================= */

.page-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  text-align: center;
  margin: clamp(6rem, 12vw, 9rem) 0 1rem;
  color: var(--ink);
}
.page-subtitle {
  text-align: center;
  color: var(--muted-text);
  font-style: italic;
  margin: 0 auto 3rem;
  max-width: var(--max-text);
  padding: 0 var(--pad-x);
}
.page-subtitle--wide {
  max-width: min(100%, 70ch);
}
.page-subtitle--wide span {
  display: inline-block;
}
.home-section__heading {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  margin: 2.25rem 0 0.6rem;
}
.home-section__heading:first-child {
  margin-top: 0;
}

.talk {
  margin-block: 2.75rem;
}
.talk__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}
.talk__meta {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin: 0 0 0.75rem;
}
.talk audio {
  width: 100%;
  margin-top: 0.5rem;
}

/* =============================================================
   User menu (Inner Path nav dropdown)
   ============================================================= */

.user-menu {
  position: relative;
}

.user-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 0.35em 1em;
  cursor: pointer;
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease);
}
.user-menu__button:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.user-menu__list {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 12rem;
  background: var(--bg);
  border: 1px solid var(--menu-border);
  border-radius: 6px;
  box-shadow: 0 6px 20px var(--card-shadow);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.user-menu[aria-expanded="true"] .user-menu__list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu .user-menu__list a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  color: var(--muted-text);
  border: none;
}
.nav-menu .user-menu__list a:hover {
  color: var(--ink);
  background: var(--gold-soft);
}

/* Mobile: dropdown becomes inline within fullscreen nav overlay */
@media (max-width: 767.98px) {
  .user-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }
  .user-menu__list {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: none;
    text-align: center;
  }
  .user-menu[aria-expanded="true"] .user-menu__list {
    display: block;
  }
  .nav-menu .user-menu__list a {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.25rem, 5vw, 1.6rem);
    color: var(--ink);
    padding: 0.4rem 1rem;
  }
}
