/* ============================================================
   Miller Academic Coaching — styles.css
   Design tokens + mobile-first styles. No build step.
   Palette rule: amber (#F0B429) is NEVER text on light
   backgrounds (fails contrast) — decorative fills only, or
   text on navy (#102A43, 7.4:1).
   ============================================================ */

:root {
  --navy-950: #102A43;
  --navy-800: #243B53;
  --navy-700: #334E68;
  --slate-600: #486581;
  --slate-500: #627D98;
  --slate-400: #829AB1;
  --slate-300: #BCCCDC;
  --slate-200: #D9E2EC;
  --slate-50:  #F0F4F8;
  --amber-400: #F0B429;
  --amber-500: #DE911D;
  --white: #FFFFFF;

  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 42, 67, .06);
  --shadow-md: 0 4px 16px rgba(16, 42, 67, .08);
  --shadow-lg: 0 12px 32px rgba(16, 42, 67, .12);

  --section-pad: clamp(4rem, 9vw, 6.5rem);
}

/* ---------- Base ---------- */

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

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--navy-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy-800);
  line-height: 1.2;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.25rem, 4.5vw + 1rem, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--navy-950);
}

h2 {
  font-size: clamp(1.6rem, 2.5vw + 0.75rem, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0; padding: 0; }

::selection { background: var(--amber-400); color: var(--navy-950); }

[id] { scroll-margin-top: 5rem; }

/* ---------- Utilities ---------- */

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.container-narrow { max-width: 720px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  background: var(--navy-950);
  color: var(--white);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--amber-400);
  outline-offset: 2px;
  border-radius: 4px;
}
.section-dark :focus-visible,
.site-footer :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--white);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-600);
  margin-bottom: 0.85rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--amber-400);
  margin-right: 0.6rem;
  vertical-align: 0.2em;
}
.eyebrow-on-dark { color: var(--amber-400); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.85rem; }

.btn-primary { background: var(--navy-800); color: var(--white); }
.btn-primary:hover { background: var(--navy-950); box-shadow: var(--shadow-md); }

.btn-secondary { border-color: var(--navy-800); color: var(--navy-800); background: transparent; }
.btn-secondary:hover { background: rgba(36, 59, 83, 0.07); }

.btn-accent { background: var(--amber-400); color: var(--navy-950); }
.btn-accent:hover { background: var(--amber-500); box-shadow: var(--shadow-md); }

.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .18s ease, box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
  .btn-primary:hover, .btn-accent:hover { transform: translateY(-1px); }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 14px rgba(16, 42, 67, 0.08);
  border-bottom-color: var(--slate-200);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.85rem;
}
@media (prefers-reduced-motion: no-preference) {
  .header-inner { transition: padding .2s ease; }
}
.is-scrolled .header-inner { padding-block: 0.6rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark { flex-shrink: 0; }
.brand-logo {
  height: 46px;
  width: auto;
}
@media (prefers-reduced-motion: no-preference) {
  .brand-logo { transition: height .2s ease; }
}
.is-scrolled .brand-logo { height: 40px; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--navy-950);
  line-height: 1.15;
}

.header-cta { order: 2; margin-left: auto; padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.site-nav { order: 3; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0.55rem;
  margin: 0;
  cursor: pointer;
  border-radius: 8px;
}
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}
.nav-toggle-bars span {
  height: 2px;
  border-radius: 1px;
  background: var(--navy-950);
}

.nav-menu {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 1.5rem 1rem;
}
.nav-menu.is-open { display: flex; }
.nav-menu a {
  display: block;
  padding: 0.8rem 0;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--navy-700);
  text-decoration: none;
  border-bottom: 1px solid var(--slate-50);
}
.nav-menu li:last-child a { border-bottom: 0; }
.nav-menu a:hover { color: var(--navy-950); }

@media (max-width: 419px) {
  .brand-logo { height: 38px; }
  .is-scrolled .brand-logo { height: 34px; }
  .header-cta-number { display: none; }
}

@media (min-width: 940px) {
  .site-nav { order: 2; margin-left: auto; }
  .header-cta { order: 3; margin-left: 0; }
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 1.75rem;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin-right: 1.25rem;
  }
  .nav-menu a {
    padding: 0.25rem 0;
    font-size: 0.95rem;
    border: 0;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
  }
  .nav-menu a:hover { text-decoration: underline; text-decoration-color: var(--amber-400); }
  .nav-menu-cta { display: none; }
}

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

main section { padding-block: var(--section-pad); }

.section-alt { background: var(--slate-50); }

.section-dark { background: var(--navy-950); color: var(--slate-300); }
.section-dark h2 { color: var(--white); }

.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.section-heading h2 { margin-bottom: 0; }

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

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(4.5rem, 10vw, 7.5rem) clamp(4rem, 9vw, 6rem);
}

.hero-decor { position: absolute; inset: 0; pointer-events: none; }
.hero-ring { position: absolute; top: -140px; right: -140px; opacity: 0.09; }
.hero-dots { position: absolute; bottom: 30px; left: -70px; opacity: 0.10; }

.hero-inner { position: relative; }

.hero h1 {
  max-width: 21ch;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(to top, rgba(240, 180, 41, 0.38) 32%, transparent 32%);
  border-radius: 2px;
  padding-inline: 0.05em;
}

.hero-subhead {
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  color: var(--navy-700);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.hero-microcopy {
  font-size: 0.9rem;
  color: var(--slate-600);
  margin-bottom: 0;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1rem;
  margin: 3rem 0 0;
}
.trust-item { text-align: center; }

@media (min-width: 720px) {
  .trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 1.25rem;
  }
  .trust-item {
    padding-inline: clamp(1rem, 3vw, 1.75rem);
    border-left: 1px solid var(--slate-200);
  }
  .trust-item:first-child { border-left: 0; }
}
.trust-item dt {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-800);
}
.trust-item dd {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--slate-600);
}

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

