/* marketing/css/marketing.css
 * MorphyLearn public marketing site — morphylearn.com (§8, roadmap).
 *
 * Deliberately NOT the app's own hoc.css/wordLab.css files, and this site
 * has zero build tooling (plain HTML, one stylesheet) per §8.2's own
 * explicit recommendation ("even hand-authored HTML/CSS for a first
 * version"). But the PALETTE and TYPE PAIRING below are not invented —
 * they're the real --hoc-* tokens and the real morpheme color coding
 * already live in the product (src/styles/hoc.css, src/styles/wordLab.css):
 * warm off-white surfaces, espresso ink, and the exact green/blue/gold used
 * for prefix/root/suffix in Smash Apart and Mix & Match. A visitor who
 * signs up and lands in the real app should feel zero visual discontinuity.
 */

:root {
  --ml-bg:         #f4efe6;
  --ml-surface:    #fcf9f4;
  --ml-surface-2:  #efe7da;
  --ml-ink:        #352b20;
  --ml-ink-soft:   #6d5f50;
  --ml-muted:      #9d9081;
  --ml-line:       #e4dac9;
  --ml-shadow:     0 8px 28px rgba(84, 62, 30, 0.10);
  --ml-shadow-sm:  0 2px 8px rgba(84, 62, 30, 0.08);
  --ml-radius:     22px;
  --ml-radius-sm:  14px;

  /* Morpheme trio — the real in-game color coding for prefix/root/suffix. */
  --ml-prefix:      #456840;
  --ml-prefix-soft: #e4eede;
  --ml-root:        #56789f;
  --ml-root-soft:   #e2eaf2;
  --ml-suffix:      #c1912f;
  --ml-suffix-soft: #f4e9cd;
  --ml-terra:       #bf6149;
  --ml-terra-soft:  #f3ddd4;

  --ml-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --ml-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ml-bg);
  color: var(--ml-ink);
  font-family: var(--ml-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, .ml-serif {
  font-family: var(--ml-serif);
  color: var(--ml-ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}

p { max-width: 62ch; }
main p, main li { color: var(--ml-ink-soft); }

a { color: var(--ml-root); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ml-root); outline-offset: 2px; }

.ml-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.ml-section { padding: 64px 0; }
.ml-section-tight { padding: 40px 0; }
.ml-center { text-align: center; }
.ml-center p { margin-left: auto; margin-right: auto; }

/* ---- header ---- */
.ml-header {
  border-bottom: 1px solid var(--ml-line);
  background: var(--ml-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.ml-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ml-logo {
  font-family: var(--ml-serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--ml-ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ml-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ml-nav a:not(.ml-btn) {
  color: var(--ml-ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.ml-nav a:not(.ml-btn):hover { color: var(--ml-ink); }

/* ---- buttons ---- */
.ml-btn {
  display: inline-block;
  font-family: var(--ml-sans);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 24px;
  border: 1px solid transparent;
  cursor: pointer;
}
.ml-btn-primary { background: var(--ml-prefix); color: #fff; }
.ml-btn-primary:hover { background: #3a5836; }
.ml-btn-secondary { background: var(--ml-surface); color: var(--ml-ink); border-color: var(--ml-line); }
.ml-btn-secondary:hover { background: var(--ml-surface-2); }
.ml-btn-small { padding: 8px 16px; font-size: 13px; }

/* ---- hero ---- */
.ml-hero { padding: 72px 0 56px; }
.ml-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .ml-hero-grid { grid-template-columns: 1fr; }
}
.ml-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ml-root);
  margin-bottom: 10px;
}
.ml-hero h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 0 0 18px; }
.ml-hero-sub { font-size: 18px; color: var(--ml-ink-soft); max-width: 46ch; margin: 0 0 28px; }
.ml-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ml-hero-note { font-size: 13px; color: var(--ml-muted); }

/* ---- word-block hero visual: the real in-game morpheme color coding ---- */
.ml-word-demo {
  background: var(--ml-surface);
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius);
  box-shadow: var(--ml-shadow);
  padding: 36px 28px;
}
.ml-word-demo-label { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ml-muted); text-align: center; margin-bottom: 18px; }
.ml-word-blocks {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
  font-family: var(--ml-serif);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 36px);
}
.ml-block { padding: 4px 2px; border-radius: 6px; }
.ml-block-prefix { color: var(--ml-prefix); }
.ml-block-root { color: var(--ml-root); }
.ml-block-suffix { color: var(--ml-suffix); }
.ml-word-legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; font-size: 13px; color: var(--ml-ink-soft); }
.ml-legend-item { display: flex; align-items: center; gap: 6px; }
.ml-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ml-legend-dot.prefix { background: var(--ml-prefix); }
.ml-legend-dot.root { background: var(--ml-root); }
.ml-legend-dot.suffix { background: var(--ml-suffix); }

/* ---- symptom / card grid ---- */
.ml-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 32px; }
.ml-card {
  background: var(--ml-surface);
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius-sm);
  box-shadow: var(--ml-shadow-sm);
  padding: 22px;
}
.ml-card h3 { font-size: 17px; margin: 0 0 8px; }
.ml-card p { font-size: 14px; margin: 0; }
.ml-card-icon { font-size: 22px; margin-bottom: 10px; display: block; }

