/* ==========================================================================
   Formula7 tutoring site
   Built on the Formula7 design kit (design/css/tokens.css). Tokens are
   repeated here so the site folder works on its own.
   ========================================================================== */

/* ---- Fonts ---- */
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo-variable-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../assets/fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../assets/fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../assets/fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #151515;
  --paper: #F4F1EA;
  --white: #FFFFFF;
  --cell: #F2CC5B;
  --g4: #A8DCC6;   /* Sciences */
  --g5: #A9CBF0;   /* Mathematics */
  --grey: #4A4A4A;
  --line: #DEDAD1;
  --error: #B3261E;

  --f-display: "Archivo", "Arial Black", sans-serif;
  --f-body: "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --rule: 2px solid var(--ink);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--cell); padding: 10px 16px; border: var(--rule); font-weight: 600; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--cell); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }

/* ---- Type ---- */
.h2 {
  font: 800 clamp(34px, 5vw, 56px)/1.02 var(--f-display); font-stretch: 118%;
  letter-spacing: -0.025em; text-wrap: balance;
}
.h2--paper { color: var(--paper); }
.h3 {
  font: 800 clamp(24px, 2.6vw, 32px)/1.1 var(--f-display); font-stretch: 112%;
  letter-spacing: -0.02em;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 20px;
  border: var(--rule); border-radius: 0;
  font: 600 16px/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn--lg { min-height: 54px; padding: 15px 26px; font-size: 17px; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--cell { background: var(--cell); color: var(--ink); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
/* Hard offset shadow, like a printed tile lifting off the page */
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.btn--cell:hover, .hero .btn--ghost:hover, .request .btn--ghost:hover { box-shadow: 3px 3px 0 var(--paper); }
.btn--ghost:hover { background: var(--cell); color: var(--ink); border-color: var(--ink); }
.btn:active { transform: none; box-shadow: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white); border-bottom: var(--rule);
}
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__tile { width: 48px; height: 48px; flex: none; }
/* Name block: the lockup in live text. Wordmark in Archivo, EDUCATION line in Plex Mono (same ratio as the logo files). */
.brand__name { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand__word { font: 800 24px/1 var(--f-display); font-stretch: 112%; letter-spacing: -0.025em; }
.brand__sub { font: 400 11px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 30px; font-weight: 500; font-size: 16px; }
.nav a:not(.btn) { text-decoration: none; padding: 8px 0; background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 2px no-repeat; transition: background-size .2s ease; }
.nav a:not(.btn):hover, .nav a[aria-current="true"] { background-size: 100% 2px; }
.nav__cta { margin-left: 6px; }
.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: var(--white); border: var(--rule); cursor: pointer;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { background: var(--ink); color: var(--paper); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(56px, 9vw, 120px);
}
.hero__kicker { font-weight: 500; font-size: 17px; color: var(--cell); margin-bottom: 20px; }
.hero__title {
  font: 800 clamp(36px, 4.5vw, 68px)/0.98 var(--f-display); font-stretch: 118%;
  letter-spacing: -0.035em;
}
@media (min-width: 601px) { .hero__title .line { white-space: nowrap; } }
.hero__title .line { display: block; }
.hero__lead { margin-top: 28px; font-size: clamp(18px, 1.6vw, 20px); max-width: 34ch; color: #D9D5CB; }
.hero__slogan {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 10px;
  font: 600 18px/1.3 var(--f-body); color: var(--paper);
}
.hero__slogan::before { content: ""; width: 22px; height: 2px; background: var(--cell); }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

/* The Element: the logo cell at hero scale */
.element {
  position: relative; justify-self: end; width: min(100%, 400px); aspect-ratio: 1;
  background: var(--cell); color: var(--ink);
  border: 3px solid var(--cell); outline: 3px solid var(--ink); outline-offset: -14px;
  box-shadow: 14px 14px 0 #2A2A2A;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: 1fr auto;
  padding: clamp(26px, 3.4vw, 40px);
}
.element { container-type: inline-size; }
.element__num { font: 800 9cqi/1 var(--f-display); font-stretch: 100%; }
.element__mass { justify-self: end; font: 500 5cqi/1.6 var(--f-mono); font-variant-numeric: tabular-nums; }
.element__sym {
  grid-column: 1 / -1; align-self: center;
  font: 800 38cqi/0.85 var(--f-display); font-stretch: 125%; letter-spacing: -0.04em;
}
.element__name { grid-column: 1 / -1; font: 500 6cqi/1 var(--f-body); }

/* One orchestrated load moment: the headline lines rise, the cell drops into place */
@media (prefers-reduced-motion: no-preference) {
  .hero__title .line { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero__title .line:nth-child(2) { animation-delay: .08s; }
  .hero__title .line:nth-child(3) { animation-delay: .16s; }
  .element { animation: drop .8s .25s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(28px); } }
  @keyframes drop { from { opacity: 0; transform: translate(14px, -24px) rotate(2deg); box-shadow: 0 0 0 #2A2A2A; } }
}

.hero__note { margin-top: 16px; font-size: 15px; color: #D9D5CB; }
.hero__note b { color: var(--cell); font-weight: 600; }

/* ---- How we teach teaser (under the facts strip) ---- */
.teach { background: var(--paper); border-bottom: var(--rule); }
.teach__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding-block: clamp(28px, 4vw, 44px);
}
.teach__quote {
  max-width: 62ch; padding-left: 20px; border-left: 6px solid var(--cell);
  font: 700 clamp(18px, 1.9vw, 22px)/1.45 var(--f-display); font-stretch: 105%; letter-spacing: -0.005em;
}
.teach__link {
  flex: none; font-weight: 600; text-decoration: none; padding: 10px 0;
  border-bottom: 2px solid var(--ink);
}
.teach__link:hover { border-bottom-color: var(--cell); }
@media (max-width: 700px) {
  .teach__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ==========================================================================
   Facts strip
   ========================================================================== */
.facts { background: var(--white); border-bottom: var(--rule); }
.facts__list { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts__list li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 26px 24px; border-left: var(--rule);
}
.facts__list li:last-child { border-right: var(--rule); }
.facts__list b { font: 800 30px/1 var(--f-display); font-stretch: 112%; letter-spacing: -0.02em; }
.facts__list span { font-size: 15px; color: var(--grey); line-height: 1.4; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--white { background: var(--white); border-block: var(--rule); }
/* Two light sections back to back: don't stack both paddings into one big gap */
.section:not(.section--white) + .section:not(.section--white) { padding-top: 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: var(--rule); margin-bottom: clamp(32px, 4vw, 48px);
}
.section-head p { color: var(--grey); font-size: 16px; }

/* ---- Subjects ---- */
.subjects { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.subjects__tiles { display: grid; gap: 14px; }
.tile {
  display: grid; grid-template-rows: auto 1fr auto; text-align: left;
  height: 150px; padding: 12px 14px; border: var(--rule); border-radius: 0;
  cursor: pointer; position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile--g4 { background: var(--g4); }
.tile--g5 { background: var(--g5); }
.tile__top { display: flex; justify-content: space-between; font: 600 14px/1 var(--f-mono); }
.tile__top span + span { font-weight: 400; font-size: 13px; }
.tile__sym { align-self: center; justify-self: center; font: 800 54px/1 var(--f-display); font-stretch: 125%; letter-spacing: -0.03em; }
.tile__name { justify-self: center; font-size: 15px; font-weight: 500; }
.tile:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.tile[aria-selected="true"] { transform: translate(-6px, -6px); box-shadow: 6px 6px 0 var(--ink); }
.tile[aria-selected="false"] { filter: saturate(.55); }
.tile[aria-selected="false"]:hover { filter: none; }

.panel {
  background: var(--white); border: var(--rule); padding: clamp(24px, 3.5vw, 44px);
  display: grid; gap: 26px;
}
.panel[hidden] { display: none; }   /* only the chosen subject shows */
.panel__lead { font-size: 18px; max-width: 60ch; }
.panel__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.panel h4 { font: 600 15px/1.3 var(--f-body); color: var(--grey); margin-bottom: 12px; }
.panel .btn { justify-self: start; }
@media (prefers-reduced-motion: no-preference) {
  .panel:not([hidden]) { animation: panel-in .3s ease both; }
  @keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
}

.topics li { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.topics li:last-child { border-bottom: 1px solid var(--line); }
.topics span { font: 600 14px/1 var(--f-mono); width: 16px; flex: none; }

.checks li { position: relative; padding: 6px 0 6px 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 14px; height: 14px;
  border: var(--rule); background: var(--cell);
}

/* ---- Slogan band ---- */
.band { background: var(--cell); border-block: var(--rule); }
.band__inner { padding-block: clamp(48px, 7vw, 88px); display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.band__line {
  font: 800 clamp(34px, 5.4vw, 72px)/1 var(--f-display); font-stretch: 118%; letter-spacing: -0.03em;
}
.band__note { font-weight: 500; font-size: 18px; max-width: 22ch; padding-left: 16px; border-left: var(--rule); }

/* ---- Tutors ---- */
.tutors { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.tutors__lead { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.55; max-width: 34ch; }
.creds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cred {
  display: grid; grid-template-rows: auto 1fr auto; gap: 12px; min-height: 230px;
  padding: 14px 16px 18px; background: var(--white); border: var(--rule);
}
.cred--cell { background: var(--cell); }
.cred--g4 { background: var(--g4); }
.cred__top { font: 600 14px/1 var(--f-mono); }
.cred__big {
  align-self: center; font: 800 96px/0.9 var(--f-display); font-stretch: 125%; letter-spacing: -0.04em;
}
.cred__big--words { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.05; letter-spacing: -0.02em; font-stretch: 112%; }
.cred__text { font-weight: 500; line-height: 1.4; }

.knowhow {
  margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(32px, 4vw, 48px); border-top: var(--rule);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: clamp(28px, 4vw, 56px); align-items: start;
}
.knowhow__intro { display: grid; gap: 14px; }
.knowhow__intro p { color: var(--grey); max-width: 36ch; }
.pitfalls { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--rule); border-left: var(--rule); background: var(--white); }
.pitfall { padding: 18px 18px 20px; border-right: var(--rule); border-bottom: var(--rule); display: grid; gap: 8px; align-content: start; }
.pitfall dt { font: 800 18px/1.2 var(--f-display); font-stretch: 112%; letter-spacing: -0.01em; }
.pitfall dt::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--cell); border: 2px solid var(--ink); margin-right: 10px; vertical-align: 1px; }
.pitfall dd { font-size: 15px; line-height: 1.5; color: var(--grey); }

.reputation {
  margin-top: clamp(40px, 5vw, 64px); padding: clamp(24px, 3vw, 36px);
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: clamp(20px, 4vw, 56px); align-items: start;
}
.reputation .h3 { color: var(--cell); }
.reputation p { font-size: 18px; line-height: 1.6; color: #D9D5CB; max-width: 62ch; }

/* ---- Prices ---- */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price__note {
  margin-top: 4px; padding: 10px 14px; border: 2px dashed var(--ink);
  font-size: 15px; font-weight: 500; line-height: 1.45;
}
.price { background: var(--white); border: var(--rule); padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; align-content: start; }
.price--cell { background: var(--cell); }
.price__head { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
.price__name { font: 800 24px/1.1 var(--f-display); text-wrap: balance; font-stretch: 112%; letter-spacing: -0.02em; }
.price__amount { font: 800 clamp(56px, 5.6vw, 80px)/0.9 var(--f-display); font-stretch: 112%; letter-spacing: -0.04em; display: flex; }
.price__eur { font-size: .42em; margin-top: .12em; margin-right: .06em; }
.price__meta span { white-space: nowrap; }   /* if it ever wraps, it breaks between parts, not inside them */
.price__meta { font: 500 14px/1.4 var(--f-mono); padding-bottom: 14px; border-bottom: var(--rule); }
.price .checks li::before { background: var(--white); }
.price--cell .checks li::before { background: var(--ink); }
.price__promise {
  margin-top: 4px; padding: 10px 14px; background: var(--white); border: var(--rule);
  font-weight: 600; justify-self: start;
}
.prices__policy { margin-top: 24px; max-width: 920px; font-size: 16px; color: var(--grey); }
.prices__policy a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }
.prices__cta { margin-top: 32px; }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--rule); counter-reset: none; }
.step { padding: clamp(24px, 3vw, 36px); display: grid; gap: 10px; align-content: start; }
.step + .step { border-left: var(--rule); }
.step__n {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 14px;
  border: var(--rule); background: var(--cell);
  font: 800 26px/1 var(--f-display); font-stretch: 112%;
}
.step__title { font: 800 22px/1.15 var(--f-display); font-stretch: 112%; letter-spacing: -0.015em; }
.step p { color: var(--grey); }

/* ==========================================================================
   Request form
   ========================================================================== */
.request { background: var(--ink); color: var(--paper); padding-block: clamp(64px, 9vw, 120px); }
.request__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.request__intro { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 20px; }
.request__intro > p { font-size: 18px; color: #D9D5CB; max-width: 36ch; }
.request__facts { display: grid; gap: 0; border-top: 2px solid #3A3A3A; margin-top: 8px; }
.request__facts div { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 2px solid #3A3A3A; }
.request__facts dt { font-weight: 500; }
.request__facts dd { font: 800 28px/1 var(--f-display); font-stretch: 112%; color: var(--cell); }

.form, .form-done {
  background: var(--white); color: var(--ink); border: 3px solid var(--cell);
  padding: clamp(22px, 3.5vw, 40px); display: grid; gap: 22px;
}
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; align-content: start; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 16px; padding: 0; margin-bottom: 8px; }
.field > label { margin-bottom: 0; }
.req { color: var(--error); }
.hint { font-weight: 400; color: var(--grey); font-size: 14px; margin-left: 6px; }
.field__help { font-size: 14px; color: var(--grey); }
.field__err { font-size: 14px; font-weight: 500; color: var(--error); display: flex; gap: 6px; align-items: center; }
.field__err::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; background: var(--error); color: var(--white); font: 700 12px/1 var(--f-mono); }

input[type="text"], input[type="email"], input[type="date"], textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 17px/1.4 var(--f-body); color: var(--ink);
  background: var(--paper); border: var(--rule); border-radius: 0;
  transition: background-color .12s ease;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus { background: var(--white); outline: 3px solid var(--cell); outline-offset: 0; box-shadow: none; }
[aria-invalid="true"] { border-color: var(--error) !important; background: #FBEDEC !important; }

/* Segmented choices: square cells that fill yellow when chosen */
.seg { display: grid; grid-template-columns: repeat(2, 1fr); border: var(--rule); }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg--5 { grid-template-columns: repeat(5, 1fr); }
.seg label { position: relative; cursor: pointer; display: grid; }
.seg--5 span { font-size: 15px; line-height: 1.25; }
.seg label + label { border-left: var(--rule); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center; min-height: 48px; padding: 8px 10px;
  font-weight: 500; text-align: center; background: var(--paper);
  transition: background-color .12s ease;
}
.seg label:hover span { background: #EAE5D9; }
.seg input:checked + span { background: var(--cell); font-weight: 600; }
.seg input[type="checkbox"]:checked + span::before { content: ""; width: 10px; height: 6px; border: solid var(--ink); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translateY(-2px); margin-right: 8px; display: inline-block; }
.seg input[type="checkbox"] + span { display: flex; justify-content: center; align-items: center; }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: -5px; }
fieldset[aria-invalid="true"] .seg { border-color: var(--error); }

.inperson { display: grid; gap: 14px; padding: 18px; background: var(--paper); border-left: 6px solid var(--cell); }
.inperson input[type="text"] { background: var(--white); }
.inperson__note { font-size: 15px; line-height: 1.5; display: flex; gap: 10px; }
.inperson__note::before {
  content: "i"; flex: none; width: 20px; height: 20px; margin-top: 2px; display: grid; place-items: center;
  border: var(--rule); font: 700 12px/1 var(--f-mono); background: var(--cell);
}
@media (prefers-reduced-motion: no-preference) {
  .inperson:not([hidden]) { animation: panel-in .25s ease both; }
}
.levels { display: grid; gap: 8px; }
.levels:has(.level-row:not([hidden])) { margin-top: 6px; }
.level-row {
  display: grid; grid-template-columns: 1fr 180px; align-items: center; gap: 6px 16px;
  margin: 0; padding: 10px 12px 10px 16px; border: 0; border-left: 6px solid var(--cell); background: var(--paper);
  min-width: 0;
}
.level-row legend { float: left; padding: 0; font-weight: 500; }
.level-row .field__err { grid-column: 1 / -1; }
.seg--level span { min-height: 40px; background: var(--white); }
@media (prefers-reduced-motion: no-preference) {
  .level-row:not([hidden]) { animation: panel-in .2s ease both; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__send-error { border: 2px solid var(--error); background: #FBEDEC; padding: 14px 16px; color: var(--error); }
.form__error-summary { border: 2px solid var(--error); background: #FBEDEC; padding: 14px 16px; font-weight: 500; color: var(--error); }
.form__submit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 6px; border-top: var(--rule); padding-top: 22px; }
.form__submit .btn { border-color: var(--ink); }
.form__submit .btn:hover { box-shadow: 3px 3px 0 var(--ink); }
.form__note { font-size: 14px; color: var(--grey); max-width: 30ch; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .7; }

.form-done { justify-items: start; gap: 16px; }
.form-done__mark {
  width: 72px; height: 72px; display: grid; place-items: center; border: var(--rule); background: var(--cell);
  font: 800 40px/1 var(--f-display); font-stretch: 112%;
}
.form-done p { font-size: 18px; max-width: 42ch; }
.form-done .btn--ghost { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .form-done:not([hidden]) .form-done__mark { animation: stamp .45s cubic-bezier(.3,1.6,.5,1) both; }
  @keyframes stamp { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq__list { border-top: var(--rule); max-width: 880px; }
.faq__list details { border-bottom: var(--rule); }
.faq__list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font: 700 clamp(18px, 2vw, 22px)/1.3 var(--f-display); font-stretch: 108%; letter-spacing: -0.01em;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border: var(--rule); background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 14px no-repeat, var(--white);
  transition: background-color .15s ease;
}
.faq__list details[open] summary::after {
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2.5px no-repeat, var(--cell);
}
.faq__list summary:hover::after { background-color: var(--cell); }
.faq__list details p { padding: 0 56px 24px 0; max-width: 68ch; color: var(--grey); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--ink); color: var(--paper); padding-top: 56px; }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; }
.footer__brand { display: grid; gap: 16px; }
.brand--footer { color: var(--paper); gap: 14px; }
.brand--footer .brand__tile { width: 60px; height: 60px; }
.brand--footer .brand__word { font-size: 30px; }
.brand--footer .brand__sub { font-size: 13px; }
.brand--footer .brand__name { gap: 4px; }
.footer__brand p { color: #BDB8AD; }
.footer__cols { display: flex; gap: clamp(40px, 7vw, 96px); }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h2 { font: 500 14px/1 var(--f-mono); color: var(--cell); margin-bottom: 6px; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__legal {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 20px; border-top: 2px solid #3A3A3A; font: 400 13px/1.5 var(--f-mono); color: #BDB8AD;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Three price cards side by side need room: below this, intake on top, the two lessons below */
@media (max-width: 1199px) {
  .prices { grid-template-columns: 1fr 1fr; }
  .prices .price:first-child { grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(36px, 8.2vw, 72px); }
  .element { justify-self: start; width: min(100%, 340px); }
  .subjects { grid-template-columns: 1fr; }
  .tutors, .knowhow, .reputation { grid-template-columns: 1fr; }
  .pitfalls { grid-template-columns: 1fr 1fr; }
  .tutors__lead { max-width: 52ch; }
  .subjects__tiles { grid-template-columns: repeat(3, 1fr); }
  .request__inner { grid-template-columns: 1fr; }
  .request__intro { position: static; }
  .facts__list { grid-template-columns: repeat(2, 1fr); }
  .facts__list li:nth-child(2) { border-right: var(--rule); }
  .facts__list li:nth-child(-n+2) { border-bottom: var(--rule); }
}

@media (max-width: 820px) {
  :root { --header-h: 62px; }
  .brand__tile { width: 40px; height: 40px; }
  .brand__word { font-size: 21px; }
  .brand__sub { font-size: 9px; }
  .brand__name { gap: 3px; }
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: var(--rule); padding: 8px var(--gutter) 20px;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); background: none; }
  .nav__cta { margin: 16px 0 0; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: var(--rule); }
  .prices { grid-template-columns: 1fr; }
  .band__note { border-left: 0; padding-left: 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .facts__list { grid-template-columns: 1fr; padding-inline: 0; }
  .facts__list li, .facts__list li:nth-child(n) {
    border: 0; border-bottom: 1px solid var(--line);
    flex-direction: row; align-items: baseline; gap: 14px; padding: 16px var(--gutter);
  }
  .facts__list li:last-child { border-bottom: 0; }
  .element { display: none; }   /* phones: no big logo cell in the hero, the header already shows the brand */
  .facts__list b { min-width: 76px; font-size: 24px; }
  .subjects__tiles { gap: 10px; }
  .tile { height: 116px; padding: 9px 10px; }
  .tile__sym { font-size: 38px; }
  .tile__name { font-size: 13px; }
  .tile__top span + span { display: none; }
  .panel__cols, .form__grid { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr; gap: 12px; }
  .pitfalls { grid-template-columns: 1fr; }
  .cred { min-height: 0; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; row-gap: 4px; align-items: center; }
  .cred__top { grid-column: 1 / -1; }
  .cred__big { font-size: 56px; }
  .cred__big--words { font-size: 22px; grid-column: 1 / -1; }
  .cred__big--words + .cred__text { grid-column: 1 / -1; }
  /* 5 options: 2 + 3 on two rows, with ruled cells */
  .seg--5 { grid-template-columns: repeat(6, 1fr); gap: 2px; background: var(--ink); }
  .seg--5 label { grid-column: span 2; }
  .seg--5 label:nth-child(-n+2) { grid-column: span 3; }
  .seg--5 label + label { border-left: 0; }
  .hero__actions .btn { flex: 1 1 100%; }
  .faq__list details p { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
