/* MathShield Academy: graph paper, steel blue + safety orange, mono accents */
:root {
  --ink: #0f2236;
  --steel: #2c5a85;
  --steel-d: #163552;
  --steel-l: #e4edf6;
  --orange: #ff6a13;
  --orange-d: #d9530a;
  --paper: #f7f9fc;
  --grid: rgba(44, 90, 133, 0.09);
  --grid-b: rgba(44, 90, 133, 0.16);
  --muted: #536579;
  --line: #d3dde8;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --head: "Sora", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--body);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--steel); }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* graph paper */
.graph {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-b) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-b) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px;
}

/* header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 249, 252, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand svg { width: 34px; height: 38px; flex: none; }
.brand b { display: block; font-family: var(--head); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand small { display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { font-family: var(--mono); font-size: 0.82rem; text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 4px; white-space: nowrap; }
.nav a:hover { background: var(--steel-l); }
.nav a.cta, .nav a.cur { background: var(--ink); color: #fff; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.98rem/1 var(--body);
  padding: 14px 20px; border-radius: 6px; text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn svg { width: 20px; height: 20px; }
.btn-orange { background: var(--orange); color: #fff; border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-orange:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn-orange:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--steel-l); }
.btn-sm { padding: 10px 14px; font-size: 0.9rem; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* hero */
.hero { padding: 40px 0 48px; border-bottom: 2px solid var(--ink); }
.hero .wrap { display: grid; gap: 34px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } .hero { padding: 72px 0; } }
.code { font-family: var(--mono); font-size: 0.82rem; color: var(--steel); display: inline-block; margin-bottom: 14px; }
.code b { color: var(--orange-d); font-weight: 600; }
.hero h1 .hl { color: var(--steel); position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.04em; height: 0.16em; background: var(--orange); z-index: -1; }
.hero h1 { position: relative; z-index: 0; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 60ch; }
.rating {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  font-family: var(--mono); font-size: 0.85rem;
  background: #fff; border: 1.5px dashed var(--steel); padding: 8px 12px; border-radius: 4px; color: var(--ink); text-decoration: none;
}
.rating .stars { color: var(--orange); letter-spacing: 1px; }
.hero-fig { position: relative; margin: 0; }
.hero-fig img { border: 2px solid var(--ink); border-radius: 6px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.hero-fig::before, .hero-fig::after {
  content: ""; position: absolute; width: 34px; height: 34px; border: 4px solid var(--orange);
}
.hero-fig::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
.hero-fig::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; }
.hero-fig figcaption {
  position: absolute; left: 14px; bottom: 14px; background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: 0.78rem; padding: 6px 10px; border-radius: 4px;
}

