/* Sekolah Mazmur 21 - redesign v2
   Direction: type-led editorial. No photographic filler; the only real image
   available is the school's own YouTube thumbnail, used once as the hero asset.
   Palette: bone paper + ink + ONE accent (deep green). Locked page-wide.
   Radius system: blocks 20px, buttons pill, inputs 10px. No exceptions. */

:root {
  color-scheme: light dark;

  --ink: #16181d;
  --ink-soft: #5c6169;
  --paper: #f7f7f4;
  --paper-2: #efefe9;
  --paper-3: #e5e5dc;
  --line: #d8d8cf;

  --accent: #1f6f4f;
  --accent-soft: #e3ece7;
  --accent-ink: #ffffff;

  --dark-block: #16181d;

  --r-block: 20px;
  --r-input: 10px;
  --r-pill: 999px;

  --nav-h: 66px;
  --wrap: 1180px;

  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecece6;
    --ink-soft: #9c9f98;
    --paper: #121310;
    --paper-2: #1a1b17;
    --paper-3: #23241f;
    --line: #32342c;

    --accent: #58b78c;
    --accent-soft: #1b2b23;
    --accent-ink: #0d140f;

    --dark-block: #1a1b17;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(56px, 8vw, 110px); }

.lede { color: var(--ink-soft); max-width: 60ch; font-size: 1.0625rem; }
.h-section { font-size: clamp(1.75rem, 1.05rem + 2.8vw, 2.875rem); max-width: 18ch; }
.stack-md > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 22px; }

/* ---------- skip + nav ---------- */

.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--r-pill); z-index: 100; }
.skip:focus { left: 16px; top: 12px; }

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(4px)) { .nav { background: var(--paper); } }

.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 12px; flex: none; letter-spacing: 0;
}
.brand__name { font-size: 1.0625rem; line-height: 1.1; }
.brand__sub { display: block; font-family: var(--font-body); font-size: 10.5px; font-weight: 500; color: var(--ink-soft); letter-spacing: .06em; }

.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: .9375rem; white-space: nowrap; }
.nav__links a { text-decoration: none; color: var(--ink-soft); padding-block: 6px; transition: color .18s ease; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); }

.nav__cta { display: none; }
@media (min-width: 1024px) { .nav__cta { display: inline-flex; } }

.nav__toggle {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: transparent; color: var(--ink); font-size: 20px; cursor: pointer;
}
@media (min-width: 900px) { .nav__toggle { display: none; } }

@media (max-width: 899px) {
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; font-size: 1.0625rem;
  }
  .nav__links[hidden] { display: none; }
  .nav__links li + li { border-top: 1px solid var(--line); }
  .nav__links a { display: block; padding-block: 14px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; padding: 12px 22px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font: 600 .9375rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-soft); }
.btn--onblock { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--onblock:hover { background: var(--paper-2); }

:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* ---------- hero: type-led, asymmetric ---------- */

.hero { padding-top: clamp(28px, 4vw, 64px); padding-bottom: clamp(40px, 6vw, 80px); }

.hero__grid { display: grid; gap: 34px; }
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: end; }
}

.hero__eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 600; color: var(--accent); }

.hero h1 {
  font-size: clamp(2.5rem, 1.1rem + 5.4vw, 4.5rem);
  font-weight: 700;
  margin-block: 16px 20px;
}
.hero h1 em { font-style: italic; line-height: 1.1; display: inline-block; padding-bottom: 4px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* the single real photographic asset on the site */
.hero__media {
  border-radius: var(--r-block);
  overflow: hidden;
  background: var(--paper-3);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.media-note { margin-top: 10px; font-size: .8125rem; color: var(--ink-soft); }

/* ---------- facts: big numerals, no boxes ---------- */

.facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .facts > * + * { border-left: 1px solid var(--line); }
}
@media (max-width: 759px) { .facts > * + * { border-top: 1px solid var(--line); } }

.fact { padding: 26px 22px 26px 0; }
@media (min-width: 760px) { .fact { padding-inline: 22px; } .fact:first-child { padding-left: 0; } }
.fact dt { font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.fact dd {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); letter-spacing: -.03em;
}

/* ---------- jenjang: color blocks, typographic, no photos ---------- */

.levels { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 900px) { .levels { grid-template-columns: repeat(3, 1fr); } }

.level {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 40px;
  min-height: 300px;
  padding: 26px;
  border-radius: var(--r-block);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--paper-2);
  transition: transform .2s ease, border-color .2s ease;
}
.level:hover { transform: translateY(-3px); border-color: var(--ink-soft); }

