/* ============================================================
   style.css — Gaya "Excalidraw / sketsa tangan" SMP Nusantara
   ------------------------------------------------------------
   Palet krayon pastel di atas kertas krem, border bergoyang,
   kartu sticky-note dengan efek selotip, ikon doodle SVG.
   ============================================================ */

/* ---------- Variabel palet & font ---------- */
:root {
  /* Kertas */
  --paper:        #fdf6e3;
  --paper-lines:  #f0e6c9;
  /* Tinta */
  --ink:          #3d3d3d;
  --ink-soft:     #6b6b6b;
  --ink-dark:     #264653;
  /* Krayon aksen */
  --orange:       #f4a261;
  --terracotta:   #e76f51;
  --teal:         #2a9d8f;
  --yellow:       #e9c46a;
  --cream:        #f4d58d;
  --pink:         #f28482;
  --blue:         #80b6d9;
  /* Font */
  --font-head: 'Caveat', 'Comic Sans MS', 'Segoe Print', cursive;
  --font-body: 'Patrick Hand', 'Neucha', 'Comic Sans MS', 'Segoe Print', cursive;
  /* Border khas "bergoyang" ala Excalidraw */
  --rough-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --rough-radius-2: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --border-w: 2.5px;
}

/* ---------- Reset & dasar ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(var(--paper-lines) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.9rem + 0.55vw, 1.15rem);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink-dark);
  line-height: 1.15;
}

h1 { font-size: clamp(2.3rem, 1.6rem + 3.2vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 1.5rem + 1.9vw, 2.7rem); margin-bottom: .6rem; }
h3 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }

p { margin-bottom: .8rem; }

a { color: var(--teal); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline wavy var(--terracotta) 2px; }

img, svg { max-width: 100%; vertical-align: middle; }

/* ---------- Wadah & tata letak ---------- */
.container { width: min(1100px, 92%); margin-inline: auto; }

main { padding: 1.2rem 0 3.5rem; }

section { margin: 2.6rem 0; }

