/* ============================================================
   Orbit Tutoring — design tokens
   Palette reads like an engineering pad: pale pulp paper,
   green printed grid, dark spruce ink, one magenta plot line.
   ============================================================ */
:root {
  --paper:      #131A16;
  --paper-2:    #1A231E;
  --grid:       #222E28;
  --grid-bold:  #2F4038;
  --ink:        #E8EBE3;
  --mid:        #9AA79D;
  --hair:       #2C3A33;
  --plot:       #E4632F;   /* fills, graphics, large text */
  --plot-deep:  #F0906A;   /* small text and links — lighter for contrast */
  --on-plot:    #12100E;   /* text sitting on the accent */
  --shadow:     #050706;

  --display: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gut: clamp(1.25rem, 5vw, 5rem);
  --max: 1180px;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "wdth" 115;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
}

p { margin: 0 0 1rem; }
a { color: var(--plot-deep); }

.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 {
  position: absolute; left: -999px; top: 0; z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1rem; font-family: var(--mono); font-size: 0.8rem;
}
.skip:focus { left: 0; }

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

/* ── shared bits ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin: 0 0 0.9rem;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.78rem 1.35rem;
  border: 1.5px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.btn--go {
  background: var(--plot);
  border-color: var(--plot);
  color: var(--on-plot);
  box-shadow: 3px 3px 0 var(--shadow);
}
.btn--go:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn--go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.btn--quiet { background: transparent; color: var(--ink); }
.btn--quiet:hover { background: var(--ink); color: var(--paper); }

/* ── top bar ─────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem var(--gut);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.bar__mark {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.01em; color: var(--ink); text-decoration: none;
  margin-right: auto;
}
.bar__glyph { color: var(--plot); font-size: 1.05rem; }
.bar__nav { display: flex; gap: 1.6rem; }
.bar__nav a {
  font-family: var(--mono); font-size: 0.8rem; color: var(--mid);
  text-decoration: none; padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.bar__nav a:hover { color: var(--ink); border-bottom-color: var(--plot); }
.bar__cta { padding: 0.55rem 1rem; }


/* ── hero ────────────────────────────────────────────────── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gut) clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__title {
  font-size: clamp(2.7rem, 7.2vw, 4.6rem);
  margin-bottom: 1.4rem;
}
.hero__title em {
  font-style: normal;
  color: var(--plot);
  position: relative;
  white-space: nowrap;
}
.hero__title em::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.06em;
  height: 0.09em;
  background: var(--plot);
  transform-origin: left;
  animation: rule 0.7s cubic-bezier(.2,.7,.3,1) 0.5s both;
}
@keyframes rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lede {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  color: var(--mid);
  max-width: 34ch;
  margin-bottom: 1.8rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.4rem; }
.hero__note {
  font-family: var(--mono); font-size: 0.76rem; line-height: 1.6;
  color: var(--mid); max-width: 42ch; margin: 0;
}

/* ── signature: the plot ─────────────────────────────────── */
.plot { margin: 0; }
.plot svg {
  width: 100%; height: auto; display: block;
  border: 1.5px solid var(--grid-bold);
}
.plot__axes path { stroke: var(--ink); stroke-width: 1.5; }
.plot__tick, .plot__label {
  font-family: var(--mono); fill: var(--mid); font-size: 11px;
}
.plot__label { font-size: 9.5px; letter-spacing: 0.12em; fill: var(--mid); }
.plot__curve {
  stroke: var(--plot); stroke-width: 3;
  stroke-dasharray: 640; stroke-dashoffset: 640;
  animation: draw 2.1s cubic-bezier(.35,.1,.25,1) 0.35s forwards;
}
.plot__ticks path { stroke: var(--mid); stroke-width: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.plot__pts circle {
  fill: var(--paper); stroke: var(--plot); stroke-width: 2.5;
  opacity: 0; animation: pop 0.35s ease forwards;
}
.plot__pts circle { animation-delay: 2.2s; }
@keyframes pop { from { opacity: 0; r: 1; } to { opacity: 1; } }

.plot__note path { stroke: var(--mid); stroke-width: 1; stroke-dasharray: 3 3; }
.plot__note text {
  font-family: var(--mono); font-size: 11px; fill: var(--ink);
}
.plot__note { opacity: 0; animation: fade 0.6s ease 2.35s forwards; }
@keyframes fade { to { opacity: 1; } }

.plot figcaption {
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.5;
  color: var(--mid); margin-top: 0.7rem; max-width: 46ch;
}

/* ── how it works ────────────────────────────────────────── */
.strip {
  border-block: 1px solid var(--hair);
  background: var(--paper-2);
}
.steps {
  max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 4vw, 3rem) var(--gut);
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem);
}
.steps li { position: relative; padding-top: 0.4rem; }
.steps__n {
  display: block; font-family: var(--mono); font-size: 0.72rem;
  color: var(--plot-deep); letter-spacing: 0.1em; margin-bottom: 0.6rem;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 0.4rem; font-variation-settings: "wdth" 108; }
.steps p { font-size: 0.92rem; color: var(--mid); margin: 0; }

