/* ==========================================================================
   M3 Learning Center — temporary one-page site
   Values here are taken from the design handoff spec; they are final.
   Note: the raw brand pink (#FF4FBC) and cyan (#00C2FC) fail WCAG AA on
   white, so buttons use the darkened variants (#CC1C82 / #0098CE) and the
   bright originals appear only as accents or on the black contact section.
   Do not "restore" the raw palette colours on white backgrounds.
   ========================================================================== */

:root {
  --black: #070707;
  --white: #FFFFFF;

  --purple: #9946FF;
  --purple-tint: #F3ECFF;
  --purple-wash: #FAF7FF;

  --magenta: #CC1C82;
  --magenta-hover: #A81269;
  --pink: #FF4FBC;

  --cyan: #00C2FC;
  --cyan-hover: #39D2FF;
  --blue: #0098CE;

  --error: #C6182B;
  --error-wash: #FDF2F3;

  --text-secondary: #3C3C42;
  --text-tertiary: #4A4A52;
  --text-muted: #6A6A72;
  --text-faint: #8C8C94;

  --on-dark-body: #B9B9C2;
  --on-dark-value: #E8E8EC;
  --on-dark-base: #F2F2F4;

  --border: #E9E9EC;
  --border-input: #D9D9DE;
  --border-strong: #C9C9D0;
  --border-on-dark: #3A3A40;

  --display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;

  --wrap: 1080px;
  --gutter: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); }
a:hover { color: var(--pink); }

:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

img { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Skip link ---------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--purple);
  color: var(--white);
  padding: 12px 18px;
  text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; color: var(--white); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-icon { margin-right: 9px; font-size: 15px; }
.btn-icon-after { margin-left: 9px; font-size: 14px; }

.btn--primary { background: var(--magenta); color: var(--white); }
.btn--primary:hover { background: var(--magenta-hover); color: var(--white); }

.btn--secondary {
  padding: 0 26px;
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--purple);
}
.btn--secondary:hover { border-color: var(--purple); color: var(--purple); }

.btn--call { background: var(--cyan); color: var(--black); }
.btn--call:hover { background: var(--cyan-hover); color: var(--black); }

.btn--outline-cyan {
  padding: 0 26px;
  background: transparent;
  border: 1.5px solid var(--cyan);
  color: var(--on-dark-base);
}
.btn--outline-cyan:hover { border-color: var(--cyan); color: var(--white); }

.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--submit { min-height: 50px; }
.btn--panel { min-height: 48px; padding: 0 26px; font-size: 16px; }

.btn[disabled] { opacity: 0.62; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; }

/* The horizontal lockup — the primary logo, per the brand guidelines. The SVG
   carries its own colour and its wordmark is outlined, so no font is needed and
   nothing here should set a fill. Height is fluid so the lockup and the Request
   info button both fit a 390px viewport; width follows from the aspect ratio. */
.brand-logo {
  height: clamp(28px, 7.5vw, 34px);
  width: auto;
  flex: none;
  display: block;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 64px var(--gutter) 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: var(--black);
  text-wrap: balance;
}

.hero-lead {
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52ch;
  text-wrap: pretty;
}

/* The client photo is landscape; the shipped derivatives are pre-cropped to
   4:5 so the browser downloads only what it displays. Regenerate from
   source/tutoring-original.png if the crop needs moving. */
.hero-media { display: block; min-width: 0; }

.hero-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  display: block;
  background: var(--purple-wash);
}

/* --- Sections ----------------------------------------------------------- */

.section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 64px var(--gutter);
}

.section-title {
  margin: 0 0 34px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(27px, 3.4vw, 36px);
  letter-spacing: -0.028em;
  color: var(--black);
}
.section-title--tight { margin-bottom: 18px; }

/* --- Services ----------------------------------------------------------- */

.services {
  background: var(--purple-wash);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--purple-tint);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 14px;
}

.card-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--purple);
}

.card-body {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

/* --- Why M3 ------------------------------------------------------------- */

.why-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 64px var(--gutter);
}
.why-inner > * { max-width: 70ch; }

.why-lead {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text-secondary);
  max-width: 56ch;
  text-wrap: pretty;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  display: flex;
  gap: 11px;
  align-items: baseline;
  font-size: 16px;
  color: var(--text-secondary);
}

.check-list i {
  color: var(--magenta);
  font-size: 15px;
  flex: none;
  position: relative;
  top: 1px;
}