/* ---- numbered steps ---- */
.ml-steps { counter-reset: ml-step; display: grid; gap: 22px; margin-top: 32px; }
.ml-step { display: flex; gap: 18px; align-items: flex-start; }
.ml-step-num {
  counter-increment: ml-step;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ml-prefix-soft);
  color: var(--ml-prefix);
  font-family: var(--ml-serif);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ml-step-num::before { content: counter(ml-step); }
.ml-step h3 { margin: 0 0 4px; font-size: 16px; }
.ml-step p { margin: 0; font-size: 14px; }

/* ---- band / CTA strip ---- */
.ml-band {
  background: var(--ml-surface-2);
  border-top: 1px solid var(--ml-line);
  border-bottom: 1px solid var(--ml-line);
}
.ml-band h2 { margin: 0 0 12px; }
.ml-band p { margin: 0 auto 26px; }

/* ---- FAQ ---- */
.ml-faq-item { border-bottom: 1px solid var(--ml-line); padding: 18px 0; }
.ml-faq-item summary { cursor: pointer; font-weight: 700; font-size: 16px; color: var(--ml-ink); list-style: none; }
.ml-faq-item summary::-webkit-details-marker { display: none; }
.ml-faq-item summary::after { content: '+'; float: right; color: var(--ml-muted); font-weight: 400; }
.ml-faq-item[open] summary::after { content: '\2212'; }
.ml-faq-item p { margin: 12px 0 0; font-size: 15px; }

/* ---- pricing ---- */
.ml-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
  max-width: 780px;
  margin: 40px auto 0;
  align-items: stretch; /* both cards fill the row's full height, regardless of how much content each has */
}
@media (max-width: 640px) {
  .ml-price-grid { grid-template-columns: 1fr; }
}
.ml-price-card {
  position: relative;
  max-width: 420px;   /* solo usage (e.g. support.html's "Email support" card) stays a real card, not full-width */
  margin: 40px auto 0;
  background: var(--ml-surface);
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius);
  box-shadow: var(--ml-shadow);
  padding: 36px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
/* Inside .ml-price-grid, the grid cell itself already provides the width
   and centering — reset the solo-usage constraints above so the card fills
   its grid cell edge-to-edge instead of being separately narrowed/centered. */
.ml-price-grid .ml-price-card {
  max-width: none;
  margin: 0;
}
/* Push each card's own CTA button to the bottom, so both buttons land on
   the same line even when one card has fewer feature-list items. */
.ml-price-card > a.ml-btn { margin-top: auto; }
.ml-price-card-featured { border-color: var(--ml-prefix); box-shadow: 0 8px 28px rgba(69, 104, 64, 0.16); }
.ml-price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ml-prefix);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 14px;
  border-radius: 999px;
}
.ml-price-amount { font-family: var(--ml-serif); font-size: 44px; font-weight: 700; margin: 6px 0 0; }
.ml-price-period { font-size: 15px; color: var(--ml-ink-soft); }
.ml-price-trial { font-size: 14px; color: var(--ml-prefix); font-weight: 700; margin: 14px 0 22px; }
.ml-price-features { list-style: none; padding: 0; margin: 22px 0; text-align: left; display: grid; gap: 10px; }
.ml-price-features li { display: flex; gap: 10px; font-size: 14px; color: var(--ml-ink-soft); }
.ml-price-features li::before { content: '✓'; color: var(--ml-prefix); font-weight: 700; }

/* ---- legal ---- */
main.ml-legal h2 { font-size: 20px; margin-top: 40px; }
main.ml-legal p, main.ml-legal li { max-width: 72ch; }

/* Auto-numbered legal sections (e.g. Terms of Service) — inserting or
   reordering a section never requires manually renumbering every heading
   after it. Opt-in via .ml-legal-numbered on the wrapping container plus
   .ml-legal-step on each heading that should count; an unnumbered heading
   (e.g. a trailing "Contact") simply omits the step class. */
.ml-legal-numbered { counter-reset: legal-step; }
.ml-legal-numbered .ml-legal-step { counter-increment: legal-step; }
.ml-legal-numbered .ml-legal-step::before { content: counter(legal-step) ". "; }

/* ---- footer ---- */
.ml-footer {
  border-top: 1px solid var(--ml-line);
  padding: 40px 0;
  margin-top: 40px;
}
.ml-footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.ml-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.ml-footer-links a { color: var(--ml-ink-soft); text-decoration: none; font-size: 13px; }
.ml-footer-links a:hover { color: var(--ml-ink); }
.ml-footer-copy { font-size: 13px; color: var(--ml-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