/* ── generic section ─────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gut);
}
.section__head { max-width: 46ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 0.75rem; }
.section__sub { color: var(--mid); margin: 0; }

/* ── subjects & rates ────────────────────────────────────── */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr 0.95fr;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}
.course-group__h {
  font-family: var(--mono); font-weight: 600; font-size: 0.74rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mid);
  padding-bottom: 0.6rem; margin-bottom: 1rem;
  border-bottom: 1.5px solid var(--ink);
  font-variation-settings: normal;
}
.courses { list-style: none; margin: 0; padding: 0; }
.courses li {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--hair);
}
.code {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 400;
  color: var(--mid); letter-spacing: 0.01em;
}
.code b { font-weight: 600; color: var(--plot-deep); }
.course-name { font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.course-group__note {
  font-family: var(--mono); font-size: 0.73rem; line-height: 1.65;
  color: var(--mid); margin: 1.1rem 0 0;
  padding-left: 0.9rem; border-left: 1.5px solid var(--grid-bold);
}

.rates {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  padding: 1.4rem;
}
.rate-list { margin: 0; }
.rate {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--hair);
}
.rate:last-child { border-bottom: 0; }
.rate dt { font-size: 0.95rem; font-weight: 600; }
.rate dt span {
  display: block; font-family: var(--mono); font-size: 0.7rem;
  font-weight: 400; color: var(--mid); letter-spacing: 0.02em;
}
.rate dd {
  margin: 0; font-family: var(--mono); font-size: 1.15rem; font-weight: 600;
  white-space: nowrap;
}
.pay-methods {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin: 1.1rem 0 0; padding-top: 1rem;
  border-top: 1.5px dashed var(--grid-bold);
}
.pay-methods span {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--plot-deep);
  border: 1.5px solid var(--hair); padding: 0.35rem 0.7rem;
}
.pay-methods + .rates__fine { border-top: 0; padding-top: 0.9rem; margin-top: 0; }

.rates__fine {
  font-family: var(--mono); font-size: 0.73rem; line-height: 1.6;
  color: var(--mid); margin: 1.1rem 0 0; padding-top: 1rem;
  border-top: 1.5px dashed var(--grid-bold);
}

/* ── booking ─────────────────────────────────────────────── */
.section--book { border-top: 1px solid var(--hair); }
.picker { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.picker__btn {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  background: transparent; color: var(--mid);
  border: 1.5px solid var(--hair);
  font-family: var(--mono); font-size: 0.85rem;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.picker__btn:hover { color: var(--ink); border-color: var(--mid); }
.picker__btn[aria-pressed="true"] {
  background: var(--plot); border-color: var(--plot); color: var(--on-plot);
}
.picker__label { font-weight: 500; }
.picker__price { opacity: 0.75; }
.picker__btn[aria-pressed="true"] .picker__price { opacity: 0.85; }

.cal-embed {
  min-height: 620px;
  border: 1.5px solid var(--ink);
  background: var(--paper-2);
  overflow: hidden;
}
.cal-embed__fallback, .cal-embed__error {
  font-family: var(--mono); font-size: 0.85rem; color: var(--mid);
  padding: 2.5rem; text-align: center; line-height: 1.7;
}

/* ── about ───────────────────────────────────────────────── */
.section--about { border-top: 1px solid var(--hair); }
.about__grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.about__grid h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1.2rem; }
.about__grid p { color: var(--mid); max-width: 52ch; }
.about__side { display: flex; flex-direction: column; gap: 1.75rem; }

.portrait { margin: 0; }
.portrait img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 5; object-fit: cover; object-position: center;
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--grid-bold);
  /* portrait sits on the grid tone in both themes */
  background: var(--paper-2);
}
/* Shown only while photo.jpg is missing — disappears once you add the file. */
.portrait--empty {
  aspect-ratio: 4 / 5;
  display: grid; place-content: center; text-align: center; gap: 0.35rem;
  border: 1.5px dashed var(--grid-bold);
  background: var(--paper-2);
  font-family: var(--mono); font-size: 0.78rem; color: var(--mid);
  padding: 1.5rem;
}
.portrait--empty code { color: var(--plot-deep); font-size: 0.8rem; }

.creds { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.creds li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--hair);
}
.creds__k {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mid); padding-top: 0.15rem;
}
.creds__v { font-size: 0.93rem; text-align: right; }

/* ── contact ────────────────────────────────────────────── */
.section--contact { border-top: 1px solid var(--hair); }
.mailto {
  display: inline-flex; flex-direction: column; gap: 0.35rem;
  padding: 1.4rem 2rem;
  border: 1.5px solid var(--plot);
  background: var(--plot);
  box-shadow: 5px 5px 0 var(--shadow);
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease;
}
.mailto:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shadow); }
.mailto:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.mailto__label {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--on-plot); opacity: 0.75;
}
.mailto__addr {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 500;
  color: var(--on-plot); word-break: break-all;
}

/* ── policy ──────────────────────────────────────────────── */
.section--policy { border-top: 1px solid var(--hair); }
.policy {
  margin: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.75rem 3rem;
  max-width: 900px;
}
.policy__item { border-top: 1.5px solid var(--ink); padding-top: 0.9rem; }
.policy dt {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--plot-deep); margin-bottom: 0.5rem;
}
.policy dd { margin: 0; font-size: 0.93rem; color: var(--mid); line-height: 1.65; }

/* ── footer ──────────────────────────────────────────────── */
.foot {
  border-top: 1.5px solid var(--ink);
  padding: 2.5rem var(--gut);
  max-width: var(--max); margin: 0 auto;
  font-family: var(--mono); font-size: 0.78rem; color: var(--mid);
}
.foot p { margin: 0 0 0.4rem; }
.foot__mark { color: var(--ink); font-weight: 600; letter-spacing: 0.02em; }
.foot__fine { margin-top: 1rem; opacity: 0.8; font-size: 0.72rem; }

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr 1fr; }
  .rates { grid-column: 1 / -1; }
  .about__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.6rem; }
}
@media (max-width: 640px) {
  .bar__nav { display: none; }
  .policy { grid-template-columns: 1fr; gap: 1.4rem; }
  .cols { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(2.3rem, 10vw, 3rem); }
  .creds li { flex-direction: column; gap: 0.15rem; }
  .creds__v { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .plot__curve { stroke-dashoffset: 0; }
  .plot__pts circle, .plot__note { opacity: 1; }
}
