/* ====================================================================
   Choreodle Unified Stylesheet
   Combines colors_and_type.css, components.css, and site.css.
   ==================================================================== */

/* ── PART 1: Brand foundations (colors & typography tokens) ── */
/* ====================================================================
   Choreodle Design System — Colors & Type
   The single source of truth for brand foundations.
   ==================================================================== */

@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-VariableFont_wdth_wght.ttf') format('truetype-variations'),
       url('../fonts/Roboto-VariableFont_wdth_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Brand Colors ─────────────────────────────────────────────── */
  --color-ink-blue:      #0E1B2A;
  --color-stage-blue:    #112B3C;
  --color-tertiary-blue: #1A4B5C;

  --color-teal-accent:   #0E7490;
  --color-gold-accent:   #F4B942;
  --color-cream-tint:    #F6F2E8;

  /* Status / feedback */
  --color-status-correct:   #388E3C;
  --color-status-misplaced: #F57C00;
  --color-status-emphasis:  #FF7A59;

  /* ── Semantic color aliases ───────────────────────────────────── */
  --bg-page:        var(--color-ink-blue);
  --bg-surface:     var(--color-stage-blue);
  --bg-elevated:    var(--color-tertiary-blue);

  --fg-primary:     var(--color-cream-tint);
  --fg-secondary:   rgba(246, 242, 232, 0.70);
  --fg-hint:        rgba(246, 242, 232, 0.39);
  --fg-on-gold:     var(--color-ink-blue);
  --fg-on-teal:     var(--color-cream-tint);

  /* Backward-compat aliases used by components.css */
  --text-primary:   var(--color-cream-tint);
  --text-secondary: rgba(246, 242, 232, 0.70);
  --text-hint:      rgba(246, 242, 232, 0.39);

  --accent-primary: var(--color-teal-accent);
  --accent-cta:     var(--color-gold-accent);

  --surface-overlay-light:  rgba(255, 255, 255, 0.09);
  --surface-overlay-medium: rgba(255, 255, 255, 0.16);
  --surface-overlay-strong: rgba(255, 255, 255, 0.90);
  --border-subtle:          rgba(255, 255, 255, 0.14);

  /* ── Signature gradient ───────────────────────────────────────── */
  --gradient-bg: linear-gradient(
    180deg,
    #0E1B2A 0%,
    #112B3C 50%,
    #1A4B5C 100%
  );

  /* ── Typography ───────────────────────────────────────────────── */
  --font-base:    'Roboto', system-ui, -apple-system, BlinkMacSystemFont,
                  'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'Roboto', system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --text-xs:  11px;
  --text-sm:  12px;
  --text-md:  14px;
  --text-lg:  16px;
  --text-xl:  20px;
  --text-2xl: 30px;
  --text-3xl: 44px;
  --text-4xl: 64px;
  --text-5xl: 88px;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    800;
  --fw-black:   900;

  --ls-tight:  -0.05em;
  --ls-normal: 0;
  --ls-wide:   0.04em;

  --lh-tight: 1.0;
  --lh-snug:  1.15;
  --lh-body:  1.5;

  /* ── Spacing scale ────────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 80px;

  /* ── Radii ────────────────────────────────────────────────────── */
  --radius-sm:   12px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-xl:   24px;
  --radius-2xl:  28px;
  --radius-full: 9999px;

  /* ── Shadow ───────────────────────────────────────────────────── */
  --shadow-card: 0 12px 20px rgba(0, 0, 0, 0.133);
  --shadow-slot: 0 8px 18px rgba(0, 0, 0, 0.20);
  --shadow-lift: 0 24px 40px rgba(0, 0, 0, 0.30);
}

/* ── Semantic type classes ─────────────────────────────────────── */

.t-hero {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--fg-primary);
}

.t-display {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--fg-primary);
}

.t-h1 {
  font-size: var(--text-3xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}

.t-h2 {
  font-size: var(--text-2xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}

.t-h3 {
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}

.t-subtitle {
  font-size: var(--text-lg);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  color: var(--fg-secondary);
}

.t-body {
  font-size: var(--text-md);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--fg-primary);
}

.t-hint {
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  line-height: 1.4;
  color: var(--fg-hint);
}

.t-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-secondary);
}

