/* ================================================================
   JANET PLUS MATHS - styles.css
   Clean, white-dominant, single accent. Not a template.
   Mobile-first. Breakpoints: 640 / 960 / 1200.

   Contents:
     1.  Tokens
     2.  Reset & base
     3.  Typography
     4.  Container & layout helpers
     5.  Buttons
     6.  Skip link
     7.  Header & nav
     8.  Hero (full-width split)
     9.  About
    10.  Subjects
    11.  Local tuition
    12.  Recommendations
    13.  Google Reviews
    14.  Pricing (graph-paper section)
    15.  FAQ
    16.  Contact
    17.  Footer
    18.  Scroll-reveal
    19.  Focus & accessibility
    20.  Reduced-motion override
================================================================ */


/* ----------------------------------------------------------------
   1. Tokens
---------------------------------------------------------------- */
:root {
  /* Palette */
  --white:   #FFFFFF;
  --off:     #F8F8F6;    /* light surface, alternating sections */
  --ink:     #111111;    /* primary text */
  --mid:     #444444;    /* secondary body text */
  --muted:   #888888;    /* captions, eyebrows, secondary */
  --accent:  #1652F0;    /* electric blue - the one colour */
  --light:   #EEF2FF;    /* very pale accent tint, used sparingly */
  --border:  #E5E1DB;

  /* Grid-paper lines used in the pricing section */
  --grid:    rgba(17, 17, 17, 0.028);

  /* Type */
  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max:  1180px;
  --pad:  clamp(1.25rem, 4vw, 4rem);
  --hh:   72px;          /* header height */

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 760px) {
  :root { --hh: 104px; }
}


/* ----------------------------------------------------------------
   2. Reset & base
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hh) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
p { max-width: 60ch; }
.nowrap { white-space: nowrap; }


/* ----------------------------------------------------------------
   3. Typography
---------------------------------------------------------------- */

/* All headings use Instrument Serif - the italic is especially strong */
h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 400;          /* Instrument Serif looks best at regular weight */
}

h1 em, h2 em { font-style: italic; }

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; }

@media (min-width: 760px) {
  h1 { font-size: 4.5rem; }
  h2 { font-size: 2.5rem; }
}

@media (min-width: 1200px) {
  h1 { font-size: 5rem; }
  h2 { font-size: 2.75rem; }
}

/* Eyebrow - small, spaced, muted */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  max-width: none;
}

/* ----------------------------------------------------------------
   4. Container & layout helpers
---------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Section vertical spacing */
section:not(.hero) {
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.section-intro {
  margin-bottom: 3rem;
}

/* Two-button row */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}


/* ----------------------------------------------------------------
   5. Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.9em 1.75em;
  background: var(--accent);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.15s var(--ease);
}

.btn:hover {
  background: #0E3FCC;
  border-color: #0E3FCC;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--off);
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


/* ----------------------------------------------------------------
   6. Skip link
---------------------------------------------------------------- */
.skip {
  position: absolute;
  top: -100%;
  left: var(--pad);
  z-index: 9999;
  background: var(--ink);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4em 1em;
  border-radius: 0 0 3px 3px;
  transition: top 0.1s;
}
.skip:focus { top: 0; }


/* ----------------------------------------------------------------
   7. Header & nav
---------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--hh);
  display: flex;
  align-items: center;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.header.is-scrolled {
  border-color: rgba(17, 17, 17, 0.08);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.045);
}

.header .wrap {
  max-width: none;
  padding-left: clamp(1.25rem, 3.5vw, 3.75rem);
  padding-right: clamp(1.25rem, 3.5vw, 3.75rem);
}

.header-bar {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

/* Wordmark / logo */
.logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink);
  flex-shrink: 0;
  letter-spacing: 0;
  line-height: 1;
}

.header .logo {
  font-size: 1.55rem;
}

/* The "+" - accent colour, italic, slightly elevated */
.logo-plus {
  color: var(--accent);
  font-style: italic;
  font-size: 1.1em;
  position: relative;
  top: -0.07em;
  margin: 0 0.03em;
}