.level--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.level--dark { background: var(--dark-block); border-color: var(--dark-block); color: #f2f2ec; }

.level__index {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3rem, 2rem + 4vw, 4.5rem);
  letter-spacing: -.05em; line-height: .9;
  color: var(--accent);
}
.level--accent .level__index { color: color-mix(in srgb, var(--accent-ink) 55%, transparent); }
.level--dark .level__index { color: color-mix(in srgb, #f2f2ec 45%, transparent); }

.level h3 { font-size: 1.375rem; }
.level p { font-size: .9375rem; margin-top: 8px; color: var(--ink-soft); }
.level--accent p { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.level--dark p { color: #b9bcb3; }

.level__age { display: block; font-size: 13px; margin-top: 14px; opacity: .85; }

/* ---------- band ---------- */

.band { background: var(--dark-block); color: #f2f2ec; }
.band h2 { color: #f2f2ec; }
.band p { color: #b9bcb3; }
.band__grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .band__grid { grid-template-columns: .85fr 1.15fr; gap: 48px; } }

.video {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--r-block); overflow: hidden; background: #000;
  border: 1px solid rgb(255 255 255 / .12);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- rows ---------- */

.rows { margin-top: 34px; }
.rows__item { display: grid; gap: 4px; padding-block: 16px; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .rows__item { grid-template-columns: 250px 1fr; gap: 24px; align-items: baseline; } }
.rows__item dt { color: var(--ink-soft); font-size: .9375rem; }
.rows__item dd { margin: 0; font-weight: 500; }

/* ---------- statement block ---------- */

.statement {
  border-radius: var(--r-block);
  background: var(--accent-soft);
  padding: clamp(28px, 5vw, 56px);
}
.statement p {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.25rem, .95rem + 1.6vw, 1.875rem);
  letter-spacing: -.02em; line-height: 1.3; max-width: 26ch;
}

/* ---------- forms ---------- */

.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .875rem; font-weight: 600; }
.field .help { font-size: .8125rem; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-input);
  padding: 11px 13px; width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field .error { font-size: .8125rem; color: #a62d16; font-weight: 600; }
@media (prefers-color-scheme: dark) { .field .error { color: #ff9776; } }
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: #a62d16; }

.form__status { border-radius: var(--r-input); padding: 14px 16px; font-size: .9375rem; border: 1px solid var(--line); background: var(--paper-2); }
.form__status[hidden] { display: none; }

.skeleton { background: linear-gradient(90deg, var(--paper-3) 25%, var(--paper-2) 37%, var(--paper-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.empty { border: 1px dashed var(--line); border-radius: var(--r-block); padding: 32px; text-align: center; color: var(--ink-soft); }

/* ---------- map ---------- */

.map { border-radius: var(--r-block); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--paper-3); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- cta ---------- */

.cta {
  background: var(--accent); color: var(--accent-ink);
  border-radius: var(--r-block); padding: clamp(30px, 5vw, 56px);
  display: grid; gap: 24px;
}
@media (min-width: 860px) { .cta { grid-template-columns: 1.3fr auto; align-items: center; } }
.cta h2 { color: var(--accent-ink); font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); }
.cta p { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); margin-top: 10px; max-width: 44ch; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); background: var(--paper-2); padding-block: 48px 30px; font-size: .9375rem; }
.footer__grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }
.footer h4 { font-size: .875rem; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer__base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .8125rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
  @keyframes reveal-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
