/* Muaalem — tinta & kuningan
   Token dan komponen bersama untuk semua halaman.
   Halaman boleh menambah gaya sendiri, tetapi warna, tipe, jarak, dan gerak
   diambil dari sini supaya tidak pecah antar halaman. */

@font-face {
  font-family: "LPMQ Local";
  src: url("/fonts/LPMQ.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Amiri Quran Local";
  src: url("/fonts/amiri-quran.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #0b1210;
  --bg-soft: #0e1714;
  --surface: #121d19;
  --surface-2: #17241f;
  --line: #24342c;
  --line-strong: #3a5245;

  --ink: #e9ede7;
  --ink-2: #c3cec6;
  --muted: #93a49a;
  --brass: #d8b26a;
  --brass-hi: #f0cd8a;
  --brass-ink: #261b07;

  --ok: #63d6a7;
  --ok-bg: #10291f;
  --ok-line: #2a634b;
  --bad: #f29790;
  --bad-bg: #2b1618;
  --bad-line: #713136;

  --paper: #fbf8f1;
  --paper-ink: #1b2620;
  --paper-muted: #5b6a60;
  --paper-line: #e6dfcf;

  --focus: #f0cd8a;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  --font-ui: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-arabic: "LPMQ Local", "Amiri Quran Local", Amiri, "Scheherazade New", "Noto Naskh Arabic", serif;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.25rem;
  --step-3: 1.625rem;
  --step-4: 2.125rem;
  --step-5: clamp(2.5rem, 6vw, 3.75rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --dur-1: 160ms;
  --dur-2: 240ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

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

::selection {
  background: rgba(216, 178, 106, 0.32);
  color: var(--ink);
}

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

.od-icon {
  display: inline-block;
  inline-size: var(--od-icon-size, 1.15em);
  block-size: var(--od-icon-size, 1.15em);
  flex: none;
  vertical-align: -0.16em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--brass);
  color: var(--brass-ink);
  font-weight: 650;
  text-decoration: none;
  transition: top var(--dur-1) var(--ease-out);
}

.skip-link:focus-visible {
  top: 12px;
}

/* ---------- kerangka ---------- */

.wrap {
  width: min(1080px, 100% - 40px);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(680px, 100% - 40px);
  margin-inline: auto;
}

@media (max-width: 560px) {
  .wrap,
  .wrap-narrow {
    width: min(100% - 32px, 100%);
  }
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--brass);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.65;
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-5);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section-head p:not(.eyebrow) {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  max-width: 58ch;
}

/* ---------- brand ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 10px;
  background: rgba(216, 178, 106, 0.13);
  border: 1px solid rgba(216, 178, 106, 0.3);
  color: var(--brass);
}

.brand-mark .od-icon {
  --od-icon-size: 20px;
}

.brand-sub {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ---------- tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--step-0);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}

.btn:hover {
  background: #1d2d26;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--brass-ink);
}

.btn-primary:hover {
  background: var(--brass-hi);
  border-color: var(--brass-hi);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(233, 237, 231, 0.06);
  border-color: var(--brass);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-link {
  color: var(--brass);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--brass-hi);
}

/* ---------- form ---------- */

.field {
  display: grid;
  gap: 6px;
  margin-top: var(--space-4);
}

.field:first-child {
  margin-top: 0;
}

.field > label {
  color: var(--ink-2);
  font-size: var(--step--1);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: var(--step-1);
  transition: border-color var(--dur-1) var(--ease-out),
    background-color var(--dur-1) var(--ease-out);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #86978d;
}

.field input:hover,
.field select:hover {
  border-color: #4c6858;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--brass);
}

.field .help {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.flash {
  margin-bottom: var(--space-4);
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: var(--step-0);
  line-height: 1.5;
}

.flash-error {
  border-color: var(--bad-line);
  background: var(--bad-bg);
  color: #ffd9d6;
}

.flash-ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: #c9f5e2;
}

/* ---------- permukaan ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: currentColor;
}

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