:root {
  --paper: #f6f7f6;
  --paper-alt: #eceff0;
  --surface: #ffffff;
  --ink: #1c2b3a;
  --muted: #56636f;
  --chem: #1f3a5f;      /* vanadium blue */
  --chem-dark: #172c49;
  --math: #b8733a;      /* bromine copper */
  --math-text: #94592a; /* copper dark enough for text on white */
  --line: #d9dee2;
  --radius: 6px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--chem); }
:focus-visible { outline: 3px solid var(--math); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: 16px; top: -48px; background: var(--chem); color: #fff; padding: 8px 14px; z-index: 20; }
.skip-link:focus { top: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.narrow > * { max-width: 760px; }

/* Type scale (≈1.25): 17 / 21 / 27 / 42 / 66 */
h1, h2 { font-family: var(--display); font-weight: 600; color: var(--chem); margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.1rem); line-height: 1.02; max-width: 11ch; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.1; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0; line-height: 1.35; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--sans); font-weight: 600; font-size: 1.1rem; text-decoration: none; color: var(--chem); white-space: nowrap; }
.logo { height: 36px; width: auto; flex: none; font-family: var(--sans); }
.tile-v { fill: var(--chem); }
.tile-br { fill: var(--math); }
.tile-num { font-size: 9px; fill: #fff; fill-opacity: .75; }
.tile-sym { font-size: 22px; font-weight: 600; fill: #fff; text-anchor: middle; }
.nav { display: flex; gap: 26px; align-items: center; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--chem); }
.nav .nav-cta { color: #fff; background: var(--chem); padding: 7px 14px; border-radius: var(--radius); font-weight: 500; }
.nav .nav-cta:hover { color: #fff; background: var(--chem-dark); }

/* Buttons */
.btn { display: inline-block; padding: 13px 22px; border-radius: var(--radius); text-decoration: none; font-weight: 500; border: 2px solid transparent; }
.btn-primary { background: var(--chem); color: #fff; }
.btn-primary:hover { background: var(--chem-dark); }
.btn-light { background: #fff; color: var(--chem); }
.btn-light:hover { background: var(--paper-alt); }
.btn-outline { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline:hover { border-color: #fff; }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; }
.hero-text { padding-bottom: 8px; }
.lead { font-size: 1.3rem; line-height: 1.5; color: var(--muted); max-width: 30em; margin: 28px 0 36px; }
.hero-note { margin: 14px 0 0; font-size: .95rem; color: var(--muted); }
.portrait { margin: 0; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--paper-alt); }
.section-lead { color: var(--muted); font-size: 1.15rem; margin: 12px 0 40px; max-width: 36em; }
.section h2 + :not(.section-lead) { margin-top: 36px; }

/* Offer table: rows are levels, columns are subjects, like a block of the periodic table */
.table { display: grid; gap: 6px; }
.t-row { display: grid; grid-template-columns: 1fr 2fr 2fr; gap: 6px; }
.t-corner { display: block; }
.t-subject {
  font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: #fff;
  padding: 18px 22px; border-radius: var(--radius);
}
.t-subject.t-chem { background: var(--chem); }
.t-subject.t-math { background: var(--math); }
.t-level { align-self: center; padding: 22px 16px 22px 0; font-size: 1.15rem; }
.t-cell {
  margin: 0; padding: 22px; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); border-left-width: 4px;
}
.t-cell.t-chem { border-left-color: var(--chem); }
.t-cell.t-math { border-left-color: var(--math); }

/* Timeline: a real sequence, so it gets one */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line); }
.timeline li { position: relative; padding-top: 34px; }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 4px; background: var(--chem); }
.timeline li:last-child::before { background: var(--math); }
.timeline p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }

/* Terms */
.terms { display: grid; grid-template-columns: repeat(4, 1fr); margin: 36px 0 0; border-top: 2px solid var(--chem); }
.terms div { padding: 20px 24px 4px 0; }
.terms dt { color: var(--muted); font-size: .95rem; }
.terms dd { margin: 4px 0 0; font-size: 1.3rem; font-weight: 500; }
.term-price dd { color: var(--math-text); font-weight: 600; }

/* Results */
.results { margin: 0; padding: 0 0 0 1.2em; font-size: 1.15rem; }
.results li { padding: 6px 0; }
.results li::marker { color: var(--math); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 500; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--math); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 10px 0 0; color: var(--muted); max-width: 40em; }

/* Contact */
.contact { background: var(--chem); color: #fff; padding: 88px 0; }
.contact h2 { color: #fff; }
.contact p { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 34em; margin: 14px 0 32px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact :focus-visible { outline-color: #fff; }

.site-footer { padding: 28px 0; color: var(--muted); font-size: .9rem; }

/* Responsive */
@media (max-width: 900px) {
  .nav a:not(.nav-cta) { display: none; }
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { max-width: 340px; order: -1; }
  .section, .contact { padding: 64px 0; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .timeline::before { display: none; }
  .terms { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .brand span { font-size: 1rem; }
  .t-head { display: none; }
  .t-row { grid-template-columns: 1fr; margin-bottom: 18px; }
  .t-level { padding: 0 0 4px; }
  .t-cell::before { content: attr(data-subject); display: block; font-weight: 600; margin-bottom: 2px; }
  .t-cell.t-chem::before { color: var(--chem); }
  .t-cell.t-math::before { color: var(--math-text); }
  .timeline { grid-template-columns: 1fr; row-gap: 28px; }
  .terms { grid-template-columns: 1fr; }
  .btn { width: 100%; text-align: center; }
}
@media (max-width: 340px) {
  .brand span { display: none; }
}
