/* ==========================================================================
   Annabel and Amy's Maths Tutoring
   Palette taken from the Facebook branding: exercise-book blue, atom amber,
   slate logo card, warm paper ground.
   ========================================================================== */

:root {
  --paper:      #fcfbf8;
  --surface:    #ffffff;
  --surface-2:  #f4f2ec;
  --ink:        #1e2a33;
  --muted:      #5d6b78;
  --rule:       #dbe6f0;
  --slate:      #39434d;
  --blue:       #2b7fd4;
  --blue-deep:  #17578f;
  --blue-wash:  #eaf2fb;
  --red:        #ff5e5e;
  --amber-wash: #fde0dc;
  --good:       #2f8f5b;

  --shadow-sm: 0 1px 2px rgba(30, 42, 51, .06), 0 2px 8px rgba(30, 42, 51, .05);
  --shadow-md: 0 2px 4px rgba(30, 42, 51, .06), 0 12px 32px rgba(30, 42, 51, .09);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --measure: 62ch;
  --gutter: clamp(16px, 5vw, 48px);
  --maxw: 1140px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hand: "Caveat", "Bradley Hand", cursive;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #161c22;
    --surface:    #1d252c;
    --surface-2:  #232d36;
    --ink:        #e8eef3;
    --muted:      #a3b1bd;
    --rule:       #2e3a46;
    --slate:      #c3cdd6;
    --blue:       #6cb0f0;
    --blue-deep:  #a9d1f7;
    --blue-wash:  #1c2b3a;
    --red:        #ff5e5e;
    --amber-wash: #33291440;
    --good:       #5fbc87;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  --paper:      #161c22;
  --surface:    #1d252c;
  --surface-2:  #232d36;
  --ink:        #e8eef3;
  --muted:      #a3b1bd;
  --rule:       #2e3a46;
  --slate:      #c3cdd6;
  --blue:       #6cb0f0;
  --blue-deep:  #a9d1f7;
  --blue-wash:  #1c2b3a;
  --red:        #ff5e5e;
  --amber-wash: #33291440;
  --good:       #5fbc87;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .45);
}

/* --- base ---------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}

h1 { font-size: clamp(2.1rem, 5.6vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); letter-spacing: -.015em; }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }

p { margin: 0; max-width: var(--measure); }

a { color: var(--blue-deep); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue-deep); color: #fff; padding: 12px 18px; z-index: 200;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

section { padding-block: clamp(52px, 8vw, 92px); }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 0 0 14px;
}

.lede { font-size: 1.08rem; color: var(--muted); }

.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 38px; }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--blue-deep); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #10456f; }
:root[data-theme="dark"] .btn--primary,
:root:not([data-theme="light"]) .btn--primary { color: #0f1a24; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--blue); background: var(--blue-wash); }

.btn--amber { background: var(--amber); color: #2b1d02; }
.btn--amber:hover { background: #dd9411; }

.btn--sm { font-size: .92rem; padding: 9px 18px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* --- header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding-block: 10px;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__mark { flex: none; width: 36px; height: 36px; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.15; letter-spacing: -.01em; }
.brand__sub { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--blue-deep); }
.nav .btn { color: #fff; }
:root[data-theme="dark"] .nav .btn,
:root:not([data-theme="light"]) .nav .btn { color: #0f1a24; }

@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(44px, 7vw, 78px) clamp(40px, 6vw, 70px);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 33px,
      var(--rule) 33px,
      var(--rule) 34px
    ),
    var(--surface);
  border-bottom: 1px solid var(--rule);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--blue-deep); }

.hero__lede { font-size: 1.12rem; color: var(--muted); margin-bottom: 26px; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.hero__note { font-size: .92rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }

.hand {
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.25;
  color: var(--blue);
  transform: rotate(-1.4deg);
  margin-bottom: 10px;
  max-width: 22ch;
}

.card-mark {
  background: var(--slate);
  border-radius: var(--r-lg);
  padding: 34px 28px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-md);
}
:root[data-theme="dark"] .card-mark,
:root:not([data-theme="light"]) .card-mark { background: #10161c; border: 1px solid var(--rule); }

.card-mark__atom { width: 96px; margin: 0 auto 14px; }
.card-mark h2 { color: #fff; font-size: 1.5rem; margin-bottom: 4px; }
.card-mark p { color: #c8d3dd; font-size: .95rem; margin-inline: auto; }
.card-mark__ops { display: flex; justify-content: center; gap: 14px; margin-top: 18px; font-size: 1.5rem; color: var(--blue); font-family: var(--font-body); font-weight: 700; }
.card-mark__ops span:nth-child(even) { color: var(--amber); }

/* --- trust strip --------------------------------------------------------- */

