/* Font pairing - swap here to try alternatives, nothing else needs to change:
   Space Grotesk + Inter Tight   -> current (clean, geometric, techy)
   Bricolage Grotesque + Manrope -> swap both @import + font-family below
   Unbounded + Onest             -> softer/rounder, more playful
   Archivo Narrow + Inter        -> literal condensed/narrow headlines
*/
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600&family=Inter+Tight:wght@300;400;500&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink, #1a1a1a);
  background: #FBFAF8;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

a { color: var(--accent, #333); }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink, #1a1a1a);
  text-decoration: none;
}

.nav-cta, .cta-primary {
  display: inline-block;
  background: var(--accent, #333);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 100px;
  text-decoration: none;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  box-shadow: 0 6px 16px -6px var(--accent, #333);
}

.hero {
  max-width: 760px;
  margin: 70px auto 40px;
  padding: 0 24px;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.02rem;
  font-weight: 300;
  color: #555;
  max-width: 520px;
  margin: 0 auto 28px;
}

.hero-fine {
  margin-top: 16px;
  font-size: 0.82rem;
  color: #888;
}

.marquee-wrap {
  overflow: hidden;
  padding: 18px 0;
  margin: 8px 0 48px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 36px;
  animation: marquee-scroll 26s linear infinite;
}

.marquee-track span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0.8;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}


.details {
  max-width: 1000px;
  margin: 60px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.detail-card {
  background: var(--accent-soft, #f2f2f2);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 12px 28px -16px rgba(0,0,0,0.12);
}

.detail-card ul, .detail-card ol {
  padding-left: 20px;
  color: #333;
}

.pricing {
  max-width: 500px;
  margin: 70px auto;
  text-align: center;
  padding: 0 24px;
}

.price-card {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  padding: 36px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.03), 0 24px 48px -24px rgba(0,0,0,0.16);
}

.price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 3rem;
  margin: 0;
  color: var(--accent);
}

.price-sub { color: #555; margin: 4px 0 16px; }
.price-note { font-size: 0.85rem; color: #888; margin-bottom: 20px; }

.site-footer {
  text-align: center;
  padding: 40px 24px;
  color: #888;
  font-size: 0.85rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 60px;
}

.form-section {
  max-width: 560px;
  margin: 60px auto;
  padding: 0 24px;
}

.form-section.centered { text-align: center; }

.form-sub { color: #555; margin-bottom: 24px; }

.form-error {
  background: #FBEAEA;
  color: #A13A3A;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.app-form label {
  display: block;
  margin-bottom: 18px;
  font-weight: 500;
  font-size: 0.92rem;
}

.app-form input[type=text],
.app-form input[type=email],
.app-form input[type=tel],
.app-form textarea,
.app-form input[type=file] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.98rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
}
.checkbox-row input { width: auto; margin-top: 3px; }

.waiver-box {
  background: var(--accent-soft, #f2f2f2);
  border-radius: 10px;
  padding: 20px;
  font-size: 0.92rem;
  color: #333;
  margin-bottom: 24px;
  max-height: 240px;
  overflow-y: auto;
}

/* Admin */
.admin-main { max-width: 1100px; margin: 40px auto; padding: 0 24px; }
.section-spacer { margin-top: 56px; }
.admin-whoami { margin-right: 16px; color: #666; font-size: 0.85rem; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}
.row-flagged { background: #FBF3E3; }
.alert-box {
  background: #FBF3E3;
  border: 1px solid #E8CC8E;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 30px;
}

@media (max-width: 800px) {
  .details { grid-template-columns: 1fr; }
  .site-header { padding: 16px 20px; flex-direction: column; gap: 10px; }
}

/* ============================================================================
   Per-segment themes. Activated by [data-theme="..."] on <html>, set by
   config.js from /api/config's "theme" field, which comes from each
   segment's entry in app/config.py's SEGMENTS dict. Swap which theme goes
   with which segment there (one line, e.g. "theme": "brutalist") - nothing
   here needs to change. Base rules above are the shared default; each block
   below only overrides what makes that theme distinct.
   ============================================================================ */

/* 1. Editorial - academia. Serif headline, thin rules, magazine feel. */
[data-theme="editorial"] .hero h1,
[data-theme="editorial"] .price {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}
[data-theme="editorial"] .brand { font-family: 'Instrument Serif', serif; font-size: 1.3rem; }
[data-theme="editorial"] .hero { border-bottom: 1px solid var(--accent); padding-bottom: 40px; }
[data-theme="editorial"] .detail-card { background: transparent; border-top: 1px solid var(--accent); border-radius: 0; padding-top: 20px; box-shadow: none; }
[data-theme="editorial"] .nav-cta, [data-theme="editorial"] .cta-primary { border-radius: 2px; box-shadow: none; }

/* 2. Soft rounded - teaching. Big radius everywhere, pill buttons, gentle. */
[data-theme="soft-rounded"] .nav-cta, [data-theme="soft-rounded"] .cta-primary { border-radius: 100px; padding: 12px 26px; }
[data-theme="soft-rounded"] .detail-card { border-radius: 28px; }
[data-theme="soft-rounded"] .price-card { border-radius: 32px; border: none; background: var(--accent-soft); }
[data-theme="soft-rounded"] .app-form input, [data-theme="soft-rounded"] .app-form textarea { border-radius: 18px; }
[data-theme="soft-rounded"] .waiver-box { border-radius: 20px; }

/* 3. Bold blocks - dc-counseling. Solid color panels, high contrast. */
[data-theme="bold-blocks"] .hero { background: var(--ink); color: #fff; padding: 56px 24px; border-radius: 4px; box-shadow: 0 24px 48px -24px rgba(0,0,0,0.35); }
[data-theme="bold-blocks"] .hero .eyebrow,
[data-theme="bold-blocks"] .hero h1,
[data-theme="bold-blocks"] .hero-sub,
[data-theme="bold-blocks"] .hero-fine { color: #fff; }
[data-theme="bold-blocks"] .detail-card { border-radius: 2px; background: var(--accent); color: #fff; }
[data-theme="bold-blocks"] .detail-card h3 { color: #fff; }
[data-theme="bold-blocks"] .nav-cta, [data-theme="bold-blocks"] .cta-primary { border-radius: 2px; }

/* 4. Vibrant - womens-counseling. Warm wash behind hero, glow on CTA. */
[data-theme="vibrant"] .hero { background: linear-gradient(160deg, var(--accent-soft), #fff); padding: 56px 24px; border-radius: 24px; }
[data-theme="vibrant"] .cta-primary { box-shadow: 0 8px 24px -8px var(--accent); border-radius: 100px; }
[data-theme="vibrant"] .price-card { border-radius: 24px; border: 1.5px solid var(--accent); }
[data-theme="vibrant"] .detail-card { border-radius: 20px; }

/* 5. Glass - medicine. Translucent floating cards, clinical calm. */
[data-theme="glass"] .detail-card { background: rgba(255,255,255,0.55); backdrop-filter: blur(6px); border: 1px solid var(--accent-soft); border-radius: 18px; }
[data-theme="glass"] .price-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(6px); border-radius: 18px; }
[data-theme="glass"] body { background: linear-gradient(180deg, var(--accent-soft), #FBFAF8 340px); }
[data-theme="glass"] .nav-cta, [data-theme="glass"] .cta-primary { border-radius: 10px; }

/* 6. Mono - nursing. Monospace accents, terminal feel, tight tracking. */
[data-theme="mono"] .eyebrow { font-family: 'JetBrains Mono', monospace; letter-spacing: 0; text-transform: none; }
[data-theme="mono"] .price { font-family: 'JetBrains Mono', monospace; letter-spacing: -0.01em; }
[data-theme="mono"] .detail-card { border-radius: 4px; border-left: 3px solid var(--accent); background: var(--accent-soft); box-shadow: none; }
[data-theme="mono"] .nav-cta, [data-theme="mono"] .cta-primary { border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; box-shadow: none; }

/* 7. Outline - saratoga-springs. Hairline outlines only, no fills. */
[data-theme="outline"] .nav-cta, [data-theme="outline"] .cta-primary {
  background: transparent; color: var(--accent) !important; border: 1px solid var(--accent); border-radius: 2px; box-shadow: none;
}
[data-theme="outline"] .detail-card { background: transparent; border: 1px solid var(--accent-soft); border-radius: 2px; box-shadow: none; }
[data-theme="outline"] .price-card { background: transparent; border: 1px solid var(--accent); border-radius: 2px; box-shadow: none; }
[data-theme="outline"] .hero { border: 1px solid var(--accent-soft); padding: 48px 24px; border-radius: 2px; }

/* 8. Brutalist - nyc-womens. Thick square borders, stark contrast. */
[data-theme="brutalist"] * { border-radius: 0 !important; }
[data-theme="brutalist"] .nav-cta, [data-theme="brutalist"] .cta-primary { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
[data-theme="brutalist"] .detail-card { border: 2px solid var(--ink); background: #fff; box-shadow: 4px 4px 0 var(--ink); }
[data-theme="brutalist"] .price-card { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
[data-theme="brutalist"] .hero h1 { text-transform: uppercase; letter-spacing: -0.01em; }
