/* MARGIN TUITION
   Exercise book paper, navy ink and red pen. A tutor with a marked mock
   paper, a grade planner that draws the path to the target with mocks
   along the way, how it works, prices, reviews, FAQ, free assessment. */

:root {
  --background: #FBFAF6;
  --card: #FFFFFF;
  --foreground: #1D2A44;
  --primary-cta: #B23A2E;
  --primary-cta-text: #FFFFFF;
  --secondary-cta: transparent;
  --secondary-cta-text: #1D2A44;
  --accent: #B23A2E;
  --background-accent: #EEF3F9;
  --radius: 0.5rem;
  --content-width: 86vw;
  --section-head-size: var(--text-6xl);
  --nav-ink: var(--foreground);
  --font-body: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-hand: 'Kalam', 'Albert Sans', cursive;

  --tint: #EEF3F9;
  --line: #DCE3EC;
  --muted: #505A6B;
  --rule: #DCE7F2;
  --margin: #EBAAA3;
  --btn-radius: 8px;
  --btn-icon-radius: 5px;
  --card-radius: 12px;
  --nav-radius: 10px;
  --btn-icon-bg: rgba(255, 255, 255, 0.16);
  --nav-bg: rgba(251, 250, 246, 0.95);
  --lead-bg: #1D2A44;
  --footer-bg: #1D2A44;
  --footer-head: #F2B8B1;
  --star: #B23A2E;
}

@media (width >= 1600px) {
  :root { --content-width: clamp(40rem, 86vw, 94rem); }
}


/* --- Shared base for this batch: resets and the standard blocks ----------- */

.ambient { display: none; }
body { background: var(--background); }
figure, dd, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--font-heading); }

.section-head h2,
.grad-head { background: none; color: var(--foreground); }
.section-head h2 { max-width: 17ch; line-height: 1.02; }
.section-head > p { max-width: 54ch; color: var(--muted); }
.section--flush { padding-top: 1rem; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Buttons */
.btn { height: 3.1rem; padding-inline: 1.4rem 0.5rem; border-radius: var(--btn-radius, 8px); font-size: var(--text-base); font-weight: 600; }
.btn:not(.btn--arrow) { padding-inline: 1.4rem; }
.btn--arrow .btn__icon { width: 2.05rem; height: 2.05rem; border-radius: var(--btn-icon-radius, 6px); background: var(--btn-icon-bg, rgba(0, 0, 0, 0.18)); color: var(--btn-icon-ink, currentColor); }
.btn--arrow .btn__icon svg { width: 1rem; height: 1rem; }
.primary-button, .secondary-button { box-shadow: none; }
.secondary-button { border: 1px solid var(--foreground); }
.secondary-button.btn--arrow .btn__icon { background: var(--foreground); color: var(--background); }

/* Nav */
.navbar--bar .navbar__bar {
  background: var(--nav-bg, rgba(255, 255, 255, 0.92));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--nav-line, var(--line));
  border-radius: var(--nav-radius, 10px);
}
.navbar__brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.01em; }
.navbar__toggle { border: 1px solid var(--nav-line, var(--line)); background: transparent; }
.navbar--bar .navbar__actions .btn { height: 2.65rem; }

/* Menu open: the panel behind the bar is dark, so the bar goes clear and the
   brand and close button, which the core turns white, stay readable. */