/* Desktop nav links */
.desk-nav {
  display: none;
  align-items: center;
  gap: 2.4rem;
}

@media (min-width: 760px) {
  .desk-nav { display: flex; }
}

.desk-nav a {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  color: #1E2430;
  transition: color 0.18s;
}

.desk-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s var(--ease);
}

.desk-nav a:hover { color: var(--ink); }

.desk-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.desk-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 1px;
}

/* Desktop CTA */
.header-cta { display: none; }

.header-cta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.2em 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  white-space: nowrap;
  transition:
    color 0.18s,
    background-size 0.28s var(--ease);
}

.header-cta:hover span {
  color: var(--accent);
  background-size: 0 1px;
}

@media (min-width: 760px) {
  /* 3-column: logo left | nav centred | CTA right */
  .header-bar {
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
  }

  .header .logo {
    font-size: 2rem;
    justify-self: start;
  }

  .desk-nav { justify-self: center; }

  .header-cta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    justify-self: end;
  }
}

/* Hamburger */
.burger {
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
  flex-shrink: 0;
}

@media (min-width: 760px) { .burger { display: none; } }

.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Mobile nav drawer */
.mob-nav {
  position: absolute;
  top: var(--hh);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem var(--pad) 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.5rem);
  visibility: hidden;
  transition:
    opacity 0.24s var(--ease),
    transform 0.24s var(--ease),
    visibility 0.24s;
}

.mob-nav.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.mob-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--mid);
  transition: color 0.18s;
}

.mob-nav a:hover { color: var(--ink); }

.mob-cta {
  color: var(--ink) !important;
  font-weight: 500 !important;
  margin-top: 0.5rem;
}

.mob-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 1px;
}


/* ----------------------------------------------------------------
   8. Hero - full-width split screen
   Text occupies left column with container-aligned padding.
   Visual occupies right column, edge-to-edge on the right.
---------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: calc(100svh - var(--hh));
  }
}

/* Left panel: copy above, proof points anchored low. */
.hero-content {
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 560px;
  padding: 3.5rem var(--pad) 3rem;
  gap: 3.5rem;
}

