/* kemahindonesia.org: the court (lapangan) world. The yayasan's orange is the painted court in front of the
   school; white lines mark it; the centre circle holds 1958; one line divides the court between the two schools.
   Design record: ../../DESIGN.md. No inline style or script anywhere: the CSP forbids both. */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin-standard-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --court: #f08519;        /* the logo's orange, and the painted court */
  --court-ink: #17130d;    /* text on the court: 7.1:1 */
  --court-ink-2: #4a2608;  /* secondary text on the court, tinted from it: 5.2:1 */
  --line: #ffffff;         /* painted court lines */
  --ground: #ffffff;       /* whitewashed sections */
  --ground-2: #f3f4f1;     /* the footer */
  --ink: #17181b;
  --ink-2: #4a4d55;        /* 8:1 on white */
  --rule: #dcdfe3;
  --wall: #1e6b45;         /* the school's green wall: white text 6.5:1 */
  --wall-ink: #ffffff;
  --wall-ink-2: #d3e9db;   /* 4.9:1 on the wall */
  --focus: var(--ink);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 20px;
  --ci: 12px;              /* court boundary inset */
  --cg: 34px;              /* inner margin on the court: content keeps clear of the boundary line */
  --d: 116px;              /* centre circle */
  --top-h: 72px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
  accent-color: var(--court);
}
@media (min-width: 760px) { :root { --gutter: 40px; --ci: 22px; --cg: 64px; --d: clamp(124px, 11vw, 152px); --top-h: 80px; } }
@media (prefers-color-scheme: dark) {
  :root { --ground: #141619; --ground-2: #1b1e22; --ink: #eceef0; --ink-2: #b4b9c1; --rule: #30343a; --focus: var(--ink); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--court) var(--ground-2); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6; font-weight: 400; font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .22em; transition: text-decoration-color 150ms var(--ease); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--court); color: var(--court-ink); }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 12px; z-index: 20; background: #fff; color: #17181b; padding: 10px 14px; }

/* ---------- type ---------- */
h1, h2, .painted, .plate-mark, .nb-big, .disc b, .y {
  font-stretch: 68%; font-weight: 800; letter-spacing: -.008em; line-height: .95;
}
h1, h2 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(42px, 6.6vw, 90px); }
h2 { font-size: clamp(36px, 5vw, 66px); }
h3 { font-size: 21px; font-stretch: 88%; font-weight: 750; line-height: 1.2; margin: 0 0 .55em; }
h4 { font-size: 17px; font-weight: 750; margin: 30px 0 10px; }
p { margin: 0 0 1em; max-width: 66ch; text-wrap: pretty; }
.lead { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.5; font-weight: 450; max-width: 42ch; }
b, strong { font-weight: 700; }
.nowrap { white-space: nowrap; } /* hyphenated words (Al-Qur’an, anak-anak, se-Jawa Barat) never break at the hyphen */

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px;
  border-radius: 6px; font-weight: 650; font-stretch: 94%; line-height: 1.2; text-decoration: none;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.985); transition-duration: 90ms; }
