/* =========================================================
   BeliDiBrit — base tokens, reset & shared components
   ========================================================= */

:root {
  /* Palet dari logo: biru navy = Sydney, merah = Seoul */
  --sydney: #1b3a63;
  --sydney-soft: #e6edf7;
  --seoul: #d03838;
  --seoul-strong: #b52c30;
  --seoul-soft: #fbe8e8;

  --ink: #0d1f3c;
  --ink-2: #1b3a63;
  --maroon: var(--sydney);   /* nama lama dipertahankan: warna aksi utama kini biru logo */
  --rose: var(--seoul-strong); /* aksen kedua kini merah logo (versi kontras aman untuk teks putih) */
  --blue-soft: var(--sydney-soft);
  --rose-soft: var(--sydney-soft); /* tint netral merek = biru; merah muda hanya lewat --seoul-soft untuk Seoul */
  --paper: #f7f9fc;
  --cream: #edf1f7;
  --white: #ffffff;
  --muted: #566176;
  --muted-2: #77829a;
  --line: rgba(13, 31, 60, 0.13);
  --line-strong: rgba(13, 31, 60, 0.24);
  --green: #2f6b4f;
  --green-soft: #e8f1eb;
  --amber: #9a6417;
  --amber-soft: #fbf1de;
  --danger: #a02038;
  --danger-soft: #fbe9ec;

  --font-brand: "Poppins", "Segoe UI", sans-serif;
  --font-serif: "Caladea", "Georgia", serif;
  --font-italic: "Lora", "Georgia", serif;
  --font-sans: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --container: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 8px rgba(13, 31, 60, 0.06);
  --shadow: 0 18px 50px -24px rgba(13, 31, 60, 0.28);
  --shadow-lg: 0 34px 90px -32px rgba(13, 31, 60, 0.35);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 240ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--rose);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - (var(--gutter) * 2), 820px);
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.serif {
  font-family: var(--font-serif);
}

.italic {
  font-family: var(--font-italic);
  font-style: italic;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
}

.eyebrow::before {
  content: "";
  width: 1.7rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.skip-link {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 300;
  padding: 0.8rem 1.2rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transform: translateY(-130%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--maroon);
  --btn-color: #fff;
  --btn-border: var(--maroon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-family: var(--font-brand);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--speed) var(--ease-out),
    background-color var(--speed) ease,
    color var(--speed) ease,
    border-color var(--speed) ease,
    box-shadow var(--speed) ease;
}

.btn:hover {
  --btn-bg: var(--rose);
  --btn-border: var(--rose);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -14px rgba(27, 58, 99, 0.65);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-color: var(--ink);
  --btn-border: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-color: #fff;
  --btn-border: var(--ink);
  box-shadow: none;
}

.btn--ink {
  --btn-bg: var(--ink);
  --btn-border: var(--ink);
  --btn-color: #fff;
}

.btn--ink:hover {
  --btn-bg: var(--ink-2);
  --btn-border: var(--ink-2);
}

.btn--wa {
  --btn-bg: #1f6b45;
  --btn-border: #1f6b45;
  --btn-color: #fff;
}

.btn--wa:hover {
  --btn-bg: #175237;
  --btn-border: #175237;
}

.btn--soft {
  --btn-bg: var(--rose-soft);
  --btn-color: var(--maroon);
  --btn-border: transparent;
}

.btn--soft:hover {
  --btn-bg: var(--maroon);
  --btn-color: #fff;
  --btn-border: var(--maroon);
}

.btn--sm {
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.76rem;
}

.btn--lg {
  min-height: 3.25rem;
  padding: 0.9rem 1.5rem;
  font-size: 0.92rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-brand);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--maroon);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.link-arrow svg {
  width: 0.95rem;
  height: 0.95rem;
  transition: transform var(--speed) var(--ease-out);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* ---------- Badges & pills ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: currentColor;
}

.badge--open {
  background: var(--green-soft);
  color: var(--green);
}

.badge--closed {
  background: var(--rose-soft);
  color: var(--maroon);
}

.badge--request {
  background: var(--blue-soft);
  color: var(--ink-2);
}

.badge--neutral {
  background: #eef0f4;
  color: var(--muted);
}

.badge--warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--solid {
  background: var(--ink);
  color: #fff;
}

.badge--solid::before {
  background: #fff;
}

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 0.4rem;
}

.field > label,
.field-label {
  font-family: var(--font-brand);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field .hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: #9aa0af;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(208, 56, 56, 0.13);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.select[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(160, 32, 56, 0.1);
}

.field-error {
  display: none;
  font-size: 0.75rem;
  color: var(--danger);
}

.field-error.is-visible {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid .field--full {
  grid-column: 1 / -1;
}

.form-note {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-soft);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.form-note svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-top: 1px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

.check input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--maroon);
  flex: none;
}

/* ---------- Dialog ---------- */

.dialog {
  width: min(92vw, 560px);
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dialog::backdrop {
  background: rgba(13, 31, 60, 0.55);
  backdrop-filter: blur(3px);
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--line);
}

.dialog__head h2 {
  font-family: var(--font-brand);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.dialog__head p {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.dialog__close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  flex: none;
}

.dialog__close:hover {
  background: var(--cream);
}

.dialog__body {
  padding: 1.25rem 1.4rem;
  overflow-y: auto;
  max-height: calc(88vh - 150px);
}

.dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 1.4rem;
  border-top: 1px solid var(--line);
  background: #fbfbfd;
}

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 400;
  display: grid;
  gap: 0.5rem;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  line-height: 1.45;
  animation: toast-in 260ms var(--ease-out);
  pointer-events: auto;
}

.toast strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 0.78rem;
  font-weight: 600;
}

.toast--success {
  background: #1d4d36;
}

.toast--error {
  background: var(--danger);
}

.toast__icon {
  flex: none;
  margin-top: 1px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity 620ms var(--ease-out),
      transform 620ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Air mail rule ---------- */

.airmail {
  height: 4px;
  background: repeating-linear-gradient(
    135deg,
    var(--maroon) 0 14px,
    var(--paper) 14px 22px,
    var(--ink-2) 22px 36px,
    var(--paper) 36px 44px
  );
  opacity: 0.85;
}

/* ---------- Responsive form ---------- */

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dialog {
    width: calc(100vw - 1.5rem);
    max-height: 92vh;
  }

  .dialog__body {
    max-height: calc(92vh - 150px);
  }
}

/* ==== Logo gambar (tangan menaruh Sydney Opera House & Namsan Tower) ==== */
span.brand__mark.brand__mark--logo {
  display: block;
  flex: none;
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 10px;
  overflow: hidden;
}
span.brand__mark.brand__mark--logo::after { display: none; }
span.brand__mark.brand__mark--logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sidebar__brand span.brand__mark.brand__mark--logo { width: 2.9rem; height: 2.9rem; }
@media (max-width: 900px) { span.brand__mark.brand__mark--logo { width: 3rem; height: 3rem; } }