@media (min-width: 760px) {
  .hero-content {
    min-height: calc(100svh - var(--hh));
    padding: 4.75rem clamp(3rem, 4.5vw, 4.75rem) 4.5rem;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero .eyebrow {
  color: var(--accent);
  margin-bottom: 1.7rem;
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.02;
  max-width: 12.5ch;
}

@media (min-width: 760px) {
  .hero-content h1 {
    font-size: 4.2rem;
    max-width: 16ch;
  }
}

@media (min-width: 1200px) {
  .hero-content h1 { font-size: 4.85rem; }
}

@media (min-width: 1500px) {
  .hero-content h1 { font-size: 5.4rem; }
}

.hero-rule {
  display: block;
  width: 2.75rem;
  height: 1px;
  background: #CFC8BE;
  margin-top: 2.1rem;
  margin-bottom: 1.65rem;
}

.hero-lede {
  color: #2F343A;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 32rem;
}

@media (min-width: 760px) {
  .hero-lede {
    font-size: 1.08rem;
    max-width: 34rem;
  }
}

.hero-link {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 1.8rem;
  padding-bottom: 0.12rem;
  border-bottom: 1px solid currentColor;
  transition:
    color 0.18s,
    border-color 0.18s;
}

.hero-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
  max-width: 44rem;
  border-top: 1px solid var(--border);
}

.hero-facts div {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.hero-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-facts dd {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.15;
  max-width: none;
}

@media (min-width: 640px) {
  .hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
  }

  .hero-facts div {
    min-height: 4.8rem;
    padding: 0 1.2rem;
    border-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-facts div:first-child { padding-left: 0; }
  .hero-facts div + div { border-left: 1px solid var(--border); }
  .hero-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-facts div:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

@media (min-width: 1500px) {
  .hero-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-facts div {
    padding: 0 1.2rem;
    border-top: 0;
  }

  .hero-facts div:nth-child(3) {
    padding-left: 1.2rem;
    border-left: 1px solid var(--border);
  }
}

/* Right: visual - fills entire right column */
.hero-visual {
  background-color: var(--off);
  overflow: hidden;
  position: relative;
  min-height: 420px;
}

@media (min-width: 760px) {
  .hero-visual { min-height: calc(100svh - var(--hh)); }
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
}

.hero-visual img {
  --photo-scale: 1;
  transform-origin: 48% 52%;
  transition: transform 1.2s var(--ease-soft);
}

.hero-visual:hover img {
  --photo-scale: 1.018;
  transform: scale(var(--photo-scale));
}

.portrait-img {
  display: block;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.9s var(--ease-soft);
}

.about-visual {
  overflow: hidden;
}

.about-visual:hover .portrait-img {
  transform: scale(1.025);
}


/* ----------------------------------------------------------------
   9. About
---------------------------------------------------------------- */
.about { background: var(--off); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 760px) {
  .about-grid {
    grid-template-columns: 280px 1fr;
    gap: 5rem;
  }
}

@media (min-width: 1000px) {
  .about-grid { grid-template-columns: 320px 1fr; }
}

.about-body h2 { margin-bottom: 1.25rem; }
.about-body p  { color: var(--mid); margin-bottom: 1rem; }
.about-body p:last-of-type { margin-bottom: 0; }

/* Credentials - a small definition list */
.creds {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cred {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.cred dt {
  color: var(--muted);
  font-weight: 500;
}

.cred dd { color: var(--mid); }


/* ----------------------------------------------------------------
   10. Subjects
   Three-column grid separated by vertical rules - no cards.
---------------------------------------------------------------- */
.subjects { background: var(--white); }

.subject-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .subject-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.subject {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .subject {
    padding: 2.5rem 2rem 2.5rem 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .subject:last-child { border-right: none; padding-right: 0; }
  .subject:not(:first-child) { padding-left: 2rem; }
}

/* The KS3 / GCSE / A-Level label */
.subject-stage {
  font-family: var(--serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
  max-width: none;
}

.subject-body h2 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.subject-body p {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.6;
}

.subject-note {
  margin-top: 0.75rem;
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  font-style: italic;
}


/* ----------------------------------------------------------------
   11. Local tuition
---------------------------------------------------------------- */
.local {
  background: var(--off);
  border-top: 1px solid var(--border);
}

.local-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.local-body {
  max-width: 42rem;
}

.local-body h2 {
  margin-bottom: 1.25rem;
  max-width: 16ch;
}

.local-body p {
  color: var(--mid);
  margin-bottom: 1rem;
}

.local-body p:last-child {
  margin-bottom: 0;
}

.local-points {
  border-top: 1px solid var(--border);
}

.local-points div {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.local-points dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.local-points dd {
  color: var(--mid);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 26rem;
}

@media (min-width: 760px) {
  .local-wrap {
    grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr);
    gap: 5rem;
  }
}


/* ----------------------------------------------------------------
   12. Recommendations
   Real Facebook excerpts, kept deliberately quiet.
---------------------------------------------------------------- */
.recommendations {
  background: var(--white);
  border-top: 1px solid var(--border);
}

.recommendations-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.recommendations-head {
  max-width: 28rem;
}

.recommendations-head h2 {
  max-width: 12ch;
}

.recommendation-list {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border);
}

.recommendation {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
}

.recommendation p {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.22;
  max-width: 20ch;
}

.recommendation figcaption {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-top: 1rem;
  text-transform: uppercase;
}

@media (min-width: 760px) {
  .recommendations-wrap {
    grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1.8fr);
    align-items: start;
  }

  .recommendation-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
  }

  .recommendation {
    min-height: 16rem;
    padding: 1.5rem 1.5rem 1.4rem;
    border-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .recommendation:first-child { padding-left: 0; }
  .recommendation + .recommendation { border-left: 1px solid var(--border); }
}


/* ----------------------------------------------------------------
   13. Google Reviews widget
---------------------------------------------------------------- */
.google-reviews {
  background: var(--off);
  border-top: 1px solid var(--border);
}

/* Header row */
.gr-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.gr-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  max-width: none;
  margin-bottom: 0.65rem;
  text-transform: none;
}

.gr-brand-logo {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.gr-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.gr-avg {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1;
}

.gr-avg-stars {
  color: #F9AB00;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.gr-count {
  color: var(--muted);
  font-size: 0.8rem;
}

.gr-write-btn {
  display: inline-flex;
  align-items: center;
  height: 2.4rem;
  padding: 0 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.18s, background 0.18s;
}

.gr-write-btn:hover {
  border-color: var(--ink);
  background: var(--white);
}

/* Carousel */
.gr-carousel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gr-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s, opacity 0.18s;
}

.gr-arrow:hover:not(:disabled) { border-color: var(--ink); }
.gr-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.gr-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.gr-arrow svg {
  width: 0.9rem;
  height: 0.9rem;
}

.gr-track-wrap {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.gr-track {
  display: flex;
  gap: 1.25rem;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Cards */
.gr-card {
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.gr-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.gr-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.gr-reviewer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.gr-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gr-when {
  font-size: 0.72rem;
  color: var(--muted);
}

.gr-g {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.gr-stars {
  color: #F9AB00;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  line-height: 1;
}

.gr-text {
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.58;
  max-width: none;
}

/* Dots */
.gr-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.gr-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.gr-dot.active {
  background: var(--ink);
  transform: scale(1.3);
}

.gr-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* ----------------------------------------------------------------
   14. Pricing
   Graph-paper texture - the site's one maths motif.
   Big confident number. Short statement.
---------------------------------------------------------------- */
.pricing {
  background-color: var(--off);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}

.pricing-body { max-width: 640px; }

.price-heading {
  margin-bottom: 0.75rem;
}

.price-display {
  display: flex;
  align-items: baseline;
  gap: 0.15em;
  margin: 0.5rem 0 1.25rem;
  line-height: 1;
}

.price-symbol {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--muted);
  position: relative;
  top: -0.15em;
}

.price-num {
  font-family: var(--serif);
  font-size: clamp(5rem, 14vw, 10rem);
  font-style: italic;
  color: var(--ink);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.price-unit {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.25em;
}

.price-statement {
  font-size: 1rem;
  color: var(--mid);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

/* Footnote */
.price-small {
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  max-width: 52ch;
}


/* ----------------------------------------------------------------
   14. FAQ
   Clean details/summary. Underline on summary, no border-radius.
---------------------------------------------------------------- */
.faq { background: var(--off); }

.faq-wrap { max-width: 740px; }

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

.faq-item { border-bottom: 1px solid var(--border); }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  transition: color 0.18s;
  -webkit-user-select: none;
  user-select: none;
}

.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ''; }

/* + / - indicator - italic Instrument Serif for the personality */
.faq-q::after {
  content: '+';
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  width: 1.2em;
  text-align: right;
  transition: color 0.18s;
}

.faq-item[open] > .faq-q { color: var(--accent); }
.faq-item[open] > .faq-q::after { content: '-'; }

.faq-q:hover { color: var(--accent); }

.faq-q:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.faq-a {
  padding-bottom: 1.25rem;
}

.faq-a p {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.7;
}


/* ----------------------------------------------------------------
   15. Contact
   Details and map.
---------------------------------------------------------------- */
.contact {
  background: var(--white);
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: stretch;
}

.contact-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.contact-body h2 { margin-bottom: -0.5rem; }

.contact-sub {
  font-size: 0.9375rem;
  color: var(--mid);
}

.contact-details {
  width: 100%;
  max-width: 30rem;
  border-top: 1px solid var(--border);
  font-style: normal;
}

.contact-details > * {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-name {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.15;
}

.contact-name span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.contact-details a {
  color: var(--mid);
  font-size: 0.95rem;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.18);
  text-underline-offset: 3px;
  transition: color 0.18s, text-decoration-color 0.18s;
}

.contact-details a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.contact-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.contact-map {
  min-height: 22rem;
  background-color: var(--off);
  border: 1px solid var(--border);
  overflow: hidden;
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}

@media (min-width: 860px) {
  .contact-layout {
    grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
    gap: 5rem;
  }

  .contact-map { min-height: 30rem; }
}


/* ----------------------------------------------------------------
   16. Footer
---------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  padding: 1.75rem 0;
  font-size: 0.8rem;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  justify-content: space-between;
}

.footer .logo {
  color: rgba(255,255,255,0.9);
}

.footer .logo-plus {
  color: var(--accent);
}

.footer-tag { flex: 1; min-width: 160px; }

.footer-copy { text-align: right; flex-shrink: 0; }


/* ----------------------------------------------------------------
   17. Scroll-reveal
   Minimal: 10px Y + opacity. Fire once.
---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity   0.6s var(--ease),
    transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-rise {
  from {
    opacity: 0.18;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes line-draw {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes photo-settle {
  from {
    opacity: 0.7;
    transform: scale(1.025) translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: scale(var(--photo-scale)) translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero-content h1,
  .hero-lede,
  .hero-link,
  .hero-facts div {
    opacity: 0;
    animation: hero-rise 0.58s var(--ease-soft) forwards;
  }

  .hero .eyebrow { animation-delay: 0.02s; }
  .hero-content h1 { animation-delay: 0.08s; }
  .hero-lede { animation-delay: 0.18s; }
  .hero-link { animation-delay: 0.24s; }
  .hero-facts div:nth-child(1) { animation-delay: 0.32s; }
  .hero-facts div:nth-child(2) { animation-delay: 0.36s; }
  .hero-facts div:nth-child(3) { animation-delay: 0.4s; }
  .hero-facts div:nth-child(4) { animation-delay: 0.44s; }

  .hero-rule {
    opacity: 0;
    transform-origin: left center;
    animation: line-draw 0.55s var(--ease-soft) 0.14s forwards;
  }

  .hero-visual img {
    opacity: 0;
    animation: photo-settle 0.82s var(--ease-soft) forwards;
  }

  .subject-list.visible .subject,
  .recommendation-list.visible .recommendation,
  .faq-list.visible .faq-item {
    opacity: 0;
    animation: fade-rise 0.72s var(--ease-soft) forwards;
  }

  .subject-list.visible .subject:nth-child(2),
  .recommendation-list.visible .recommendation:nth-child(2),
  .faq-list.visible .faq-item:nth-child(2) {
    animation-delay: 0.08s;
  }

  .subject-list.visible .subject:nth-child(3),
  .recommendation-list.visible .recommendation:nth-child(3),
  .faq-list.visible .faq-item:nth-child(3) {
    animation-delay: 0.16s;
  }

  .faq-list.visible .faq-item:nth-child(4) { animation-delay: 0.24s; }
  .faq-list.visible .faq-item:nth-child(5) { animation-delay: 0.32s; }
  .faq-list.visible .faq-item:nth-child(6) { animation-delay: 0.4s; }
  .faq-list.visible .faq-item:nth-child(7) { animation-delay: 0.48s; }
  .faq-list.visible .faq-item:nth-child(8) { animation-delay: 0.56s; }

  .contact-layout.visible .contact-body,
  .contact-layout.visible .contact-map {
    opacity: 0;
    animation: fade-rise 0.8s var(--ease-soft) forwards;
  }

  .contact-layout.visible .contact-map {
    animation-delay: 0.12s;
  }
}

/* ----------------------------------------------------------------
   18. Focus & accessibility
---------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Contrast:
   --ink   on --white:  21:1  ✓
   --mid   on --white:   8.6:1 ✓
   --muted on --white:   3.9:1 (used only for non-critical labels)
   --accent on --white:  4.8:1 ✓
   --white  on --accent: 4.8:1 ✓
*/


/* ----------------------------------------------------------------
   19. Reduced-motion override
---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