/* --- Contact ------------------------------------------------------------ */

.contact { background: var(--black); color: var(--on-dark-base); }

.contact-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 72px var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
}

.contact-title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(29px, 3.8vw, 40px);
  letter-spacing: -0.03em;
  color: var(--white);
  text-wrap: balance;
}

.contact-lead {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-dark-body);
  max-width: 44ch;
}

.contact-dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px 24px;
  min-width: 0;
  align-self: center;
}

.contact-dl dt {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.contact-dl dt i { font-size: 12px; }

.contact-dl dd { margin: 0; font-size: 17px; }

.contact-link {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--border-on-dark);
}
.contact-link:hover { color: var(--white); border-bottom-color: var(--cyan); }

/* Keep this: the long address caused horizontal scroll at 390px. */
.contact-dd--email { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }

.contact-dd--plain { line-height: 1.5; color: var(--on-dark-value); }

/* --- Footer ------------------------------------------------------------- */

.site-footer { background: var(--white); }

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px var(--gutter) 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.footer-note { margin: 0; font-size: 15px; color: var(--text-muted); max-width: 48ch; }
.footer-legal { margin: 0; font-size: 14px; color: var(--text-faint); }

/* --- Request form: shell ------------------------------------------------
   Without JS the form is a normal page section, so it still works.
   With JS it is hidden until a trigger promotes it to a modal overlay.
   ------------------------------------------------------------------------ */

.request { padding: 64px var(--gutter); background: var(--white); }

.request-card {
  background: var(--white);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 34px 32px 30px;
  position: relative;
  box-shadow: 0 24px 60px rgba(7, 7, 7, 0.28);
}

.request-close { display: none; }

html.js .request { display: none; }

html.js .request.is-open {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  background: rgba(7, 7, 7, 0.55);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

html.js .request.is-open .request-card { margin: auto; }

html.js .request-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
html.js .request-close:hover { background: var(--on-dark-base); color: var(--black); }

/* --- Request form: fields ----------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 18px; }
.form[hidden] { display: none; }

.form-head { display: block; }

.form-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.028em;
  color: var(--black);
}

.form-sub { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text-tertiary); }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  min-width: 0;
}

.field-label { display: inline-flex; align-items: center; gap: 3px; }

.req-star { font-size: 8px; color: var(--magenta); }

/* 16px minimum prevents iOS zoom-on-focus — keep it. */
.input {
  min-height: 46px;
  padding: 0 13px;
  border: 1.5px solid var(--border-input);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  width: 100%;
}
.input:focus { border-color: var(--purple); outline: none; }
.input:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

.textarea { padding: 12px 13px; resize: vertical; min-height: 0; }

.input.is-invalid { border-color: var(--error); background: var(--error-wash); }

.error-msg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--error);
}
.error-msg[hidden] { display: none; }
.error-msg::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f06a";
  font-size: 12px;
}

/* --- Request form: interest chips --------------------------------------- */

.chips-set { border: none; margin: 0; padding: 0; min-width: 0; }

.chips-set legend {
  padding: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; }

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border-input);
  background: var(--white);
  color: var(--text-secondary);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.chip.is-on,
.chip:has(input:checked) {
  border-color: var(--magenta);
  background: var(--magenta);
  color: var(--white);
}

.chip:has(input:focus-visible) { outline: 3px solid var(--purple); outline-offset: 3px; }

.chips-set .error-msg { margin-top: 10px; }
/* The legend is not a flex row like .field-label, so the gap is set here. */
.chips-set legend .req-star { margin-left: 3px; vertical-align: middle; }

/* --- Request form: submit + states -------------------------------------- */

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 2px;
}

.form-aside { font-size: 13.5px; color: var(--text-muted); font-weight: 400; }

.form-error {
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--error);
  background: var(--error-wash);
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--error);
}
.form-error[hidden] { display: none; }
.form-error a { color: var(--error); }

.panel { padding: 20px 0 8px; }
.panel[hidden] { display: none; }

.panel-body {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.panel .form-title { margin-bottom: 12px; }

/* --- Honeypot: never shown, never announced ----------------------------- */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Server-rendered fallback page (no-JS submits) ---------------------- */

.result-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px var(--gutter);
}
.result-page .form-title { font-size: clamp(27px, 3.4vw, 36px); letter-spacing: -0.028em; }
