/* =========================================================
   Halo Belanda — shared design system
   Dutch lessons for Indonesian learners
   ========================================================= */

:root {
  /* palette: warm cream + terracotta + moss (default / "kembang") */
  --bg: #f4ede2;
  --paper: #faf5ec;
  --paper-2: #ede2cf;
  --ink: #2a2520;
  --ink-soft: #6b5d4f;
  --ink-mute: #998873;
  --accent: #b8543a;
  --accent-deep: #8f3d28;
  --accent-soft: #e9b9a5;
  --moss: #3d5a3a;
  --moss-soft: #a3b59c;
  --line: #d9cdb8;
  --line-soft: #e6dcc6;

  /* type */
  --serif: 'Newsreader', 'Source Serif 4', Georgia, serif;
  --sans: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;
  --r-full: 999px;

  /* layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* palette: dawn (rose + indigo on bone) */
[data-palette="dawn"] {
  --bg: #f6efe8;
  --paper: #fbf6f0;
  --paper-2: #ece2d4;
  --ink: #221c1f;
  --ink-soft: #6b5b58;
  --ink-mute: #a09083;
  --accent: #c25a4b;
  --accent-deep: #99402f;
  --accent-soft: #ebbcaf;
  --moss: #3a4870;
  --moss-soft: #a8b1cb;
  --line: #dccfb9;
  --line-soft: #e8dfcd;
}

/* palette: spice (deep saffron + clove) */
[data-palette="spice"] {
  --bg: #f1e8d8;
  --paper: #f8efde;
  --paper-2: #e6d8bc;
  --ink: #2b2118;
  --ink-soft: #6b5a44;
  --ink-mute: #9f8a6b;
  --accent: #c4651c;
  --accent-deep: #944710;
  --accent-soft: #e7b986;
  --moss: #5a4b2a;
  --moss-soft: #b3a482;
  --line: #d7c69f;
  --line-soft: #e3d5b0;
}

/* ============= base ============= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.028em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -0.022em; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); line-height: 1.2; }
h4 { font-size: 1.05rem; line-height: 1.25; font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 0.9em; }

/* italic in headline = secondary language phrase */
h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* monospace bilingual label */
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* eyebrow with dot */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
}

/* ============= header / nav ============= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-weight: 500;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: auto -6px -10px auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--moss);
  mix-blend-mode: multiply;
  opacity: .9;
}
.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--r-full);
  color: var(--ink-soft);
  font-size: 15px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav-links, .nav-cta .btn-secondary { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  body.menu-open .nav-links {
    display: flex;
    position: fixed;
    inset: 64px 16px auto 16px;
    flex-direction: column;
    gap: 2px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px;
    box-shadow: 0 18px 40px -20px rgba(40, 30, 20, 0.25);
  }
  body.menu-open .nav-links a { padding: 12px 14px; }
}

/* ============= buttons ============= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r-full);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff8f1;
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { background: var(--paper); border-color: var(--ink-mute); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 8px 4px;
}
.btn-ghost:hover { color: var(--accent); }
.btn-arrow::after { content: "→"; transition: transform 0.2s; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ============= sections ============= */
.section {
  padding-block: clamp(64px, 9vw, 128px);
}
.section-tight { padding-block: clamp(48px, 6vw, 80px); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.section-head p { color: var(--ink-soft); font-size: 1.05rem; max-width: 48ch; }

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; }
}

/* ============= cards ============= */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--ink-mute); }

.card-link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
}
.card-link:hover { transform: translateY(-2px); }

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ============= illustration / motif primitives ============= */
.illus {
  display: block;
  width: 100%;
  height: auto;
}
.illus-bg { background: var(--paper-2); border-radius: var(--r-md); }

.tile-grid {
  background-image:
    radial-gradient(circle at 50% 50%, var(--accent) 1.2px, transparent 1.6px),
    radial-gradient(circle at 50% 50%, var(--moss) 1.2px, transparent 1.6px);
  background-size: 18px 18px, 18px 18px;
  background-position: 0 0, 9px 9px;
  opacity: 0.35;
}

.divider-wave {
  height: 28px;
  background-image:
    radial-gradient(circle 14px at 14px 0, transparent 13px, var(--line) 13px, var(--line) 14px, transparent 14px);
  background-size: 28px 28px;
  background-repeat: repeat-x;
}

/* ============= bilingual word pair ============= */
.word-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 13px;
}
.word-pair .nl {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}
.word-pair .id {
  font-family: var(--sans);
  color: var(--ink-soft);
}
.word-pair .sep {
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 11px;
}

/* ============= floating whatsapp ============= */
.wa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px 13px 14px;
  border-radius: var(--r-full);
  background: #25a560;
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 10px 24px -8px rgba(20, 50, 30, 0.4);
  border: none;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.wa-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(20, 50, 30, 0.5); }
.wa-fab svg { width: 18px; height: 18px; }
@media (max-width: 540px) {
  .wa-fab span { display: none; }
  .wa-fab { padding: 14px; }
}

/* ============= footer ============= */
.site-footer {
  margin-top: 80px;
  background: var(--ink);
  color: var(--paper);
  padding-block: 64px 32px;
}
.site-footer h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 18px;
}
.site-footer a { color: var(--paper); opacity: 0.78; }
.site-footer a:hover { opacity: 1; color: var(--accent-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-brand { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; margin-bottom: 14px; }
.footer-brand em { color: var(--accent-soft); font-style: italic; }
.footer-fine {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-fine { flex-direction: column; }
}

/* ============= utility ============= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.divider { height: 1px; background: var(--line-soft); border: none; margin: 0; }
.lead { font-size: 1.18rem; color: var(--ink-soft); line-height: 1.5; max-width: 56ch; }

/* skip motifs based on intensity */
[data-motif="subtle"] .motif-medium,
[data-motif="subtle"] .motif-bold { display: none; }
[data-motif="medium"] .motif-bold { display: none; }
[data-motif="bold"] .motif-subtle-only { display: none; }