.section-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.section-head .note { font-family: var(--font-head); font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- Garis bawah bergelombang ala spidol ---------- */
.underline-squiggle {
  background-image: linear-gradient(90deg, var(--terracotta) 55%, transparent 55%);
  background-size: 12px 3px;
  background-repeat: repeat-x;
  background-position: 0 100%;
  padding-bottom: 6px;
}
.underline-squiggle.teal { background-image: linear-gradient(90deg, var(--teal) 55%, transparent 55%); }
.underline-squiggle.orange { background-image: linear-gradient(90deg, var(--orange) 55%, transparent 55%); }
.underline-squiggle.blue { background-image: linear-gradient(90deg, var(--blue) 55%, transparent 55%); }
.underline-squiggle.pink { background-image: linear-gradient(90deg, var(--pink) 55%, transparent 55%); }

/* ---------- Kartu dasar & sticky note ---------- */
.card {
  background: #fffdf5;
  border: var(--border-w) solid var(--ink-dark);
  border-radius: var(--rough-radius);
  padding: 1.3rem 1.4rem;
  box-shadow: 4px 5px 0 rgba(61, 61, 61, .14);
}

.sticky {
  position: relative;
  border: var(--border-w) solid var(--ink-dark);
  border-radius: var(--rough-radius-2);
  padding: 1.4rem 1.3rem .9rem;
  background: var(--yellow);
  box-shadow: 4px 5px 0 rgba(61, 61, 61, .13);
}
.sticky.teal   { background: #cfe8e0; }
.sticky.pink   { background: #f8d5d4; }
.sticky.blue   { background: #d8e9f4; }
.sticky.orange { background: #fce3c6; }
.sticky.cream  { background: var(--cream); }

/* Selotip di atas sticky note */
.sticky::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 72px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(244, 162, 97, .55);
  border-left: 1px dashed rgba(38, 70, 83, .35);
  border-right: 1px dashed rgba(38, 70, 83, .35);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  z-index: 1;
}
.sticky.teal::before   { background: rgba(42, 157, 143, .4); }
.sticky.pink::before   { background: rgba(242, 132, 130, .45); }
.sticky.blue::before   { background: rgba(128, 182, 217, .5); }
.sticky.orange::before { background: rgba(233, 196, 106, .7); }

/* ---------- Rotasi halus pada kartu ---------- */
.tilt-1 { transform: rotate(-1deg); }
.tilt-2 { transform: rotate(1.4deg); }
.tilt-3 { transform: rotate(-1.8deg); }
.tilt-4 { transform: rotate(2deg); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: var(--border-w) dashed var(--ink-dark);
  background: rgba(253, 246, 227, .9);
  padding: .7rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.brand-logo { width: 52px; height: 52px; flex: none; }
.brand-name { font-family: var(--font-head); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); color: var(--ink-dark); line-height: 1.05; }
.brand-name small { display: block; font-family: var(--font-body); font-size: .72rem; color: var(--ink-soft); letter-spacing: .4px; }

/* Navigasi desktop */
.nav { display: flex; gap: .35rem; flex-wrap: wrap; }
.nav a {
  padding: .3rem .75rem;
  border: var(--border-w) solid transparent;
  border-radius: 20px 6px 20px 6px / 6px 20px 6px 20px;
  font-size: 1.02rem;
  white-space: nowrap;
}
.nav a:hover, .nav a.active {
  border-color: var(--ink-dark);
  background: var(--yellow);
  text-decoration: none;
  transform: rotate(-1.5deg);
}

/* Tombol hamburger (mobil) */
.nav-toggle {
  display: none;
  background: var(--yellow);
  border: var(--border-w) solid var(--ink-dark);
  border-radius: var(--rough-radius);
  font-family: var(--font-head);
  font-size: 1.4rem;
  padding: .15rem .85rem;
  cursor: pointer;
  color: var(--ink-dark);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: var(--border-w) dashed var(--ink-dark);
  margin-top: 3rem;
  padding: 1.8rem 0 1.2rem;
  background: rgba(240, 230, 201, .45);
}
.footer-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.footer-grid h4 { font-size: 1.45rem; margin-bottom: .4rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .15rem; }
.footer-bottom {
  margin-top: 1.4rem;
  padding-top: .8rem;
  border-top: var(--border-w) dotted var(--ink-soft);
  text-align: center;
  color: var(--ink-soft);
  font-size: .95rem;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 1.4rem;
  align-items: center;
  padding: 1.4rem 0;
}
.hero-text h1 { margin-bottom: .4rem; }
.hero-text .lead { font-family: var(--font-head); font-size: clamp(1.25rem, 1.1rem + .8vw, 1.7rem); color: var(--ink-soft); margin-bottom: 1rem; }
.hero-doodle { justify-self: center; max-width: 340px; }

/* ---------- Tombol (gaya doodle) ---------- */
.btn {
  display: inline-block;
  padding: .55rem 1.3rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-dark);
  background: var(--yellow);
  border: var(--border-w) solid var(--ink-dark);
  border-radius: var(--rough-radius);
  box-shadow: 3px 4px 0 rgba(61, 61, 61, .15);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease;
}
.btn:hover { transform: rotate(-1.5deg) translateY(-2px); text-decoration: none; }
.btn.orange { background: var(--orange); }
.btn.teal { background: #cfe8e0; color: var(--ink-dark); }
.btn.pink { background: var(--pink); }
.btn.big { font-size: 1.5rem; padding: .7rem 1.8rem; }

/* ---------- Kisi-kisi kartu ---------- */
.grid { display: grid; gap: 1.3rem; grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- Kartu berita ---------- */
.news-card { background: #fffdf5; display: flex; flex-direction: column; }
.news-card .kategori {
  display: inline-block;
  align-self: flex-start;
  font-size: .8rem;
  padding: .05rem .6rem;
  background: var(--blue);
  border: 2px solid var(--ink-dark);
  border-radius: 15px 4px 15px 4px / 4px 15px 4px 15px;
  margin-bottom: .6rem;
}
.news-card .tanggal { color: var(--ink-soft); font-size: .88rem; margin-bottom: .5rem; }
.news-card h3 { margin-bottom: .35rem; }
.news-card p { font-size: .97rem; }
.news-card .selengkapnya { margin-top: auto; padding-top: .5rem; font-family: var(--font-head); font-size: 1.1rem; }
.news-card .selengkapnya a { text-decoration: underline wavy var(--terracotta) 2px; }

/* ---------- Kartu agenda ---------- */
.agenda-item { display: flex; gap: 1rem; align-items: flex-start; background: #fffdf5; }
.agenda-date {
  flex: none;
  text-align: center;
  width: 86px;
  padding: .45rem .3rem;
  background: var(--cream);
  border: var(--border-w) solid var(--ink-dark);
  border-radius: var(--rough-radius);
  font-family: var(--font-head);
  font-size: .98rem;
  line-height: 1.25;
  box-shadow: 3px 3px 0 rgba(61,61,61,.12);
}
.agenda-date b { display: block; font-size: 1.25rem; color: var(--terracotta); }
.agenda-body h3 { font-size: 1.35rem; margin-bottom: .1rem; }
.agenda-body .meta { color: var(--ink-soft); font-size: .9rem; }
.agenda-lalu { opacity: .72; }
.agenda-lalu .agenda-date { background: var(--paper-lines); }

/* ---------- Kartu guru ---------- */
.teacher-card { text-align: center; background: #fffdf5; display: flex; flex-direction: column; align-items: center; }
.avatar { width: 92px; height: 92px; margin-bottom: .7rem; }
.teacher-card h3 { font-size: 1.35rem; margin-bottom: .1rem; }
.teacher-card .mapel { color: var(--teal); font-weight: 700; font-size: .98rem; }
.teacher-card .peran { color: var(--ink-soft); font-size: .88rem; margin-bottom: .3rem; }

/* ---------- Galeri ---------- */
.gallery-card { background: #fffdf5; text-align: center; }
.gallery-frame { border: var(--border-w) solid var(--ink-dark); border-radius: var(--rough-radius-2); padding: .9rem; background: #fff; transform: rotate(-1deg); margin-bottom: .2rem; }
.gallery-frame svg { display: block; width: 100%; height: auto; }
.gallery-card figcaption { font-family: var(--font-head); font-size: 1.15rem; }
.gallery-card .ket { color: var(--ink-soft); font-size: .85rem; }

/* ---------- Visi / Misi / Sambutan ---------- */
.visi-misi { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.misi-list { list-style: none; }
.misi-list li { padding-left: 1.7rem; position: relative; margin-bottom: .55rem; }
.misi-list li::before { content: "✦"; position: absolute; left: 0; color: var(--terracotta); }

.quote-card { position: relative; padding-left: 1.6rem; }
.quote-card::before {
  content: "\201C";
  position: absolute;
  left: .4rem;
  top: -.6rem;
  font-family: var(--font-head);
  font-size: 4rem;
  color: var(--orange);
}
.quote-card .penulis { font-family: var(--font-head); font-size: 1.25rem; color: var(--ink-dark); margin-top: .5rem; }

/* ---------- Garis waktu sejarah ---------- */
.timeline { position: relative; margin-top: 1rem; padding-left: 1.2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: .4rem;
  bottom: .4rem;
  border-left: var(--border-w) dashed var(--teal);
}
.tl-item { position: relative; margin-bottom: 1.2rem; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -1.32rem;
  top: .55rem;
  width: 14px;
  height: 14px;
  background: var(--orange);
  border: 2px solid var(--ink-dark);
  border-radius: 50%;
  box-shadow: 1px 1px 0 rgba(61,61,61,.2);
}
.tl-year { font-family: var(--font-head); font-size: 1.45rem; font-weight: 700; color: var(--terracotta); margin-right: .5rem; }

/* ---------- Identitas (daftar berlabel) ---------- */
.id-list { list-style: none; }
.id-list li { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .5rem 0; border-bottom: 2px dotted var(--paper-lines); }
.id-list .label { font-weight: 700; color: var(--ink-dark); min-width: 150px; }
.id-list .nilai { color: var(--ink); }

/* ---------- Kontak ---------- */
.contact-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.contact-list { list-style: none; }
.contact-list li { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .5rem; }
.contact-list .lbl { font-family: var(--font-head); font-size: 1.1rem; color: var(--ink-dark); min-width: 92px; }
.map-doodle { border: var(--border-w) solid var(--ink-dark); border-radius: var(--rough-radius); background: #f3ead1; padding: 1rem; text-align: center; }
.map-doodle .pin { display: inline-block; margin: .3rem auto; }

/* Formulir */
.form-card { max-width: 560px; }
.form-row { margin-bottom: .95rem; }
.form-row label { display: block; font-family: var(--font-head); font-size: 1.1rem; margin-bottom: .15rem; }
.form-row input, .form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .5rem .7rem;
  background: #fffdf5;
  border: var(--border-w) solid var(--ink-dark);
  border-radius: 10px 22px 10px 22px / 22px 10px 22px 10px;
  color: var(--ink);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-note { color: var(--ink-soft); font-size: .88rem; margin-top: .8rem; }

/* ---------- PPDB ---------- */
.steps { display: grid; gap: 1.4rem; grid-template-columns: 1fr; counter-reset: step; }
.step-card { position: relative; background: #fffdf5; padding: 1.2rem 1.2rem 1.2rem 4.6rem; }
.step-num {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: var(--border-w) solid var(--ink-dark);
  background: var(--orange);
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 3px 0 rgba(61,61,61,.15);
}
.step-card h3 { font-size: 1.4rem; }

.checklist { list-style: none; }
.checklist li { position: relative; padding-left: 2.1rem; margin-bottom: .55rem; }
.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: .05rem;
  width: 1.45rem;
  height: 1.45rem;
  border: var(--border-w) solid var(--ink-dark);
  border-radius: 50% 20% 50% 20% / 20% 50% 20% 50%;
  background: var(--cream);
  font-size: .95rem;
  text-align: center;
  line-height: 1.3;
  color: var(--terracotta);
}

/* Tabel jadwal PPDB (gaya kartu) */
.jadwal-table { width: 100%; border-collapse: collapse; }
.jadwal-table th, .jadwal-table td {
  padding: .55rem .7rem;
  border: 2px solid var(--ink-dark);
  text-align: left;
  background: #fffdf5;
}
.jadwal-table th { font-family: var(--font-head); font-size: 1.15rem; background: var(--yellow); }
.jadwal-table tr:nth-child(even) td { background: #fdf7e0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 3rem 0; }
.notfound .big { font-family: var(--font-head); font-size: clamp(4rem, 3rem + 6vw, 7rem); color: var(--terracotta); line-height: 1; }
.notfound svg { max-width: 240px; margin: 1rem auto; }

/* ---------- Responsif: tablet ke atas ---------- */
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { grid-template-columns: 1.15fr .85fr; }
  .visi-misi { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Responsif: layar kecil (mobil) ---------- */
@media (max-width: 767px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: .6rem;
    padding-top: .6rem;
    border-top: var(--border-w) dashed var(--ink-dark);
  }
  .nav.open { display: flex; }
  .nav a { padding: .45rem .6rem; }
  body.nav-open { overflow: hidden; }
}