.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: box-shadow .2s ease, transform .2s ease; }
  .card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(240, 180, 41, 0.16);
  color: var(--navy-800);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
}

.card p { font-size: 0.975rem; }

@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }

/* ---------- Subjects ---------- */

.subjects-grid {
  display: grid;
  gap: 2.25rem;
}

.subject-group h3 {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 0.9rem;
}
.subject-group h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--amber-400);
}
.subject-group ul { list-style: none; }
.subject-group li {
  padding: 0.32rem 0;
  font-size: 0.975rem;
}

.subjects-note {
  text-align: center;
  color: var(--slate-600);
  font-size: 0.975rem;
  max-width: 560px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
}

@media (min-width: 640px) { .subjects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .subjects-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- How it works ---------- */

.steps {
  list-style: none;
  display: grid;
  gap: 2.5rem;
  position: relative;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.step { text-align: center; }
.step p {
  font-size: 0.975rem;
  max-width: 320px;
  margin-inline: auto;
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--amber-400);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 0 0 8px var(--white);
}

@media (min-width: 880px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 17%;
    right: 17%;
    border-top: 2px dashed var(--slate-200);
  }
}

.cta-band {
  background: var(--navy-950);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}
.cta-band p {
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
}
.cta-band-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .cta-band { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- About ---------- */

.about-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.about-photo { max-width: 360px; margin-inline: auto; width: 100%; }

.photo-frame { position: relative; }
.photo-frame::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  right: -14px;
  bottom: -14px;
  border: 3px solid var(--amber-400);
  border-radius: var(--radius-lg);
}
.photo-frame img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-text .eyebrow { margin-bottom: 0.6rem; }
.about-text h2 { margin-bottom: 1.25rem; }

.education-row {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.75rem;
}
.education-badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.education-badge img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}
.education-badge-text { display: grid; gap: 0.1rem; }
.education-badge-text strong {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-800);
}
.education-badge-text span {
  font-size: 0.875rem;
  color: var(--slate-600);
}

@media (min-width: 1100px) {
  .education-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 880px) {
  .about-inner { grid-template-columns: 2fr 3fr; gap: 4.5rem; }
  .about-photo { margin-inline: 0; }
}

/* ---------- Testimonials (used once uncommented) ---------- */

.testimonial-grid { display: grid; gap: 1.5rem; }
.testimonial {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.testimonial blockquote { margin: 0 0 1rem; font-size: 0.99rem; }
.testimonial figcaption { color: var(--slate-600); font-size: 0.875rem; font-weight: 500; }
@media (min-width: 880px) { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- FAQ ---------- */

.faq-list { border-top: 1px solid var(--slate-200); }

.faq-list details { border-bottom: 1px solid var(--slate-200); }

.faq-list summary {
  position: relative;
  padding: 1.15rem 2.75rem 1.15rem 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy-800);
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--navy-800);
  transform: translateY(-50%);
}
.faq-list summary::after { transform: translateY(-50%) rotate(90deg); }
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(0deg); }
@media (prefers-reduced-motion: no-preference) {
  .faq-list summary::after { transition: transform .2s ease; }
}

.faq-list details p { padding: 0 0 1.35rem; font-size: 0.99rem; }

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

.contact-lead {
  color: var(--slate-300);
  max-width: 560px;
  margin: 1rem auto 0;
}

.contact-cards {
  display: grid;
  gap: 1.25rem;
  max-width: 780px;
  margin-inline: auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
}

.contact-card-icon { color: var(--amber-400); margin-bottom: 0.5rem; }

.contact-card-label {
  color: var(--slate-300);
  font-size: 0.9rem;
  margin: 0;
}

.contact-card-value {
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-card-value:hover {
  text-decoration: underline;
  text-decoration-color: var(--amber-400);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}
.contact-card-value-email {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  overflow-wrap: normal; /* only break at the <wbr> after the @ */
}

.copy-email { margin-top: 0.9rem; }

.contact-footnote {
  text-align: center;
  color: var(--slate-400);
  font-size: 0.9rem;
  margin: 2.5rem 0 0;
}

@media (min-width: 640px) { .contact-cards { grid-template-columns: 1fr 1fr; } }

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

.site-footer {
  background: var(--navy-950);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}

.footer-brand .brand-name { color: var(--white); }
.footer-brand p {
  color: var(--slate-400);
  font-size: 0.95rem;
  margin: 1rem 0 0;
  max-width: 320px;
}

.footer-nav ul {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.footer-nav a,
.footer-contact a {
  color: var(--slate-300);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  overflow-wrap: anywhere;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.4rem;
}
.footer-bottom p {
  margin: 0;
  text-align: center;
  color: var(--slate-400);
  font-size: 0.875rem;
}

@media (min-width: 880px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
}

/* ---------- Reveal animations ----------
   Hidden state only applies when JS is running (.js is added to
   <html> by main.js itself, so a failed script load can never hide
   content), only on screens (not print), and only when the user
   hasn't asked for reduced motion. */

@media screen and (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease-out, transform .5s ease-out;
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .js [data-reveal-delay="1"] { transition-delay: .075s; }
  .js [data-reveal-delay="2"] { transition-delay: .15s; }
  .js [data-reveal-delay="3"] { transition-delay: .225s; }
  .js [data-reveal-delay="4"] { transition-delay: .3s; }
  .js [data-reveal-delay="5"] { transition-delay: .375s; }
}
