:root {
  --shell: #1a1a2e;
  --text: #2d2a32;
  --page: #ffffff;
  --accent: #6b5ce7;
  --teal: #4a90a4;
  --rule: #e8e6ef;
  --muted: #6b6570;
  --page-soft: #f6f5fb;
  --surface: #ffffff;
  --header-glass: rgba(255, 255, 255, 0.38);
  --header-border: rgba(232, 230, 239, 0.55);
  --shadow: rgba(45, 42, 50, 0.1);
  --hero-fg: #ffffff;
}

html[data-theme="dark"] {
  --shell: #0b0b12;
  --text: #eceaf4;
  --page: #12121a;
  --accent: #9b8cff;
  --teal: #6ec4d4;
  --rule: #2c2c3c;
  --muted: #a8a4b8;
  --page-soft: #1a1a26;
  --surface: #1a1a26;
  --header-glass: rgba(18, 18, 26, 0.38);
  --header-border: rgba(44, 44, 60, 0.65);
  --shadow: rgba(0, 0, 0, 0.35);
  --hero-fg: #f3f1ff;
  color-scheme: dark;
}

html {
  color-scheme: light;
}

body {
  background-color: var(--page);
  color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.font-heads { font-family: Fraunces, Georgia, serif; }
.font-body { font-family: "Source Sans 3", system-ui, sans-serif; }
.font-mono { font-family: "Source Sans 3", ui-monospace, monospace; letter-spacing: 0.04em; }

.rule-t { border-top: 1px solid var(--rule); }
.rule-b { border-bottom: 1px solid var(--rule); }
.rule-l { border-left: 1px solid var(--rule); }

.btn {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  filter: brightness(0.95);
  box-shadow: 0 6px 20px rgba(107, 92, 231, 0.28);
}
.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  background: transparent;
  border-radius: 999px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn-ghost {
  border: 1px solid var(--rule);
  color: var(--text);
  background: var(--surface);
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.lnk { transition: color 0.2s ease; }
.lnk:hover { color: var(--accent); }

.chip {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  display: inline-block;
  border-radius: 999px;
}
.chip-premium {
  background: var(--teal);
  color: #fff;
}

.story-row {
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s ease;
}
.story-row:hover { background: var(--page-soft); }

.tint { background: var(--page-soft); border-radius: 12px; }
.quote { border-left: 3px solid var(--accent); }
.num { color: var(--accent); }

/* Sticky header — semi-transparent, does not leave content unreadable underneath */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--header-border);
}
.site-header::before { display: none; }

.site-logo {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
  color: var(--text);
}
.site-logo .logo-line {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.site-logo .logo-line-soft {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-link {
  position: relative;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.35rem 0;
  transition: color 0.2s ease;
  opacity: 0.88;
}
.nav-link::after { display: none; }
.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  opacity: 1;
}

.nav-dd { position: relative; }
.nav-dd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}
.nav-dd-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 13rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 16px 40px var(--shadow);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.nav-dd:hover .nav-dd-panel,
.nav-dd:focus-within .nav-dd-panel,
.nav-dd.is-open .nav-dd-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dd-panel a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-dd-panel a:hover {
  background: var(--page-soft);
  color: var(--accent);
}

.mobile-panel {
  border-top: 1px solid var(--rule);
  background: var(--surface);
}
.mobile-panel a { color: var(--text) !important; }
.mobile-sub { padding-left: 1.25rem; }
.mobile-sub a {
  font-size: 0.9rem;
  color: var(--muted) !important;
}

