/* Dasar: font, warna, tombol, formulir. Dipakai semua halaman. */

@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/archivo-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/archivo-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lexend"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/lexend-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lexend"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/lexend-latin-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #0f2a43;
  --paper: #f3f6f8;
  --white: #ffffff;
  --yellow: #ffc400;
  --yellow-soft: #fff3c2;
  --padi: #17784a;
  --padi-soft: #e3f3ea;
  --muted: #4b5f73;
  --line: #d3dce4;
  --danger: #b3261e;
  --danger-soft: #fdeceb;
  --focus: #0b57d0;
  --font-body: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Archivo", "Lexend", system-ui, sans-serif;
  --maxw: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 7.2vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sr-copy { position: fixed; left: -9999px; top: 0; opacity: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Tombol: gaya "stiker" yang terasa ditekan */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  font: 700 1.05rem/1.2 var(--font-body); text-decoration: none; text-align: center;
  color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 12px; cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-wa { background: var(--yellow); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); box-shadow: 0 3px 0 var(--danger); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.95rem; border-radius: 10px; box-shadow: 0 2px 0 var(--ink); }
.btn-block { width: 100%; }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }

/* Formulir */
.field { display: grid; gap: 6px; margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 700; padding: 0; }
.hint { color: var(--muted); font-size: 0.95rem; }
.input {
  width: 100%; min-height: 52px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 10px;
}
textarea.input { min-height: 88px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.err { color: var(--danger); font-weight: 700; font-size: 0.95rem; min-height: 1.2em; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px;
  font-weight: 700; background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
}
.choice input:checked + span { background: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.agree { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; margin-bottom: 18px; font-size: 1rem; }
.agree input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 14px 16px; border-radius: 12px; border: 2px solid var(--ink); background: var(--white); font-size: 1rem; }
.notice a { font-weight: 700; }
.notice-err { border-color: var(--danger); background: var(--danger-soft); }
.notice-ok { border-color: var(--padi); background: var(--padi-soft); }

#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px);
  max-width: min(92vw, 420px); padding: 12px 18px; z-index: 60;
  background: var(--ink); color: #fff; border-radius: 12px; font-weight: 700; font-size: 1rem; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { #toast { bottom: 32px; } }
