/* ══════════════════════════════════════════
   WithLore — Shared Styles
   Used on every page via base.njk
   ══════════════════════════════════════════ */

@font-face {
  font-family: 'FT88 Italic';
  src: url('/fonts/FT88-Italic.woff2') format('woff2'),
       url('/fonts/FT88-Italic.otf') format('opentype'),
       url('/fonts/FT88-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #090909;
  --white: #ffffff;
  --cream: #f5f4f0;
  --gold: #fec106;
  --gold-dim: #d4a005;
  --dark-gray: #1e1e1e;
  --mid-gray: #6b6b6b;
  --light-gray: #e0deda;
  --red-accent: #e8380d;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--cream); color: var(--dark-gray); overflow-x: hidden; }
::selection { background: var(--gold); color: var(--black); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Containers ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container--full { max-width: 100%; padding: 0; }

/* ── Section Label ── */
.section-label {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--mid-gray);
  display: flex; align-items: center; gap: 8px; margin-bottom: 24px;
}
.section-label::before { content: ''; width: 8px; height: 8px; background: var(--gold); }

/* ── Navigation ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 20px 0; transition: all 0.3s; background: transparent; }
.nav.scrolled { background: rgba(9,9,9,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 14px 0; }
.nav--dark { background: rgba(9,9,9,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 14px 0; }
.nav__inner { display: flex; justify-content: space-between; align-items: center; max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.nav__logo { display: flex; align-items: center; height: 28px; }
.nav__logo img { height: 100%; width: auto; }
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__link { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.nav__link:hover { color: #fff; }
.nav__cta { font-size: 13px; font-weight: 600; color: var(--black); background: var(--gold); padding: 10px 24px; border: none; cursor: pointer; transition: all 0.2s; }
.nav__cta:hover { background: var(--gold-dim); }

/* ── Buttons ── */
.btn-primary { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--black); background: var(--gold); padding: 16px 32px; border: none; cursor: pointer; transition: all 0.25s; text-decoration: none; }
.btn-primary:hover { background: var(--gold-dim); transform: translateY(-1px); }
.btn-primary svg { width: 16px; height: 16px; transition: transform 0.2s; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 15px; font-weight: 500; color: #fff; padding: 16px 24px; border: 1.5px solid rgba(255,255,255,0.25); background: transparent; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-secondary:hover { border-color: #fff; }
.btn-secondary--dark { color: var(--black); border-color: var(--light-gray); }
.btn-secondary--dark:hover { border-color: var(--black); }

/* ── Footer ── */
.footer { padding: 64px 0 48px; background: var(--black); border-top: 1px solid rgba(255,255,255,0.08); }
.footer__top { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 40px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col:first-child { gap: 16px; }
.footer__col-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.25); margin-bottom: 4px; }
.footer__logo { display: flex; align-items: center; height: 24px; }
.footer__logo img { height: 100%; width: auto; }
.footer__link { font-size: 13px; color: rgba(255,255,255,0.4); transition: color 0.2s; line-height: 1.6; }
.footer__link:hover { color: #fff; }
.footer__copy { font-size: 12px; color: rgba(255,255,255,0.25); }

/* ── Animations ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── FAQ (shared component) ── */
.faq { padding: 120px 0; background: var(--white); }
.faq__grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; }
.faq__headline { font-family: var(--font-display); font-size: clamp(36px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; color: var(--black); }
.faq__items { display: flex; flex-direction: column; }
.faq__item { border-bottom: 1px solid var(--light-gray); overflow: hidden; }
.faq__question { width: 100%; background: none; border: none; text-align: left; padding: 24px 0; font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--black); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq__question::after { content: '+'; font-size: 20px; font-weight: 300; flex-shrink: 0; transition: transform 0.3s; }
.faq__item.active .faq__question::after { transform: rotate(45deg); }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq__answer-inner { padding-bottom: 24px; font-size: 15px; line-height: 1.7; color: var(--mid-gray); }

/* ── CTA Block (shared component) ── */
.cta-block { padding: 120px 0; background: var(--black); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-block__inner { position: relative; z-index: 2; }
.cta-block__label { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 24px; }
.cta-block__headline { font-family: var(--font-display); font-size: clamp(40px, 5vw, 72px); line-height: 1.05; letter-spacing: -0.03em; max-width: 800px; margin: 0 auto 24px; }
.cta-block__sub { font-size: 18px; color: rgba(255,255,255,0.6); max-width: 500px; margin: 0 auto 48px; line-height: 1.6; }
.cta-block .btn-primary { margin: 0 auto; }
.cta-block__note { margin-top: 20px; font-size: 13px; color: rgba(255,255,255,0.35); }

/* ── Onboarding Modal ── */
.ob-modal { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; }
.ob-modal.active { display: flex; }
.ob-modal__backdrop { position: absolute; inset: 0; background: rgba(9,9,9,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); cursor: pointer; animation: obFadeIn 0.25s ease; }
.ob-modal__content { position: relative; z-index: 1; background: var(--black); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; width: 90vw; max-width: 560px; max-height: 90vh; overflow-y: auto; animation: obSlideUp 0.3s ease; display: flex; flex-direction: column; }
.ob-modal__close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: rgba(255,255,255,0.35); font-size: 28px; cursor: pointer; padding: 4px 8px; line-height: 1; transition: color 0.2s; z-index: 2; }
.ob-modal__close:hover { color: #fff; }
.ob-modal__progress { height: 3px; background: rgba(255,255,255,0.06); border-radius: 12px 12px 0 0; overflow: hidden; }
.ob-modal__progress-bar { height: 100%; background: var(--gold); width: 20%; transition: width 0.4s ease; }

/* Steps */
.ob-step { display: none; padding: 40px 32px 32px; animation: obStepIn 0.35s ease; }
.ob-step.active { display: block; }
.ob-step__kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.ob-step__title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 28px); color: #fff; line-height: 1.2; margin-bottom: 8px; }
.ob-step__sub { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.45); margin-bottom: 24px; }

/* Back button */
.ob-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: rgba(255,255,255,0.35); font-size: 13px; font-family: var(--font-body); cursor: pointer; padding: 0; margin-bottom: 16px; transition: color 0.2s; }
.ob-back:hover { color: #fff; }

/* Option cards */
.ob-options { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ob-options--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.08); border-radius: 10px; cursor: pointer; text-align: left; transition: all 0.2s; font-family: var(--font-body); }
.ob-card:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); }
.ob-card.selected { border-color: var(--gold); background: rgba(254,193,6,0.08); }
.ob-card--compact { padding: 14px 16px; align-items: center; text-align: center; }
.ob-card__icon { font-size: 20px; margin-bottom: 2px; }
.ob-card__label { font-size: 15px; font-weight: 600; color: #fff; }
.ob-card__desc { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.4; }

/* Form */
.ob-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.ob-input { width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.1); border-radius: 8px; font-family: var(--font-body); font-size: 15px; color: #fff; outline: none; transition: border-color 0.2s; }
.ob-input::placeholder { color: rgba(255,255,255,0.3); }
.ob-input:focus { border-color: var(--gold); }
.ob-submit { width: 100%; justify-content: center; margin-top: 4px; }
.ob-error { font-size: 13px; color: var(--red-accent); margin-top: 12px; }

/* Skip */
.ob-skip { display: block; width: 100%; background: none; border: none; color: rgba(255,255,255,0.3); font-size: 13px; font-family: var(--font-body); cursor: pointer; padding: 16px 0 0; text-align: center; transition: color 0.2s; }
.ob-skip:hover { color: rgba(255,255,255,0.6); }

/* Roam embed container */
#ob-roam-lobby { min-width: 100% !important; }

@keyframes obFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes obSlideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes obStepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── Onboarding Responsive ── */
@media (max-width: 600px) {
  .ob-modal__content { width: 100%; max-width: 100%; max-height: 100vh; border-radius: 0; height: 100vh; }
  .ob-step { padding: 32px 20px 24px; }
  .ob-options--grid { grid-template-columns: 1fr; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .faq__grid { grid-template-columns: 1fr; gap: 48px; }
  .nav__links { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  /* Base responsive handled per-page */
}