.hero-bleed {
  position: relative;
  min-height: min(72vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--shell);
}
.hero-bleed:not(.hero-carousel) > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transform: scale(1.04);
  animation: heroZoom 12s ease-out forwards;
}
.hero-bleed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.2) 0%, rgba(26, 26, 46, 0.88) 78%);
  z-index: 1;
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3rem 0 3.5rem;
  animation: heroFade 0.9s ease-out both;
  color: var(--hero-fg);
}
.hero-copy .text-page,
.hero-copy .text-rule { color: var(--hero-fg) !important; }
.hero-brand-soft { color: #c9c4ff; }

.hero-carousel {
  touch-action: pan-y;
  min-height: min(78vh, 700px);
}
.hero-carousel [data-hero-ctas] {
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hero-carousel.is-ready [data-hero-ctas] {
  opacity: 1;
}
.hero-carousel .hero-copy {
  padding: 3.25rem 0 4.25rem;
  max-width: 100%;
}
.hero-carousel-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.65s ease, transform 8s ease-out;
  pointer-events: none;
}
.hero-carousel-img.is-active {
  opacity: 0.55;
  transform: scale(1);
  z-index: 1;
}
.hero-carousel-meta {
  min-height: 5.75rem;
}
.hero-carousel-meta .text-accent {
  color: #b7aeff !important;
}
.hero-carousel-meta h2 {
  text-wrap: balance;
}
.hero-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(26, 26, 46, 0.28);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hero-carousel:hover .hero-carousel-btn,
.hero-carousel:focus-within .hero-carousel-btn {
  opacity: 0.7;
  pointer-events: auto;
}
.hero-carousel-btn:hover {
  opacity: 1 !important;
  background: rgba(26, 26, 46, 0.55);
}
.hero-carousel-prev { left: 0.75rem; }
.hero-carousel-next { right: 0.75rem; }
.hero-carousel-dots {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  pointer-events: none;
}
.hero-carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-carousel-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}
@media (max-width: 767.98px) {
  .hero-carousel {
    min-height: min(70vh, 620px);
  }
  .hero-carousel-btn {
    opacity: 0.35;
    pointer-events: auto;
    width: 2.35rem;
    height: 2.35rem;
  }
  .hero-carousel-meta { min-height: 4.75rem; }
  .hero-carousel-meta h2 {
    font-size: 1.35rem !important;
    line-height: 1.25;
  }
  .hero-carousel .hero-copy {
    padding-left: 3.25rem;
    padding-right: 3.25rem;
  }
}

/* Sticky header offset for in-page anchors */
#a-la-une,
#content section[id] {
  scroll-margin-top: 5.5rem;
}

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

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes paywallIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767.98px) {
  .mobile-panel { display: none; }
  .mobile-panel.open { display: block; }
  .hero-bleed:not(.hero-carousel) { min-height: 64vh; }
}

.paywall-gate { position: relative; margin-top: 1.5rem; }
.paywall-fade {
  pointer-events: none;
  max-height: 9rem;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  filter: blur(1.5px);
  opacity: 0.55;
}
article.is-paywalled .paywall-locked-block {
  display: none !important;
}
.paywall-card {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
  background: var(--shell);
  color: #f5f4fa;
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  animation: paywallIn 0.45s ease-out both;
}
.paywall-card h2 { color: #fff; }

body.paywall-locked { overflow: hidden; }
.paywall-fs {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(26, 26, 46, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem;
  animation: paywallIn 0.4s ease-out both;
}
.paywall-fs-panel {
  width: min(920px, 100%);
  margin: 1.25rem auto 3rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 28px 70px var(--shadow);
}
@media (min-width: 640px) {
  .paywall-fs-panel { padding: 2.25rem 2rem 2.5rem; }
}
.paywall-fs-plans {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
@media (min-width: 800px) {
  .paywall-fs-plans { grid-template-columns: 1fr 1fr; }
}
.paywall-fs-free { margin-top: 1.25rem; }
.paywall-fs-trial {
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.25rem 1.15rem;
  background: var(--page-soft);
}
.paywall-fs-trial .field { margin-top: 0.9rem; }
.paywall-fs-trial label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.paywall-fs-trial input {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--page);
}
.paywall-fs-trial input:focus {
  outline: 2px solid rgba(107, 92, 231, 0.35);
  border-color: var(--accent);
}

.sw-quiz, .sw-timeline, .sw-audio {
  margin-top: 2rem;
  padding: 1.25rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--page-soft);
}
.sw-quiz h3, .sw-timeline h3, .sw-audio h3 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.sw-quiz-q { margin-top: 1.1rem; }
.sw-quiz-q p { font-weight: 600; }
.sw-quiz-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}
.sw-quiz-opts button {
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.sw-quiz-opts button:hover { border-color: var(--accent); }
.sw-quiz-opts button.is-correct {
  border-color: #2f9e6b;
  background: rgba(47, 158, 107, 0.12);
}
.sw-quiz-opts button.is-wrong {
  border-color: #c45c5c;
  background: rgba(196, 92, 92, 0.12);
}
.sw-quiz-score {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
}
.sw-timeline-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.sw-timeline-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.35rem;
  border-left: 2px solid var(--accent);
  margin-left: 0.35rem;
}
.sw-timeline-list li::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  top: 1.15rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
}
.sw-timeline-list .tl-year {
  font-family: Source Sans 3, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.sw-timeline-list .tl-title {
  display: block;
  margin-top: 0.2rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
}
.sw-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 1rem;
}
.sw-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.sw-audio audio { width: 100%; margin-top: 0.75rem; }