.trust {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding-block: 0;
}
.trust__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding-block: 26px;
}
@media (max-width: 720px) {
  .trust__row { grid-template-columns: 1fr; gap: 20px; }
}
.trust__item { padding-inline: clamp(0px, 2vw, 22px); }
.trust__item + .trust__item { border-left: 1px solid var(--rule); }
@media (max-width: 720px) {
  .trust__item + .trust__item { border-left: 0; border-top: 1px solid var(--rule); padding-top: 20px; }
}
.trust__num { font-family: var(--font-display); font-size: 1.85rem; font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.trust__label { font-size: .93rem; color: var(--muted); margin-top: 6px; }

/* --- tutors -------------------------------------------------------------- */

.tutors__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.tutor {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tutor__top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tutor__name { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; }
.tutor__role { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
:root:not([data-theme="light"]) .tutor__role { color: var(--amber); }

.tutor__quals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tutor__quals li { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; color: var(--muted); }
.tutor__quals li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.tutor__hours {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: .92rem;
  font-weight: 700;
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}

/* --- levels -------------------------------------------------------------- */

.levels { background: var(--surface-2); }
.levels__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }

.level {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 24px;
  border-top: 4px solid var(--blue);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.level:nth-child(2) { border-top-color: #4a97dd; }
.level:nth-child(3) { border-top-color: var(--amber); }
.level:nth-child(4) { border-top-color: #e08608; }

.level__tag { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.level h3 { font-size: 1.3rem; }
.level p { font-size: .95rem; color: var(--muted); }

/* --- steps --------------------------------------------------------------- */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--blue);
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: .96rem; color: var(--muted); }

/* --- booking ------------------------------------------------------------- */

.booking { background: var(--surface-2); }

.booking__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.filter { display: flex; gap: 6px; background: var(--surface); padding: 5px; border-radius: 999px; border: 1px solid var(--rule); }
.filter button {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.filter button[aria-pressed="true"] { background: var(--blue-deep); color: #fff; }
:root:not([data-theme="light"]) .filter button[aria-pressed="true"] { color: #0f1a24; }

.status {
  font-size: .88rem;
  color: var(--muted);
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }
.status--live .status__dot { background: var(--good); }

.days { display: flex; flex-direction: column; gap: 14px; }

.day {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 640px) {
  .day { grid-template-columns: 1fr; gap: 12px; }
}

.day__label { font-weight: 700; font-size: .98rem; }
.day__label span { display: block; font-weight: 400; font-size: .87rem; color: var(--muted); }

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

.slot {
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--blue-wash);
  color: var(--blue-deep);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transition: background-color .15s ease, border-color .15s ease;
}
.slot:hover { background: var(--blue); color: #fff; }
.slot:hover .slot__who { color: rgba(255,255,255,.85); }
.slot__who { font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.more-dates { align-self: center; margin-top: 6px; background: var(--surface); }

.empty {
  background: var(--surface);
  border: 1px dashed var(--rule);
  border-radius: var(--r-md);
  padding: 34px 24px;
  text-align: center;
  color: var(--muted);
}
.empty p { margin-inline: auto; }

/* --- reviews ------------------------------------------------------------- */

.reviews__grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
@media (max-width: 820px) { .reviews__grid { grid-template-columns: 1fr; } }

.score {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.score__big { font-family: var(--font-display); font-size: 3.6rem; font-weight: 600; line-height: 1; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.score__label { font-weight: 700; margin-top: 6px; }
.score__sub { font-size: .92rem; color: var(--muted); margin-top: 4px; }
.score__stars { color: var(--amber); font-size: 1.15rem; letter-spacing: .18em; margin-top: 14px; }

/* --- contact ------------------------------------------------------------- */

.contact { background: var(--surface-2); }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: start;
}
@media (max-width: 820px) { .contact__grid { grid-template-columns: 1fr; } }

.channels { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 15px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.channel:hover { border-color: var(--blue); transform: translateX(2px); }
.channel__icon { flex: none; width: 22px; height: 22px; color: var(--blue-deep); }
.channel__label { font-weight: 700; font-size: .97rem; }
.channel__value { font-size: .88rem; color: var(--muted); }

/* --- forms --------------------------------------------------------------- */

.form {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .88rem; font-weight: 700; }
.field .hint { font-size: .82rem; color: var(--muted); font-weight: 400; }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.form__msg { font-size: .93rem; border-radius: var(--r-sm); padding: 12px 14px; }
.form__msg[data-kind="ok"] { background: #e6f4ec; color: #1d6b43; }
.form__msg[data-kind="err"] { background: #fdeceb; color: #a8342b; }
:root:not([data-theme="light"]) .form__msg[data-kind="ok"] { background: #16301f; color: #7fd3a4; }
:root:not([data-theme="light"]) .form__msg[data-kind="err"] { background: #3a1d1a; color: #f0a49c; }
:root[data-theme="dark"] .form__msg[data-kind="ok"] { background: #16301f; color: #7fd3a4; }
:root[data-theme="dark"] .form__msg[data-kind="err"] { background: #3a1d1a; color: #f0a49c; }

/* --- dialog -------------------------------------------------------------- */

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
}
dialog::backdrop { background: rgba(20, 28, 35, .55); backdrop-filter: blur(3px); }

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 30px);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 88vh;
  overflow-y: auto;
}
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal__close {
  flex: none;
  background: transparent; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--muted); padding: 4px 8px;
}
.modal__when {
  background: var(--blue-wash);
  color: var(--blue-deep);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-weight: 700;
  font-size: .97rem;
}

/* --- footer -------------------------------------------------------------- */

.site-footer {
  background: var(--slate);
  color: #c8d3dd;
  padding-block: 40px 32px;
  font-size: .92rem;
}
:root:not([data-theme="light"]) .site-footer { background: #10161c; border-top: 1px solid var(--rule); }
:root[data-theme="dark"] .site-footer { background: #10161c; border-top: 1px solid var(--rule); }

.site-footer a { color: #fff; }
:root:not([data-theme="light"]) .site-footer a { color: var(--blue-deep); }
.site-footer__grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.site-footer strong { color: #fff; font-family: var(--font-display); font-size: 1.05rem; }
:root:not([data-theme="light"]) .site-footer strong { color: var(--ink); }
.site-footer__legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: .84rem; opacity: .8; }

.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;
}