.t-mono {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--fg-primary);
}


/* ── PART 2: UI Component classes ── */
/* ====================================================================
   Choreodle Design System — Component Classes
   ==================================================================== */

/* ── Page background ─────────────────────────────── */

.page-bg {
  min-height: 100vh;
  background: var(--gradient-bg);
  font-family: var(--font-base);
  color: var(--text-primary);
}

/* ── Typography ──────────────────────────────────── */

.text-headline {
  font-size: var(--text-2xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  line-height: 1.1;
}

.text-title {
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1.25;
}

.text-subtitle {
  font-size: var(--text-lg);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  line-height: 1.4;
}

.text-body {
  font-size: var(--text-md);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  line-height: 1.5;
}

.text-hint {
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  color: var(--text-hint);
  line-height: 1.4;
}

/* ── Buttons ─────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  cursor: pointer;
  font-family: var(--font-base);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Primary CTA — gold background */
.btn-primary {
  background-color: var(--color-gold-accent);
  color: var(--color-ink-blue);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

/* Secondary — outlined gold */
.btn-secondary {
  background-color: transparent;
  color: var(--color-gold-accent);
  border: 1.5px solid var(--color-gold-accent);
  padding: calc(var(--space-4) - 1.5px) calc(var(--space-5) - 1.5px);
}

.btn-secondary:hover:not(:disabled) {
  background-color: rgba(244, 185, 66, 0.08);
}

/* Ghost / text button */
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-4);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
}

/* Teal accent button */
.btn-teal {
  background-color: var(--color-teal-accent);
  color: var(--color-cream-tint);
}

.btn-teal:hover:not(:disabled) {
  opacity: 0.9;
}

/* ── Cards ───────────────────────────────────────── */

/* Light card — used for board/content sections */
.card {
  background-color: var(--color-cream-tint);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  color: var(--color-ink-blue);
}

/* Dark card — modals, panels, surface containers */
.card-dark {
  background-color: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
}

/* Guess history row card */
.card-row {
  background-color: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  color: var(--color-ink-blue);
}

/* Outcome card variants */
.card-outcome-success {
  background-color: rgba(56, 142, 60, 0.18);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.card-outcome-failure {
  background-color: rgba(244, 185, 66, 0.16);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

/* ── Chips ───────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background-color: var(--surface-overlay-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

/* Active state — e.g. selected mode toggle */
.chip-active {
  background-color: var(--color-gold-accent);
  border-color: var(--color-gold-accent);
  color: var(--color-ink-blue);
}

/* Toggle group wrapper */
.chip-group {
  display: inline-flex;
  align-items: center;
  background-color: var(--surface-overlay-light);
  border-radius: var(--radius-full);
  padding: var(--space-1);
  gap: var(--space-1);
}

/* ── Badge ───────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background-color: var(--color-ink-blue);
  color: var(--color-cream-tint);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}

/* ── Input ───────────────────────────────────────── */

.input {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--surface-overlay-light);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-base);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.15s ease;
}

.input::placeholder {
  color: var(--text-hint);
}

.input:focus {
  border-color: var(--color-teal-accent);
}

/* ── Status slot ─────────────────────────────────── */

.slot {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  min-width: 110px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.slot-correct   { border-color: var(--color-status-correct); }
.slot-misplaced { border-color: var(--color-status-misplaced); }
.slot-wrong     { border-color: var(--border-subtle); }

/* ── Divider ─────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-4) 0;
}

/* ── Progress dots (attempts meter) ─────────────── */

.attempts-meter {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.attempt-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.22);
}

.attempt-dot-used {
  background-color: var(--color-gold-accent);
}