.membership-hero {
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
  padding-top: 3.5rem;
}
.membership-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.15;
  font-weight: 700;
}
.membership-quote {
  margin: 1.75rem auto 0;
  max-width: 34rem;
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.membership-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text);
}
.membership-story {
  max-width: 40rem;
  margin: 3.5rem auto 0;
  text-align: left;
}
.membership-story h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 1.25rem;
}
.plan-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}
@media (min-width: 900px) {
  .plan-grid { grid-template-columns: 1fr 1fr; }
}
.plan-card {
  border: 1px solid var(--rule);
  background: var(--page-soft);
  padding: 2rem 1.75rem;
  border-radius: 18px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.plan-card:hover {
  border-color: var(--accent);
  box-shadow: 0 18px 40px var(--shadow);
  transform: translateY(-2px);
}
.plan-card.is-featured {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 12px 36px var(--shadow);
}
.plan-card h3 { font-size: 1.35rem; font-weight: 700; }
.plan-card ul {
  margin-top: 1.25rem;
  list-style: none;
  padding: 0;
}
.plan-card ul li {
  position: relative;
  padding-left: 1.35rem;
  margin-top: 0.55rem;
  font-size: 0.98rem;
  line-height: 1.45;
}
.plan-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.plan-free {
  margin-top: 1.5rem;
  border: 1px dashed var(--rule);
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
}

.alert-input {
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
}

.card-box {
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding-bottom: 1.25rem;
}

.site-footer {
  background: var(--page-soft);
  color: var(--text);
  border-top: 1px solid var(--rule);
}
.site-footer .text-page { color: var(--text) !important; }
.site-footer .text-rule { color: var(--muted) !important; }
.site-footer .text-muted { color: var(--muted) !important; }
.site-footer a.lnk { color: var(--muted); }
.site-footer a.lnk:hover { color: var(--accent); }
.site-footer .footer-rule {
  border-top: 1px solid var(--rule);
}

#cookie-modal {
  background: var(--surface) !important;
  border-top: 2px solid var(--accent) !important;
  color: var(--text);
}
#cookie-modal .text-rule { color: var(--muted) !important; }
#cookie-modal .btn-outline {
  border-color: var(--rule);
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(26, 26, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  width: min(440px, 100%);
  background: var(--surface);
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 24px 60px var(--shadow);
  animation: paywallIn 0.35s ease-out both;
  border: 1px solid var(--rule);
}
.modal-card h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  color: var(--text);
}
.modal-card label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.modal-card .field { margin-top: 0.9rem; }
.modal-card input {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--page);
}
.modal-card input:focus {
  outline: 2px solid rgba(107, 92, 231, 0.35);
  border-color: var(--accent);
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

/* Tailwind utility overrides that hardcode light colors */
html[data-theme="dark"] .bg-shell { background-color: var(--shell) !important; }
html[data-theme="dark"] .text-page { color: var(--text) !important; }
html[data-theme="dark"] .text-muted { color: var(--muted) !important; }
html[data-theme="dark"] .text-rule { color: var(--muted) !important; }
html[data-theme="dark"] .text-text { color: var(--text) !important; }
