/*
  TOM'S MATHS TUTORING — design tokens
  --------------------------------------------------
  Ink        #0b1722   page background (chalkboard navy)
  Panel      #112436   raised section panels / cards
  Chalk      #eef1f4   primary text
  Slate      #9fb2c4   secondary text
  Pen-blue   #6fa3d8   accent, links, primary actions
  Rust       #c0644a   "weak" stage + emphasis
  Amber      #d9a440   "covered" stage
  Sage       #7fae6f   "proficient" stage
  Teal       #3f9e8f   "mastered" stage
  Grey       #57697b   "gaps" stage

  The five stage colours (grey → rust → amber → sage → teal) come straight
  from the progress sheet itself, and recur through the page as the visual
  signature: section dividers, the progress legend, and the bar chart.
*/

:root {
  --ink: #0b1722;
  --panel: #112436;
  --panel-soft: #15293f;
  --line: rgba(238, 241, 244, 0.09);
  --chalk: #eef1f4;
  --slate: #9fb2c4;
  --pen-blue: #6fa3d8;
  --pen-blue-dim: #4d7eb0;
  --rust: #c0644a;
  --amber: #d9a440;
  --sage: #7fae6f;
  --teal: #3f9e8f;
  --grey-stage: #57697b;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 36px 36px;
  font-family: var(--font-body);
  color: var(--chalk);
  line-height: 1.6;
}

p, li {
  font-size: 18px;
  color: var(--slate);
}

strong {
  color: var(--chalk);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--chalk);
  font-weight: 600;
  margin: 0;
}

h1 {
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
  text-align: center;
}

h2 {
  font-size: clamp(28px, 4vw, 36px);
}

h4 {
  font-size: 17px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--pen-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

a {
  color: var(--pen-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

img {
  max-width: 100%;
  display: block;
  border: 1px solid rgba(238, 241, 244, 0.18);
  border-radius: 2px;
}

section {
  width: min(700px, 86%);
  margin: 0 auto;
  padding: 70px 0;
}

#why-me, #how-i-teach, #resources, #booking, #contacts {
  border-bottom: 1px solid var(--line);
}

footer {
  text-align: center;
  padding: 32px 0 48px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  letter-spacing: 0.03em;
}

/* ---------- hero load-in (the one orchestrated motion moment) ---------- */

.eyebrow, #opening h1, #title-descriptor, .stamp-row, .cta-row {
  opacity: 0;
  animation: rise 0.7s ease forwards;
}

.eyebrow { animation-delay: 0.05s; }
#opening h1 { animation-delay: 0.15s; }
#title-descriptor { animation-delay: 0.3s; }
.stamp-row { animation-delay: 0.45s; }
.cta-row { animation-delay: 0.6s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eyebrow, #opening h1, #title-descriptor, .stamp-row, .cta-row {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- nav ---------- */

#site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 5%;
  background-color: rgba(11, 23, 34, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--chalk);
}

.brand:hover {
  text-decoration: none;
  color: var(--pen-blue);
}

#menu {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#menu a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--slate);
  letter-spacing: 0.02em;
}

#menu a:hover {
  color: var(--pen-blue);
  text-decoration: none;
}

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

#opening {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(820px, 90%);
  margin: 0 auto;
  padding: 64px 0 56px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pen-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
}

#opening h1 span {
  color: var(--pen-blue);
}

#title-descriptor {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 19px;
  max-width: 480px;
}

.stamp-row {
  display: flex;
  gap: 28px;
  margin: 36px 0 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 138px;
  height: 138px;
  border: 2px dashed var(--pen-blue-dim);
  border-radius: 50%;
  transform: rotate(-6deg);
  font-family: var(--font-mono);
}

.stamp-alt {
  transform: rotate(5deg);
  border-color: var(--rust);
}

.stamp-figure {
  font-size: 22px;
  font-weight: 600;
  color: var(--chalk);
  line-height: 1.15;
}

.stamp-label {
  font-size: 11px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
  line-height: 1.3;
}

.cta-row {
  display: flex;
  gap: 18px;
  margin-top: 38px;
  flex-wrap: wrap;
  justify-content: center;
}

.button, .button-primary {
  display: inline-block;
  background-color: var(--pen-blue);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: 3px;
  border: none;
}

.button:hover, .button-primary:hover {
  background-color: var(--chalk);
  text-decoration: none;
}

