/*
  Brilliant Minds Tuition: one-page site, matching the look of the
  previous WordPress site (white header, light-blue desk-photo hero,
  centred "TUITION" block between navy rules, purple subheadings).
  Single light theme, as before.
*/

/* ---------- Font (self-hosted Mulish, SIL Open Font License) ---------- */

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/mulish-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/mulish-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/mulish-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/mulish-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens (colours taken from the current site) ---------- */

:root {
  color-scheme: light;

  --navy: #1B2A5E;        /* nav, "TUITION", rules: 13.6:1 on white */
  --purple: #6E4F9E;      /* subheadings: 6.4:1 on white */
  --text: #2A2C44;        /* body text: 13.6:1 on white */
  --text-strong: #1E1E1E; /* hero text: 12.8:1 on the hero tint */
  --muted: #5E6272;       /* footer text: 6.1:1 (old site's grey was 3.5:1) */
  --paper: #FFFFFF;
  --hero-tint: #D2E4F0;   /* light blue of the desk photo, shown until the photo loads */
  --hero-overlay: rgba(190, 210, 224, 0.2);
  --focus: var(--navy);

  --font: "Mulish", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --gutter: 16px;
  --content: 44rem;
  --wide: 62rem;
  --tap: 44px;
}

@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
}

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

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

h1, h2, h3, p, ul { margin: 0; }

a { color: var(--navy); }

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

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

.skip-link {
  position: absolute;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  top: 0;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 1rem;
  background: var(--navy);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-120%);
}
.skip-link:focus-visible { transform: translateY(0.5rem); }

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

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid #E3E8EE;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding-block: 0.5rem;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.logo-link {
  flex: none;
  display: flex;
  align-items: center;
  min-height: var(--tap);
  border-radius: 4px;
}
.logo { width: 9.5rem; }

.site-nav,
.header-contact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a,
.header-contact a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: 0.625rem;
  color: var(--navy);
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 4px;
}

.site-nav a:hover,
.header-contact a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Facebook and Email as round icons, each a 44px tap target */
.header-contact .icon-link {
  justify-content: center;
  width: var(--tap);
  padding-inline: 0;
  border-radius: 50%;
}

.header-contact .icon-link img {
  display: block;
  width: 32px;
  height: 32px;
}

.icon-circle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EEF1F5; /* icon is navy on this grey: 12:1 */
  color: var(--navy);
}

.header-contact .icon-link:hover .icon-circle { background: #DDE3EC; }

/* Facebook and Email sit in the hero, booking and footer on phones */
.header-contact { display: none; }

@media (min-width: 48rem) {
  .logo { width: 11.5rem; }
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .header-contact { display: flex; justify-self: end; }
}

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

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(60svh, 30rem);
  padding-block: 3rem;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  background-color: var(--hero-tint);
  background-image: url("assets/img/hero-1200.jpg");
  background-size: cover;
  background-position: center;
  text-align: center;
  color: var(--text-strong);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  max-width: 44rem;
}

.hero h1 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.125em;
  text-transform: uppercase;
  color: var(--text-strong);
}

.hero p { text-wrap: balance; }
.nowrap { white-space: nowrap; }

@media (min-width: 48rem) {
  .hero {
    min-height: min(65svh, 34rem);
    background-image: url("assets/img/hero.jpg");
  }
}

/* ---------- Buttons (outlined, as on the old site) ---------- */

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--text);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
}

.btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
}

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

.services {
  padding-block: 3rem;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.services-inner {
  max-width: var(--wide);
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
}

/* Section title kept for screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.services-body {
  border-block: 2px solid var(--navy);
  padding-block: 1.75rem;
  display: grid;
  gap: 1.75rem;
}

.block {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9375rem;
  min-width: 0;
}

.block h2,
.block h3 {
  color: var(--purple);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.block strong { color: #000; }

.block ul {
  padding-left: 1.5rem;
  display: grid;
  gap: 0.125rem;
}

.booking-buttons {
  list-style: none;
  padding: 0.75rem 0 0;
  justify-content: flex-start;
}

.block .booking-buttons {
  display: flex;
  padding-left: 0;
  gap: 0.75rem 1rem;
}

.small {
  font-size: 0.875rem;
  color: var(--muted);
}

.addr {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
  user-select: all;
}

@media (max-width: 30rem) {
  .booking-buttons { flex-direction: column; }
  .booking-buttons .btn { width: 100%; }
}

/* ---------- The Call Me Math series (secondary to tutoring) ---------- */

.series {
  padding-block: 0 3rem;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.series-link { padding-top: 0.25rem; }

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

.site-footer {
  border-top: 1px solid #E3E8EE;
  padding-block: 2.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--content);
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 4rem;
}

.footer-logo { width: 7.5rem; }

.footer-contact {
  display: grid;
  justify-items: center;
}

.footer-heading {
  color: var(--text);
  font-weight: 700;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-contact a:hover { color: var(--navy); text-decoration: underline; }

/* ---------- Page not found ---------- */

.notfound-title {
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
}