/* strip */
.strip { background: var(--ink); color: #dbe6f2; }
.strip .wrap { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .strip .wrap { grid-template-columns: repeat(4, 1fr); } }
.strip div { padding: 18px 10px; font-size: 0.86rem; border-right: 1px solid rgba(255,255,255,0.12); border-bottom: 1px solid rgba(255,255,255,0.12); }
.strip b { display: block; font-family: var(--mono); color: var(--orange); font-size: 1.05rem; }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: #fff; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.eyebrow { display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--orange-d); margin-bottom: 8px; letter-spacing: 0.02em; }
.grid { display: grid; gap: 18px; margin-top: 26px; }
@media (min-width: 680px) { .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }

.card { background: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; }
.prog .tag { font-family: var(--mono); font-size: 0.74rem; color: var(--steel); background: var(--steel-l); padding: 3px 8px; border-radius: 3px; align-self: flex-start; margin-bottom: 10px; }
.prog.hot .tag { background: var(--orange); color: #fff; }
.prog ul { margin: 0 0 18px; padding: 0; list-style: none; flex: 1; }
.prog li { padding: 6px 0 6px 22px; position: relative; font-size: 0.95rem; border-bottom: 1px dashed var(--line); }
.prog li::before { content: "+"; position: absolute; left: 2px; top: 5px; font-family: var(--mono); color: var(--orange-d); font-weight: 600; }

/* method */
.method { display: grid; gap: 0; margin-top: 26px; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: #fff; }
@media (min-width: 800px) { .method { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 22px 20px; border-bottom: 2px solid var(--ink); }
@media (min-width: 800px) { .step { border-bottom: 0; border-right: 2px solid var(--ink); } .step:last-child { border-right: 0; } }
.step:last-child { border-bottom: 0; }
.step .n { font-family: var(--mono); font-size: 0.85rem; color: var(--orange-d); display: block; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.94rem; margin: 0; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 26px; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 2px solid var(--ink); border-radius: 6px; }
.gallery .wide { grid-column: span 2; }
@media (min-width: 800px) { .gallery { grid-template-columns: repeat(3, 1fr); } .gallery .wide { grid-column: span 2; grid-row: span 2; } }

/* visit */
.visit { display: grid; gap: 28px; }
@media (min-width: 900px) { .visit { grid-template-columns: 1fr 1fr; align-items: start; } }
address { font-style: normal; margin: 8px 0 18px; }
.hours { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hours td { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.hours td:last-child { text-align: right; font-family: var(--mono); font-size: 0.86rem; }
.note { font-size: 0.86rem; color: var(--muted); }
.map { width: 100%; height: 340px; border: 2px solid var(--ink); border-radius: 6px; }

/* CTA */
.admit { background: var(--steel-d); color: #fff; border-radius: 8px; padding: 32px 22px; position: relative; overflow: hidden; border: 2px solid var(--ink); }
.admit::before {
  content: ""; position: absolute; inset: 0; opacity: 0.35; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 22px 22px;
}
.admit > * { position: relative; }
.admit .eyebrow { color: #ffb489; }
.admit p { color: #c9d8e8; max-width: 56ch; }
.admit pre { font-family: var(--mono); font-size: 0.86rem; background: rgba(0,0,0,0.28); border: 1px dashed rgba(255,255,255,0.3); padding: 14px; border-radius: 4px; white-space: pre-wrap; color: #fff; margin: 0 0 22px; }

/* footer */
.site-foot { background: var(--ink); color: #b8c7d8; padding: 40px 0 90px; font-size: 0.92rem; }
.site-foot .wrap { display: grid; gap: 22px; }
@media (min-width: 760px) { .site-foot .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-foot h3 { color: #fff; font-size: 1rem; }
.site-foot a { color: #fff; }
.site-foot .copy { font-family: var(--mono); font-size: 0.78rem; color: #7f93a9; grid-column: 1 / -1; margin: 0; }

/* fees page */
.page-hero { padding: 48px 0 40px; border-bottom: 2px solid var(--ink); }
.page-hero p { color: var(--muted); max-width: 60ch; }
.fee-table { width: 100%; border-collapse: collapse; background: #fff; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; margin-top: 22px; }
.fee-table th { background: var(--ink); color: #fff; text-align: left; font-family: var(--mono); font-weight: 500; font-size: 0.8rem; padding: 12px 14px; }
.fee-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fee-table tr:last-child td { border-bottom: 0; }
.fee-table small { display: block; color: var(--muted); font-size: 0.82rem; }
.fee-table .amt { text-align: right; font-family: var(--mono); font-weight: 600; white-space: nowrap; color: var(--steel-d); }
.fee-table th:last-child { text-align: right; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 22px 0 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; font: 500 0.84rem var(--mono); padding: 9px 14px; border-radius: 4px; border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--orange); color: #fff; }
.tt { display: grid; gap: 12px; margin-top: 10px; }
@media (min-width: 760px) { .tt { grid-template-columns: repeat(2, 1fr); } }
.slot { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; background: #fff; border: 2px solid var(--ink); border-left: 8px solid var(--steel); border-radius: 6px; padding: 14px 16px; }
.slot[hidden] { display: none; }
.slot .t { grid-column: 1; font-family: var(--mono); font-weight: 600; color: var(--steel-d); font-size: 0.92rem; }
.slot .d { grid-column: 1; font-size: 0.93rem; }
.slot .btn { grid-column: 2; grid-row: 1 / span 2; }
.pill { font-family: var(--mono); font-size: 0.7rem; padding: 2px 7px; border-radius: 3px; background: var(--steel-l); color: var(--steel-d); vertical-align: 1px; }
.pill.o { background: #ffe4d4; color: var(--orange-d); }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