/* ── PART 3: Page layouts and responsive design ── */
/* ====================================================================
   Choreodle marketing site — shared base & layout
   ==================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: var(--font-base);
  background: var(--bg-page);
  color: var(--fg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.page-shell {
  min-height: 100vh;
  background: var(--gradient-bg);
  background-attachment: fixed;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* Header (shared) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 27, 42, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg-primary);
}
.logo img { width: 32px; height: 32px; }
.logo__word {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
}
.logo__dot { color: var(--color-gold-accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-secondary);
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--fg-primary); }
.site-nav a.is-active { color: var(--color-gold-accent); }

.site-nav .btn {
  padding: 10px 16px;
  font-size: 14px;
  margin-left: 8px;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--fg-primary);
  padding: 4px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open  { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* Footer (shared) */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 80px;
  padding: 56px 0 40px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
}
.site-footer__col h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-hint);
  margin: 0 0 14px;
}
.site-footer__col a {
  display: block;
  font-size: 14px;
  color: var(--fg-secondary);
  text-decoration: none;
  padding: 5px 0;
}
.site-footer__col a:hover { color: var(--fg-primary); }
.site-footer__brand p {
  font-size: 13px;
  color: var(--fg-hint);
  line-height: 1.5;
  margin: 12px 0 0;
  max-width: 280px;
}
.site-footer__legal {
  max-width: 1120px;
  margin: 48px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-hint);
  flex-wrap: wrap;
}

/* Store badges */
.store-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.store-badge-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.store-badge-link:hover { opacity: 0.85; }
.store-badge-link:active { transform: scale(0.97); }
.store-badge-link img {
  display: block;
  height: 56px;
  width: auto;
}
/* Google Play badge has ~25% transparent clear-space baked in; bump
   height and pull margins so the visible badge matches the Apple badge. */
.store-badge-link img[src*="google-play"] {
  height: 84px;
  margin: -14px -10px;
}

/* Prose pages (legal, press, support) */
.prose-page {
  padding: 64px 0 40px;
}
.prose-page h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.02;
  margin: 0 0 12px;
}
.prose-page .prose-meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-accent);
  margin-bottom: 20px;
}
.prose-page .prose-updated {
  font-size: 13px;
  color: var(--fg-hint);
  margin-bottom: 48px;
}
.prose-page h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 48px 0 12px;
  color: var(--fg-primary);
}
.prose-page h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 28px 0 8px;
  color: var(--fg-primary);
}
.prose-page p,
.prose-page li {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fg-secondary);
  font-weight: 400;
}
.prose-page p { margin: 0 0 14px; }
.prose-page ul, .prose-page ol { padding-left: 22px; margin: 0 0 14px; }
.prose-page li { margin-bottom: 6px; }
.prose-page a {
  color: var(--color-gold-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose-page strong { color: var(--fg-primary); font-weight: 700; }
.prose-page hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 40px 0;
}

.toc {
  background: var(--surface-overlay-light);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 48px;
}
.toc h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-hint);
  margin: 0 0 10px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 32px;
}
.toc ol li {
  font-size: 13px;
  padding: 4px 0;
  break-inside: avoid;
}
.toc a { color: var(--fg-secondary); text-decoration: none; }
.toc a:hover { color: var(--color-gold-accent); }

/* Call-out box */
.callout {
  background: var(--surface-overlay-light);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--color-gold-accent);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Definition table */
.defs {
  margin: 16px 0 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}
.defs__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border-top: 1px solid var(--border-subtle);
}
.defs__row:first-child { border-top: none; }
.defs__row dt,
.defs__row dd {
  padding: 14px 20px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.defs__row dt {
  background: var(--surface-overlay-light);
  font-weight: 700;
  color: var(--fg-primary);
}
.defs__row dd { color: var(--fg-secondary); }

/* ── Responsive layout grids ─────────────────────────────── */

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.dances-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: rgba(14, 27, 42, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 16px 20px;
  }
  .site-nav.is-open { display: flex; }

  .site-nav a {
    font-size: 16px;
    padding: 12px 14px;
  }
  .site-nav .btn {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }

  .hero-grid,
  .two-col-grid { grid-template-columns: 1fr; gap: 32px; }

  .dances-grid { grid-template-columns: 1fr; }

  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .toc ol { columns: 1; }
  .defs__row { grid-template-columns: 1fr; }
  .defs__row dt { border-bottom: 1px solid var(--border-subtle); }
}