.btn-ink { background: #17181b; color: #fff; }
.btn-ink:hover { background: #000; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 18px; }
.btn-light { background: #fff; color: #17181b; }
.link { font-weight: 650; text-decoration-line: underline; text-decoration-color: currentColor; padding-block: 10px; }

/* ---------- header ---------- */
.top { background: var(--ground); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: var(--top-h); }
.brand { display: inline-flex; flex: none; border-radius: 3px; }
.brand img { width: 66px; height: auto; }
.nav { display: none; gap: 28px; margin-left: auto; font-weight: 600; font-stretch: 94%; }
.nav a {
  text-decoration: none; padding-block: 10px;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 0 2px no-repeat;
  transition: background-size 180ms var(--ease);
}
.nav a:hover { background-size: 100% 2px; }
.top .btn { margin-left: 8px; }
.lang { display: flex; margin-left: auto; font-weight: 650; font-stretch: 94%; }
.lang a { padding: 10px 8px; text-decoration: none; color: var(--ink-2); }
.lang a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; text-decoration-color: var(--court); }
@media (min-width: 760px) { .brand img { width: 77px; } }
@media (min-width: 960px) { .nav { display: flex; } .top .lang { margin-left: 10px; } }

/* ---------- the court ---------- */
.court { position: relative; isolation: isolate; background: var(--court); color: var(--court-ink); --focus: var(--court-ink); }
.court::after { content: ""; position: absolute; inset: var(--ci); border: 4px solid var(--line); pointer-events: none; z-index: -1; }
.court .wrap { width: min(1200px, 100% - 2 * var(--cg)); }
.court ::selection { background: var(--court-ink); color: var(--court); }

.hero {
  position: relative; display: grid; align-items: center;
  min-height: calc(100svh - var(--top-h));
  padding: clamp(52px, 8vh, 92px) 0 calc(var(--d) / 2 + clamp(44px, 6vh, 64px));
}
.hero::after { /* the halfway line */
  content: ""; position: absolute; left: var(--ci); right: var(--ci); bottom: -2px; height: 4px; background: var(--line); z-index: -1;
}
.hero-grid { display: grid; gap: 40px; }
.hero h1 { max-width: 14em; }
.hero .lead { margin: 26px 0 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin-top: 30px; }
.plates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plate { border: 4px solid var(--line); padding: 12px 14px 14px; display: grid; align-content: start; gap: 4px; min-width: 0; }
.plate-mark { font-size: clamp(54px, 15vw, 92px); line-height: .8; color: var(--line); margin-bottom: 8px; }
.plate-name { font-weight: 700; font-stretch: 88%; font-size: 17px; line-height: 1.25; }
.plate-id { font-size: 15px; color: var(--court-ink-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plates-note { margin: 14px 0 0; font-size: 15px; color: var(--court-ink-2); }
.disc {
  position: absolute; left: 50%; bottom: 0; z-index: 2;
  width: var(--d); height: var(--d); margin: 0 0 calc(var(--d) / -2) calc(var(--d) / -2);
  border-radius: 50%; border: 4px solid var(--line); background: var(--court);
  display: grid; place-content: center; text-align: center; max-width: none;
}
.disc span { display: block; font-size: 14px; font-weight: 650; color: var(--court-ink-2); line-height: 1.1; }
.disc b { display: block; font-size: calc(var(--d) * .33); line-height: .9; }
.disc b.word { font-size: calc(var(--d) * .19); line-height: 1.05; letter-spacing: 0; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); align-items: end; }
  .plates { grid-template-columns: 1fr; gap: 16px; }
  .plate { grid-template-columns: auto 1fr; align-items: center; column-gap: 18px; padding: 14px 18px; }
  .plate-mark { grid-row: span 2; margin: 0; font-size: clamp(64px, 6vw, 92px); }
}

/* the foundation: one court, divided by one line (its aims | its non-profit rules) */
.about-court { position: relative; padding: calc(var(--d) / 2 + 56px) 0 clamp(72px, 9vw, 116px); }
.court-head { max-width: 820px; margin: 0 auto 48px; text-align: center; }
.court-head h2 { margin-bottom: 18px; }
.court-head p { margin-inline: auto; max-width: 60ch; }
.halves { display: grid; gap: 40px 0; }
.mid { height: 4px; background: var(--line); }
.half { min-width: 0; }
.painted { font-size: clamp(96px, 26vw, 196px); line-height: .78; color: var(--line); margin: 0 0 20px; max-width: none; }
.painted.word { font-size: clamp(52px, 14vw, 104px); white-space: nowrap; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 30px; margin: 14px 0 24px; }
.facts dt { font-size: 14px; color: var(--court-ink-2); }
.facts dd { margin: 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.ticks, .wins { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .48em; width: 13px; height: 13px; border: 3px solid var(--line); border-radius: 50%; }
.wins li { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: baseline; }
.wins .y { font-size: 24px; }
@media (min-width: 960px) {
  .halves { grid-template-columns: minmax(0, 1fr) 4px minmax(0, 1fr); column-gap: clamp(40px, 5vw, 80px); }
  .mid { height: auto; }
  .painted { font-size: clamp(120px, 13vw, 196px); }
}

/* ---------- history ---------- */
.history { padding: clamp(80px, 10vw, 140px) 0; }
.name-band {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; margin-bottom: 44px; padding: 20px 26px 18px;
  background: var(--court); color: var(--court-ink); box-shadow: inset 0 0 0 5px var(--court), inset 0 0 0 9px var(--line);
}
.nb-big { font-size: clamp(64px, 12vw, 156px); line-height: .8; }
.nb-small { font-size: clamp(18px, 2vw, 24px); font-weight: 500; }
.nb-small b { font-weight: 800; }
.history-grid { display: grid; gap: 40px; margin-top: 40px; }
.history-grid + .history-grid { margin-top: 64px; }
.prose p { font-size: 18px; }
.watak { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.watak li::marker { font-weight: 800; }
.heritage { list-style: none; margin: 0 0 18px; padding: 0; border-top: 2px solid var(--ink); }
.heritage li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.heritage .where { color: var(--ink-2); display: inline-flex; align-items: center; gap: 10px; }
.heritage .now { font-weight: 700; }
.heritage .now .where { color: var(--ink); }
.tag { font-size: 13px; font-weight: 650; background: var(--court); color: var(--court-ink); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.note { color: var(--ink-2); }
.note a { color: var(--ink); font-weight: 650; text-decoration-color: var(--court); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.timeline li { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: baseline; }
.timeline .y { font-size: 34px; }
@media (min-width: 900px) {
  .history-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 72px; }
}

/* ---------- legal registration: the yayasan's own plate, in the logo's outlined-strip grammar ---------- */
.legal { background: var(--ground-2); padding: clamp(72px, 9vw, 120px) 0; }
.legal-card { margin-top: 34px; max-width: 940px; border: 4px solid var(--court); background: var(--ground); }
.legal-card .strip { margin: 0; max-width: none; background: var(--court); color: var(--court-ink); font-weight: 700; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; padding: 10px 20px; }
.legal-card dl { margin: 0; padding: 6px 22px 14px; }
.legal-card dl > div { display: grid; gap: 2px 28px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.legal-card dl > div:last-child { border-bottom: 0; }
.legal-card dt { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.legal-card dd { margin: 0; font-weight: 500; }
.legal-card .num { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 760px) { .legal-card dl > div { grid-template-columns: 210px 1fr; } }

/* ---------- visit: the school's green wall ---------- */
.visit { background: var(--wall); color: var(--wall-ink); padding: clamp(72px, 9vw, 120px) 0; --focus: #ffffff; }
.visit ::selection { background: #fff; color: var(--wall); }
.visit-grid { display: grid; gap: 36px; }
.photo { position: relative; margin: 0; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; box-shadow: 0 2px 3px rgba(0, 0, 0, .14), 0 26px 44px -26px rgba(0, 0, 0, .55); }
.stamp { position: absolute; right: 12px; bottom: 12px; background: rgba(23, 24, 27, .8); color: #fff; font-size: 13px; font-weight: 650; padding: 3px 9px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.visit h2 { margin-bottom: 22px; }
.addr { font-size: clamp(19px, 1.8vw, 23px); font-weight: 500; max-width: 32ch; }
.contact { margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .3); }
.muted { color: var(--wall-ink-2); }
.visit a:not(.btn) { color: #fff; }
@media (min-width: 900px) { .visit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; } }

/* ---------- questions ---------- */
.faq { padding: clamp(72px, 9vw, 120px) 0; }
.qa-grid { display: grid; gap: 34px 64px; margin-top: 40px; }
.qa h3 { font-size: 20px; }
.qa p { color: var(--ink-2); }
.qa a { color: var(--ink); font-weight: 650; text-decoration-color: var(--court); }
@media (min-width: 900px) { .qa-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- footer ---------- */
.foot { background: var(--ground-2); padding: 48px 0 56px; font-size: 15px; }
.foot-in { display: grid; gap: 22px; }
.foot p { margin: 0; }
.foot-logo { width: 110px; height: auto; }
.foot-name { font-weight: 750; font-size: 18px; }
.foot-line, .motto { color: var(--ink-2); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot nav a { padding-block: 10px; font-weight: 600; }
@media (min-width: 900px) { .foot-in { grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; } }

/* ---------- dark: the court stays a floodlit court ---------- */
@media (prefers-color-scheme: dark) {
  .top .btn-ink { background: var(--court); color: var(--court-ink); }
  .top .btn-ink:hover { background: #ff9a33; }
  .brand img, .foot-logo { background: #fff; padding: 4px; border-radius: 3px; }
  .heritage { border-top-color: var(--ink); }
}

/* ---------- motion states (site.js) ---------- */
/* The hero's words and the centre circle wait for site.js only while html.js-anim is on;
   boot.js removes it after 1.6 s if the entrance never starts. */
.js-anim .hero h1, .js-anim .hero [data-rise], .js-anim .hero .disc { opacity: 0; }
.anim-failsafe .hero h1, .anim-failsafe .hero [data-rise], .anim-failsafe .hero .disc { transition: opacity .4s var(--ease); }
.split-line { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover, .btn:active { transform: none; }
}
