/* Coach Mahjy public site. Plain CSS, no build step.
   Colours come from apps/mobile/src/theme/tokens.ts (light) and supabase/templates/code.html (dark).
   Every text pair is at least 4.5:1 (WCAG AA); the check is listed in the pull request. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/montserrat-400.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/montserrat-600.woff2") format("woff2");
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cinzel-600.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  /* Light: the app's ivory, wine and ink. */
  --ground: #F7EFE3;      /* ivory */
  --card: #FBF6EC;        /* tileFace */
  --border: #E4D8C6;      /* border */
  --ink: #3A2E28;         /* learnInk, 11.5:1 on ivory */
  --heading: #5B0F2C;     /* wine, 11.9:1 */
  --muted: #6E6158;       /* taupeText, 5.2:1 */
  --label: #7A5E1C;       /* learnLabel, 5.3:1 */
  --link: #5B0F2C;        /* wine */
  --focus: #5B0F2C;
  --band-top: #6B1435;    /* ctaTop */
  --band: #5B0F2C;        /* wine */
  --band-bottom: #4A0C23; /* ctaBottom */
  --on-band: #F7EFE3;     /* onWine, 9.9:1 or more across the band */
  --on-band-gold: #D4AF37;/* onWineGold, 5.5:1 or more across the band */
  --step-fill: #F3E9D9;   /* badgeFill */
  --button-top: #6B1435;  /* the app's primary pill: ctaTop to ctaBottom */
  --button-bottom: #4A0C23;
  --button-ink: #F7EFE3;  /* 10.4:1 or more */

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --caps: "Cinzel", "Cormorant Garamond", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark: the sign-in email's dark palette. */
    --ground: #221B1D;
    --card: #2E2427;
    --border: #59454C;
    --ink: #F7EFE3;       /* 14.8:1 */
    --heading: #F2D98B;   /* onWinePale, 12.1:1 */
    --muted: #D8C8BA;     /* 10.4:1 */
    --label: #E3CE8E;     /* goldSoft, 10.9:1 */
    --link: #E3CE8E;
    --focus: #E3CE8E;
    --band-top: #4A0C23;
    --band: #420A20;      /* wineDeep */
    --band-bottom: #3A0A1C;
    --step-fill: #3A2D31;
    --button-top: #E8C86A;  /* the app's gold pill: practiceCtaTop to practiceCtaBottom */
    --button-bottom: #D4AF37;
    --button-ink: #3A0A1C;  /* onGoldInk, 8:1 or more */
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem; /* 18px */
  line-height: 1.65;
  overflow-wrap: break-word;
}

/* Skip link */
.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--card);
  color: var(--link);
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header band */
.site-header {
  background: linear-gradient(180deg, var(--band-top) 0%, var(--band) 60%, var(--band-bottom) 100%);
  color: var(--on-band);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-band);
  font-family: var(--caps);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li + li {
  margin-top: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-band);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  border-bottom-color: var(--on-band);
}
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--on-band-gold);
}
.site-header :focus-visible {
  outline-color: var(--on-band-gold);
}

/* Main column */
main {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

h1,
h2,
h3 {
  color: var(--heading);
  text-wrap: balance;
}
h1 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.375rem, 1.8rem + 2.6vw, 3.25rem);
  line-height: 1.08;
}
h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.2;
  scroll-margin-top: 1rem;
}
h3 {
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.4;
  scroll-margin-top: 1rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}
ul,
ol {
  padding-left: 1.5rem;
}
li + li {
  margin-top: 0.5rem;
}
strong {
  font-weight: 600;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--label);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.meta {
  color: var(--muted);
  font-size: 1.0625rem;
}
.lead {
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Cards */
.card {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}
.card > :last-child {
  margin-bottom: 0;
}
.card h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 1.625rem;
}
.card h3:first-child {
  margin-top: 0;
}

/* "On this page" */
.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}
.toc li + li {
  margin-top: 0.25rem;
}

/* Numbered steps */
ol.steps {
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}
ol.steps > li {
  position: relative;
  min-height: 2.25rem;
  padding-left: 3rem;
  counter-increment: step;
}
ol.steps > li + li {
  margin-top: 0.75rem;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: var(--step-fill);
  color: var(--heading);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 2.125rem;
  text-align: center;
}

/* Company and retention lists */
dl.facts {
  margin: 1rem 0 1.5rem;
}
dl.facts > div {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}
dl.facts > div + div {
  margin-top: 0.75rem;
}
dl.facts dt {
  font-weight: 600;
}
dl.facts dd {
  margin: 0.25rem 0 0;
}

/* Landing page */
.hero {
  padding-bottom: 0.5rem;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0;
  list-style: none;
}
.features > li {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}
.features h3 {
  margin: 0 0 0.375rem;
  color: var(--heading);
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.2;
}
.features p {
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--button-top) 0%, var(--button-bottom) 100%);
  color: var(--button-ink);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.0625rem;
}
.site-footer .wrap {
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}
.site-footer a {
  color: var(--link);
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.site-footer li + li {
  margin-top: 0;
}
.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer p {
  margin: 0 0 0.5rem;
}

@media print {
  .skip,
  .site-nav,
  .toc {
    display: none;
  }
  body,
  .site-header {
    background: #fff;
    color: #000;
  }
  .brand,
  h1,
  h2,
  h3,
  a {
    color: #000;
  }
  .card,
  dl.facts > div {
    border-color: #999;
    background: #fff;
  }
}
