/* ============================================
   SD Muhammadiyah 1 Kota Malang — Buku Tamu
   ============================================ */

:root {
  --biru-tua: #0f2a5c;
  --biru: #1d4ed8;
  --biru-terang: #2f6fed;
  --biru-langit: #eaf3fd;
  --oranye: #f5a623;
  --oranye-tua: #e08e0b;
  --putih: #ffffff;
  --abu-teks: #5b6b85;
  --abu-garis: #dfe6f2;
  --abu-input-bg: #f4f7fc;
  --radius: 16px;
  --shadow-kartu: 0 20px 45px -20px rgba(15, 42, 92, 0.35);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  color: var(--biru-tua);
  background: var(--putih);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ---------- Navbar ---------- */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--abu-garis);
  position: relative;
  z-index: 20;
  background: var(--putih);
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar__logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.navbar__brand-text {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--biru-tua);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--biru);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--biru);
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.navbar__toggle svg {
  width: 26px;
  height: 26px;
}

/* ---------- Hero / Content layout ---------- */

.hero {
  position: relative;
  padding: 64px 48px 90px;
  background: linear-gradient(180deg, #eaf3fd 0%, #f6faff 55%, #ffffff 100%);
  overflow: hidden;
}

.hero__wrap {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  color: var(--biru);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.hero__title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 800;
  color: var(--biru-tua);
  line-height: 1.18;
  margin: 0 0 20px;
}

.hero__accent {
  width: 64px;
  height: 5px;
  background: var(--oranye);
  border-radius: 4px;
  margin-bottom: 22px;
}

.hero__desc {
  color: var(--abu-teks);
  font-size: 1rem;
  max-width: 46ch;
  margin: 0;
}

.hero__image {
  border-radius: 20px;
  overflow: hidden;
}

/* ---------- Form Card ---------- */

.kartu-form {
  background: var(--putih);
  border-radius: var(--radius);
  box-shadow: var(--shadow-kartu);
  padding: 40px 44px 44px;
}

.kartu-form__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.kartu-form__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--biru);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kartu-form__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--putih);
}

.kartu-form__head h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--biru-tua);
}

.kartu-form__head p {
  margin: 0;
  color: var(--abu-teks);
  font-size: 0.92rem;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--biru-tua);
  margin-bottom: 8px;
}

.field label svg {
  width: 18px;
  height: 18px;
  stroke: var(--biru);
  flex-shrink: 0;
}

.field label .wajib {
  color: #e0453c;
}

.field input[type="text"],
.field input[readonly],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--abu-garis);
  background: var(--abu-input-bg);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--biru-tua);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input[readonly] {
  color: var(--abu-teks);
  cursor: default;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b6b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa7bd;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--biru);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
  background: var(--putih);
}

.field--date {
  position: relative;
}

.field--date .ikon-kalender {
  position: absolute;
  right: 16px;
  top: 43px;
  width: 20px;
  height: 20px;
  stroke: var(--abu-teks);
  pointer-events: none;
}

.field-error {
  color: #e0453c;
  font-size: 0.8rem;
  margin-top: 6px;
  font-weight: 600;
}

.btn-kirim {
  width: 100%;
  background: var(--biru);
  color: var(--putih);
  border: none;
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-kirim svg {
  width: 19px;
  height: 19px;
}

.btn-kirim:hover {
  background: var(--biru-tua);
}

.btn-kirim:active {
  transform: translateY(1px);
}

/* ---------- Alert ---------- */

.alert {
  max-width: 1240px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert--sukses {
  background: #eaf8ef;
  color: #1c7c3f;
  border: 1px solid #bfe8cd;
}

.alert--gagal {
  background: #fdecec;
  color: #c53030;
  border: 1px solid #f5c2c2;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---------- Decorative wave ---------- */

.gelombang {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  width: 100%;
  z-index: 1;
  line-height: 0;
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 22px 20px 30px;
  color: var(--abu-teks);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .navbar {
    padding: 16px 20px;
  }

  .navbar__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--putih);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--abu-garis);
    box-shadow: 0 12px 20px -12px rgba(15, 42, 92, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .navbar__nav.terbuka {
    max-height: 200px;
  }

  .navbar__link {
    width: 100%;
    padding: 16px 20px;
    border-bottom: none;
    border-left: 3px solid var(--biru);
    background: var(--biru-langit);
  }

  .navbar__toggle {
    display: block;
  }

  .hero {
    padding: 0 0 60px;
  }

  .hero__wrap {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 100%;
  }

  .hero__teks {
    padding: 32px 20px 8px;
    text-align: center;
  }

  .hero__accent {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__image {
    border-radius: 0;
    margin-bottom: 24px;
  }

  .kartu-form {
    margin: 0 16px 0;
    padding: 30px 22px 34px;
    position: relative;
    z-index: 3;
  }

  .alert {
    margin: 16px 16px 0;
  }
}

@media (max-width: 480px) {
  .navbar__brand-text {
    font-size: 0.88rem;
  }

  .hero__title {
    font-size: 1.55rem;
  }

  .kartu-form__head h2 {
    font-size: 1.2rem;
  }
}