.nav-open .navbar--bar .navbar__bar { background: transparent; border-color: rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Long menu words ("Conservatories") in a wide face overran a phone screen. */
@media (width <= 640px) {
  .navbar__panel a { font-size: clamp(1.9rem, 9vw, 3.25rem); }
}

/* Stars */
.stars { display: flex; gap: 0.2rem; color: var(--star, #C98A0B); }
.stars svg { width: 1rem; height: 1rem; fill: currentColor; }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.reviews--lead { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
.review { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--card-radius, 10px); background: var(--card); }
.review blockquote { font-size: var(--text-lg); line-height: 1.55; }
.review__tag { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.review__who { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; font-size: var(--text-sm); color: var(--muted); }
.review__who strong { display: block; font-size: var(--text-base); color: var(--foreground); }
.review__who img { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; flex: none; }
.review--lead { background: var(--lead-bg, var(--foreground)); border-color: var(--lead-bg, var(--foreground)); color: var(--lead-ink, #fff); }
.review--lead blockquote { font-family: var(--font-heading); font-size: var(--text-3xl); line-height: 1.22; }
.review--lead .review__who, .review--lead .review__tag { color: var(--lead-muted, rgba(255, 255, 255, 0.78)); }
.review--lead .review__who strong { color: var(--lead-ink, #fff); }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.faq__intro { position: sticky; top: 7rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.faq__intro h2, .faq__body h2 { font-size: var(--section-head-size); line-height: 1.02; max-width: 13ch; }
.faq__intro > p:not(.kicker) { max-width: 40ch; font-size: var(--text-lg); line-height: 1.55; color: var(--muted); }
.faq__body { display: flex; flex-direction: column; gap: 1.2rem; }
.faq__media img { width: 100%; height: 36rem; object-fit: cover; border-radius: var(--card-radius, 10px); }
.accordion__item { border: 1px solid var(--line); border-radius: var(--card-radius, 10px); background: var(--card); }
.accordion__trigger h3 { font-size: var(--text-xl); }
.accordion .badge-num { width: 2.1rem; height: 2.1rem; flex: none; border-radius: var(--btn-icon-radius, 6px); }
.accordion .badge-num svg { width: 1rem; height: 1rem; transition: transform 0.3s; }
.accordion__item[data-open='true'] .badge-num svg { transform: rotate(45deg); }
.accordion__panel p { color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.contact__panel { display: flex; flex-direction: column; gap: 0.9rem; padding: 2.5rem; border: 1px solid var(--line); border-radius: var(--card-radius, 10px); background: var(--card); }
.contact__panel h2 { font-size: var(--text-6xl); line-height: 1.02; max-width: 13ch; }
.contact__panel > p:not(.kicker) { font-size: var(--text-lg); line-height: 1.5; color: var(--muted); margin-bottom: 0.5rem; }
.contact__panel .form button { height: 3.25rem; border-radius: var(--btn-radius, 8px); font-weight: 600; }
.form input, .form select, .form textarea { border-radius: var(--btn-radius, 8px); background: var(--field, #FCFBF8); }
.contact__media { position: relative; overflow: hidden; border-radius: var(--card-radius, 10px); }
.contact__media img { width: 100%; height: 100%; min-height: 26rem; object-fit: cover; }
.contact__media figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  border-radius: var(--btn-radius, 8px);
  background: var(--card);
  color: var(--foreground);
  font-size: var(--text-sm);
  font-weight: 500;
}
.contact__media figcaption a { display: inline-flex; align-items: center; flex: none; height: 2.6rem; padding-inline: 1rem; border-radius: var(--btn-icon-radius, 6px); background: var(--primary-cta); color: var(--primary-cta-text); font-weight: 600; }

/* Footer */
.site-footer { padding-block: 4.5rem 3rem; border-radius: 0; background: var(--footer-bg, var(--foreground)); color: var(--footer-ink, #fff); }
.footer-top { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: start; }
.footer-brand { font-family: var(--font-heading); font-size: var(--text-5xl); font-weight: 700; line-height: 1.05; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(9rem, auto)); gap: 2.5rem; }
.footer-nav h3 { margin-bottom: 1rem; font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--footer-head, rgba(255, 255, 255, 0.75)); }
.footer-nav ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-nav a { font-size: var(--text-lg); color: var(--footer-link, rgba(255, 255, 255, 0.88)); transition: color 0.2s; }
.footer-nav a:hover { color: var(--footer-ink, #fff); }
.footer-legal-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--footer-line, rgba(255, 255, 255, 0.15)); font-size: var(--text-base); color: var(--footer-muted, rgba(255, 255, 255, 0.72)); }
.footer-legal-bar div { display: flex; gap: 1.25rem; }

@media (width <= 1100px) {
  .reviews--lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews--lead .review--lead { grid-column: 1 / -1; }
}

@media (width <= 960px) {
  .faq, .contact { grid-template-columns: minmax(0, 1fr); }
  .faq__intro { position: static; }
  .reviews { grid-template-columns: minmax(0, 1fr); }
  .faq__media img { height: 22rem; }
}

@media (width <= 768px) {
  .faq__intro h2, .faq__body h2 { font-size: var(--text-6xl); }
  .contact__panel { padding: 1.5rem; }
  .contact__panel h2 { font-size: var(--text-6xl); }
  .contact__media img { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .contact__media figcaption { position: static; border-radius: 0; flex-wrap: wrap; }
  .review--lead blockquote { font-size: var(--text-2xl); }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
  .footer-brand { font-size: var(--text-4xl); }
}


.hero__title, .section-head h2, .faq__intro h2, .faq__body h2, .contact__panel h2, .footer-brand { font-weight: 600; letter-spacing: -0.02em; }
.navbar__brand { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; }
.navbar__brand::before { content: ''; width: 3px; height: 1.5rem; flex: none; border-radius: 2px; background: var(--primary-cta); box-shadow: 5px 0 0 var(--margin); }
.review--lead .stars { color: #F2B8B1; }
.form textarea { border-radius: 10px; }

/* --- Hero: an exercise book page, and a marked mock paper -------------------------- */

.hero { position: relative; padding-top: 8.25rem; padding-bottom: 4.5rem; background-image: linear-gradient(90deg, transparent calc(3vw - 1px), var(--margin) calc(3vw - 1px), var(--margin) 3vw, transparent 3vw), repeating-linear-gradient(180deg, transparent 0 35px, var(--rule) 35px 36px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.35rem; }
.hero__title { max-width: 11ch; font-size: clamp(3.1rem, 5.8vw, 6.4rem); line-height: 1; }
.hero__lede { max-width: 44ch; font-size: var(--text-xl); line-height: 1.55; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 34rem; margin-top: 0.4rem; padding-top: 0.2rem; border-top: 1px solid var(--line); background: var(--background); }
.hero__facts li { padding: 0.9rem 0.8rem 0.2rem 0; font-size: var(--text-sm); color: var(--muted); }
.hero__facts b { display: block; font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 600; color: var(--foreground); }
.hero .kicker, .hero__lede { background: var(--background); box-shadow: 0 0 0 0.4rem var(--background); }
.hero__visual { position: relative; padding: 0 3rem 3rem 0; }
.hero__photo { display: block; width: 100%; height: min(72svh, 40rem); min-height: 27rem; object-fit: cover; object-position: 38% 50%; border-radius: var(--card-radius); }
.paper { position: absolute; right: 0; bottom: 0; width: 19.5rem; padding: 1.1rem 1.2rem 1rem 2rem; border-radius: 4px; background-color: #FFFFFF; background-image: linear-gradient(90deg, transparent 1.25rem, var(--margin) 1.25rem, var(--margin) calc(1.25rem + 1.5px), transparent calc(1.25rem + 1.5px)); box-shadow: 0 30px 60px -30px rgba(29, 42, 68, 0.5); transform: rotate(1.5deg); }
.paper__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: start; }
.paper__head { display: grid; gap: 0.05rem; }
.paper__mark { display: grid; justify-items: center; gap: 0.3rem; }
.paper__head span { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.paper__head b { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 600; }
.paper__head em { font-size: var(--text-xs); font-style: normal; color: var(--muted); }
.paper__score { display: grid; place-content: center; width: 4.9rem; height: 4.6rem; border: 3px solid var(--primary-cta); border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%; color: var(--primary-cta); transform: rotate(-8deg); text-align: center; line-height: 1; }
.paper__score b { font-family: var(--font-hand); font-size: 1.9rem; font-weight: 700; line-height: 0.9; }
.paper__score span { font-size: 0.6rem; font-weight: 600; }
.paper__grade { font-family: var(--font-hand); font-size: 1.15rem; font-weight: 700; line-height: 1; color: var(--primary-cta); transform: rotate(-6deg); }
.paper__qs { display: grid; margin-top: 0.7rem; }
.paper__qs li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.38rem 0; border-top: 1px solid var(--rule); font-size: var(--text-sm); counter-increment: q; }
.paper__qs li span::before { content: counter(q) '. '; font-weight: 600; color: var(--muted); }
.paper__qs b { font-family: var(--font-hand); font-size: 1.05rem; font-weight: 700; color: var(--primary-cta); }
.paper__qs .miss b { padding: 0 0.3rem; border: 2px solid var(--primary-cta); border-radius: 50%; }
.paper__note { margin-top: 0.6rem; font-family: var(--font-hand); font-size: 1.2rem; font-weight: 700; line-height: 1.15; color: var(--primary-cta); transform: rotate(-2deg); }

/* --- Grade planner --------------------------------------------------------------------- */

.section--tint { background: var(--tint); }
.gp { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 1rem; align-items: start; }
.gp__in, .gp__out { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.5rem; border-radius: var(--card-radius); background: var(--card); }
.lab { margin-top: 0.3rem; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.seg { display: flex; gap: 0.2rem; padding: 0.25rem; border-radius: 8px; background: var(--background); }
.seg button { flex: 1; min-height: 2.75rem; padding: 0 0.45rem; border: 0; border-radius: 6px; background: transparent; color: var(--foreground); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--foreground); color: #FFFFFF; }
.sl { display: grid; gap: 0.1rem; font-weight: 600; }
.sl > span { display: flex; justify-content: space-between; align-items: baseline; }
.sl output { font-family: var(--font-hand); font-size: var(--text-3xl); font-weight: 400; color: var(--primary-cta); }
.sl input { width: 100%; height: 2.6rem; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.sl input::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: #D6E2EE; }
.sl input::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; border: 4px solid #FFFFFF; border-radius: 50%; background: var(--primary-cta); box-shadow: 0 0 0 1px rgba(29, 42, 68, 0.3); -webkit-appearance: none; }
.sl input::-moz-range-track { height: 6px; border-radius: 6px; background: #D6E2EE; }
.sl input::-moz-range-thumb { width: 18px; height: 18px; border: 4px solid #FFFFFF; border-radius: 50%; background: var(--primary-cta); }
.sl input:focus-visible { outline: 3px solid var(--foreground); outline-offset: 3px; border-radius: 6px; }
.gp__svg { display: block; width: 100%; height: auto; }
.gp__svg text { font-family: var(--font-body); font-weight: 600; fill: #505A6B; }
.gp__svg .gp-g { font-family: var(--font-hand); font-weight: 400; fill: #B23A2E; }
.gp__read { display: grid; gap: 0.35rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.gp__rec { font-family: var(--font-heading); font-size: var(--text-3xl); font-weight: 600; }
.gp__why { line-height: 1.55; color: var(--muted); }
.gp__cost { margin-top: 0.3rem; color: var(--muted); }
.gp__cost b { font-family: var(--font-heading); font-size: var(--text-4xl); font-weight: 600; color: var(--foreground); }
.gp__fine { font-size: var(--text-xs); color: var(--muted); }
.gp__out .btn { align-self: flex-start; margin-top: 0.4rem; }

/* --- How it works ------------------------------------------------------------------------ */

.how { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.how__pic img { width: 100%; height: 34rem; object-fit: cover; object-position: 50% 50%; border-radius: var(--card-radius); }
.how__body { display: flex; flex-direction: column; gap: 1.6rem; }
.how__steps { display: grid; }
.how__steps li { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.how__steps li:last-child { border-bottom: 1px solid var(--line); }
.how__steps b { font-family: var(--font-hand); font-size: var(--text-4xl); font-weight: 400; line-height: 1; color: var(--primary-cta); }
.how__steps h3 { font-family: var(--font-body); font-size: var(--text-xl); font-weight: 600; }
.how__steps p { margin-top: 0.25rem; line-height: 1.55; color: var(--muted); }

/* --- Prices ---------------------------------------------------------------------------- */

.price { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 56rem; }
.price__card { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.7rem; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--card); }
.price__card--one { border-color: var(--foreground); box-shadow: inset 0 0 0 1px var(--foreground); }
.price__card h3 { font-family: var(--font-heading); font-size: var(--text-3xl); font-weight: 600; }
.price__big { color: var(--muted); }
.price__big b { font-family: var(--font-heading); font-size: var(--text-5xl); font-weight: 600; line-height: 1; color: var(--foreground); }
.price__what { font-weight: 600; }
.price__card ul { display: grid; gap: 0.45rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.price__card li { position: relative; padding-left: 1.5rem; line-height: 1.5; color: var(--muted); }
.price__card li::before { content: ''; position: absolute; left: 0.1rem; top: 0.4em; width: 0.8rem; height: 0.45rem; border-left: 2px solid var(--primary-cta); border-bottom: 2px solid var(--primary-cta); transform: rotate(-45deg); }

/* --- Standard blocks -------------------------------------------------------------------- */

.accordion .badge-num { background: var(--primary-cta); color: #FFFFFF; }

/* --- Laptop and below -------------------------------------------------------------------- */

@media (width <= 1100px) {
  .gp { grid-template-columns: minmax(0, 1fr); }
}

@media (width <= 960px) {
  .hero__grid, .how { grid-template-columns: minmax(0, 1fr); }
  .how__pic img { height: 22rem; }
}

@media (width <= 768px) {
  .hero { padding-top: 6.75rem; padding-bottom: 3rem; background-image: repeating-linear-gradient(180deg, transparent 0 35px, var(--rule) 35px 36px); }
  .hero__title { font-size: clamp(2.8rem, 12.5vw, 4rem); }
  .hero__lede { font-size: var(--text-lg); }
  .hero__facts b { font-size: var(--text-xl); }
  .hero__visual { padding: 0; }
  .hero__photo { height: 21rem; min-height: 0; }
  .paper { position: relative; width: auto; margin: -3rem 0.8rem 0; transform: none; }
  .gp__in, .gp__out { padding: 1.15rem; }
  .price { grid-template-columns: minmax(0, 1fr); }
  .price__card { padding: 1.3rem; }
}