.button-ghost {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--slate);
  padding: 12px 6px;
  border-bottom: 1px solid var(--slate);
}

.button-ghost:hover {
  color: var(--pen-blue);
  border-color: var(--pen-blue);
  text-decoration: none;
}

/* ---------- section divider (signature rule) ---------- */

.rag-rule {
  height: 4px;
  width: 100%;
  margin: 14px 0 32px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--grey-stage) 0% 20%,
    var(--rust) 20% 40%,
    var(--amber) 40% 60%,
    var(--sage) 60% 80%,
    var(--teal) 80% 100%
  );
  opacity: 0.85;
}

.section-intro {
  font-size: 18px;
  max-width: 560px;
}

/* ---------- why me ---------- */

.why-me-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  align-items: start;
}

.photo-frame img {
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

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

.check-list > li {
  padding-left: 26px;
  position: relative;
}

.check-list > li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-family: var(--font-mono);
  font-weight: 600;
}

.check-list > li.grade-item::before {
  content: "▸";
  color: var(--pen-blue);
}

details {
  margin-top: 4px;
}

summary {
  cursor: pointer;
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 15px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+ ";
  color: var(--pen-blue);
}

details[open] summary::before {
  content: "− ";
}

summary:hover {
  color: var(--pen-blue);
}

.grade-detail {
  margin-top: 16px;
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grade-caption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pen-blue);
  margin: 8px 0 0;
}

.detail-note {
  font-size: 14px;
  font-style: italic;
  color: var(--slate);
  margin: 0;
}

/* ---------- how i teach ---------- */

.step {
  margin-top: 44px;
}

.step h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-family: var(--font-display);
}

.qnum {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--pen-blue);
  padding: 3px 9px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.indent {
  margin-top: 16px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rag-legend {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rag-legend li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
}

.rag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transform: translateY(2px);
}

.rag-gaps .rag-dot, .rag-bar .rag-gaps { background-color: var(--grey-stage); }
.rag-weak .rag-dot, .rag-bar .rag-weak { background-color: var(--rust); }
.rag-covered .rag-dot, .rag-bar .rag-covered { background-color: var(--amber); }
.rag-proficient .rag-dot, .rag-bar .rag-proficient { background-color: var(--sage); }
.rag-mastered .rag-dot, .rag-bar .rag-mastered { background-color: var(--teal); }

.rag-bar {
  display: flex;
  width: 100%;
  height: 38px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.rag-bar .rag-seg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}

.image-row {
  display: flex;
  gap: 14px;
  width: 100%;
}

.crop {
  width: 50%;
  height: 220px;
  object-fit: cover;
  object-position: center;
}

.image-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.image-column h4 {
  margin-top: 12px;
}

.timeline-bar {
  display: flex;
  width: 100%;
  height: 46px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.tl-seg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-1, .tl-4 { background-color: var(--slate); }
.tl-2 { background-color: var(--pen-blue); }
.tl-3 { background-color: var(--rust); }

.timeline-key {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-key li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---------- resources ---------- */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--chalk);
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 18px;
}

a.chip:hover {
  border-color: var(--pen-blue);
  color: var(--pen-blue);
  text-decoration: none;
}

.chip-static {
  color: var(--slate);
}

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

.booking-card {
  display: flex;
  align-items: center;
  gap: 36px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
}

.price-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  flex-shrink: 0;
  border: 2px dashed var(--teal);
  border-radius: 50%;
  font-family: var(--font-mono);
}

.price-figure {
  font-size: 30px;
  font-weight: 600;
  color: var(--chalk);
}

.price-unit {
  font-size: 11px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.booking-copy p {
  margin: 0 0 10px;
}

.booking-copy .button-primary {
  margin-top: 6px;
}

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

.email-line a {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--chalk);
  border-bottom: 1px solid var(--pen-blue);
}

.email-line a:hover {
  color: var(--pen-blue);
  text-decoration: none;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  #site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #menu {
    gap: 14px;
    width: 100%;
  }

  .why-me-grid {
    grid-template-columns: 1fr;
  }

  .photo-frame {
    width: 120px;
    margin: 0 auto;
  }

  .image-row {
    flex-direction: column;
  }

  .crop {
    width: 100%;
  }

  .rag-bar .rag-seg {
    font-size: 10px;
  }

  .booking-card {
    flex-direction: column;
    text-align: center;
  }

  section {
    padding: 52px 0;
  }
}