/* ==========================================================================
   MyWarung — "Midnight Bali" editorial design system v3
   A dark tropical editorial palette: high-contrast, mature, distinctive —
   deliberately not a café/rustic-restaurant beige-and-terracotta template.
   ========================================================================== */

:root {
  /* Brand palette — Midnight Bali */
  --ink: #171A18;
  --deep-navy: #18252B;
  --rice-paper: #F2EEE6;
  --warm-stone: #D8CFC1;
  --palm-green: #405348;
  --chili-red: #9F3E30;
  --aged-brass: #B68B46;
  --soft-white: #FAF8F3;

  /* Legacy alias names — kept so every existing component rule below (which
     references these names, not raw hex) picks up the new palette globally
     without needing a rule-by-rule rewrite. Roles map like-for-like:
     ivory/cream (light bg) -> rice-paper/soft-white, warm-paper (panel bg)
     -> warm-stone, terracotta (primary accent) -> chili-red, turmeric (gold
     accent) -> aged-brass, teak/forest (secondary accent, links) -> palm-
     green. Olive has no new equivalent in the brief and is redefined as a
     small, muted neutral used only for one badge variant. */
  --ivory: var(--rice-paper);
  --warm-paper: var(--warm-stone);
  --terracotta: var(--chili-red);
  --deep-chili: #7C3226;
  --turmeric: var(--aged-brass);
  --teak: var(--palm-green);
  --forest: var(--palm-green);
  --olive: #756F5C;
  --cream: var(--soft-white);
  /* Darkened aged-brass for small text/borders on light backgrounds — raw
     aged-brass measures ~2.9:1 against soft-white/rice-paper (fails WCAG AA
     4.5:1), so this variant is used anywhere brass is read as text rather
     than a purely decorative rule/dot/icon. */
  --aged-brass-text: #8C6A34;

  /* Functional aliases */
  --bg: var(--rice-paper);
  --bg-cream: var(--soft-white);
  --bg-paper: var(--warm-stone);
  --bg-dark: var(--ink);
  --bg-dark-alt: var(--deep-navy);
  --text: var(--ink);
  --text-on-dark: var(--soft-white);
  --text-muted: #5B5A50;
  --text-muted-on-dark: #B9C2C0;
  --border: rgba(23,26,24,0.12);
  --border-strong: rgba(23,26,24,0.22);
  --border-on-dark: rgba(250,248,243,0.16);
  --accent: var(--chili-red);
  --accent-deep: var(--deep-chili);
  --gold: var(--aged-brass);
  --link: var(--palm-green);
  --focus: #1B6E8A;

  /* Type */
  --font-head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Manrope", "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;

  --eyebrow-size: clamp(0.72rem, 0.68rem + 0.15vw, 0.82rem);
  --nav-size: clamp(0.875rem, 0.84rem + 0.12vw, 1rem);
  --body-size: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --h4-size: clamp(1.15rem, 1.08rem + 0.3vw, 1.4rem);
  --h3-size: clamp(1.4rem, 1.25rem + 0.7vw, 1.9rem);
  --h2-size: clamp(2rem, 1.6rem + 1.8vw, 4rem);
  --h1-article-size: clamp(2.8rem, 2.1rem + 3.2vw, 5.8rem);
  --h1-home-size: clamp(3.5rem, 2.3rem + 5.2vw, 7rem);

  /* Spacing */
  --sp-1: 0.4rem;
  --sp-2: 0.8rem;
  --sp-3: 1.4rem;
  --sp-4: 2.2rem;
  --sp-5: clamp(3rem, 2.4rem + 2.6vw, 5rem);
  --sp-section: clamp(3rem, 1.6rem + 6vw, 8.75rem);
  --sp-section-tablet: clamp(4rem, 3rem + 3vw, 5.5rem);

  --radius-sm: 3px;
  --radius: 6px;
  --content-w: 44rem;
  --container-w: 1280px;
  --shadow-editorial: 0 18px 50px -24px rgba(23,26,24,0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:not([class]) { text-decoration-color: var(--border-strong); }
a:not([class]):hover { text-decoration-color: currentColor; }
ul, ol { padding-left: 1.25em; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.08; color: var(--ink); margin: 0 0 0.42em; letter-spacing: -0.01em; overflow-wrap: anywhere; }
h1 { font-size: var(--h1-article-size); font-weight: 500; }
h2 { font-size: var(--h2-size); margin-top: 0; }
h3 { font-size: var(--h3-size); margin-top: 1.6em; }
h4 { font-size: var(--h4-size); }
p { margin: 0 0 1.15em; overflow-wrap: anywhere; }
.lede { font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.4rem); color: var(--text-muted); font-weight: 400; line-height: 1.55; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: var(--ivory); padding: 0.8em 1.2em;
  font-family: var(--font-body); font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: var(--sp-3); top: var(--sp-2); }

/* ---------- Container ---------- */
.wrap {
  width: min(100% - 40px, var(--container-w));
  margin-inline: auto;
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 28px, var(--container-w)); }
}
.prose { max-width: var(--content-w); margin-inline: auto; padding-inline: 20px; }
@media (max-width: 640px) { .prose { padding-inline: 14px; } }
.prose img { border-radius: var(--radius); }

/* ---------- Section rhythm ---------- */
.section { padding-block: var(--sp-section); }
.section-tight { padding-block: var(--sp-section-tablet); }
@media (max-width: 1024px) { .section { padding-block: var(--sp-section-tablet); } }
@media (max-width: 640px) { .section, .section-tight { padding-block: clamp(3rem, 2.4rem + 3vw, 4rem); } }

.band-ink { background: var(--bg-dark-alt); color: var(--text-on-dark); }
.band-ink h2, .band-ink h3, .band-ink h4 { color: var(--ivory); }
.band-ink p:not(.lede) { color: var(--text-muted-on-dark); }
.band-ink .lede { color: var(--warm-stone); }
.band-ink a:not([class]) { color: var(--turmeric); }

.band-cream { background: var(--bg-cream); }
.band-paper { background: var(--bg-paper); }

/* Paper grain texture (data-uri noise, applied sparingly) */
.texture-grain {
  position: relative;
}
.texture-grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.band-ink.texture-grain::before { opacity: 0.18; mix-blend-mode: overlay; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-body); font-weight: 700;
  font-size: var(--eyebrow-size); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: 0.9em;
}
.band-ink .eyebrow { color: var(--turmeric); }
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; display: inline-block; }

.divider-rule { border: none; height: 1px; background: var(--border); margin: var(--sp-4) 0; }
.divider-hand { border: none; height: 10px; margin: var(--sp-4) 0; background: none; position: relative; }
.divider-hand::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 64px; height: 2px; background: var(--terracotta); border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,239,228,0.94); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  width: min(100% - 40px, var(--container-w)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  height: 78px;
}
@media (max-width: 640px) { .header-inner { width: min(100% - 28px, var(--container-w)); height: 68px; } }

.brand { display: flex; align-items: center; gap: 0.7em; text-decoration: none; color: var(--ink); flex: none; min-width: 0; }
.brand-mark { width: 48px; height: 48px; flex: none; }
.brand-text { display: flex; flex-direction: column; gap: 0.16em; line-height: 1; min-width: 0; }
.brand-word { font-family: var(--font-head); font-size: clamp(1.42rem, 1.24rem + 0.7vw, 1.82rem); font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; }
.brand-tag { display: none; font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
@media (min-width: 90rem) { .brand-tag { display: block; } }

.nav-main { display: none; min-width: 0; }
.nav-main ul { display: flex; gap: clamp(0.9rem, 0.6rem + 1vw, 1.8rem); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-main a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--nav-size); letter-spacing: 0.01em; position: relative; white-space: nowrap; padding: 0.4em 0; }
.nav-main a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--terracotta); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav-main a:hover::after, .nav-main a[aria-current="page"]::after { transform: scaleX(1); }
.nav-main li.has-sub { position: relative; }
.nav-main .submenu {
  position: absolute; top: 100%; left: -1em; margin: 0.9em 0 0; padding: 0.6em; list-style: none;
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-editorial); min-width: 15.5rem;
  opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease;
}
.nav-main li.has-sub:hover .submenu,
.nav-main li.has-sub:focus-within .submenu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-main .submenu a { display: block; padding: 0.6em 0.75em; border-radius: var(--radius-sm); font-weight: 500; white-space: normal; }
.nav-main .submenu a::after { display: none; }
.nav-main .submenu a:hover, .nav-main .submenu a:focus-visible { background: var(--warm-paper); }

.header-actions { display: flex; align-items: center; gap: 0.6em; flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; width: 40px; height: 40px;
  border: none; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, width .15s ease, padding .15s ease;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--warm-paper); }
.icon-btn svg { width: 17px; height: 17px; flex: none; }
.icon-btn .search-label { display: none; font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
@media (min-width: 76.25rem) {
  .icon-btn { width: auto; padding: 0.5em 0.9em 0.5em 0.75em; border: 1px solid var(--border-strong); }
  .icon-btn .search-label { display: inline; }
}

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5em; background: var(--ink); color: var(--ivory); border: none;
  border-radius: var(--radius-sm); padding: 0.6em 0.9em; font-family: var(--font-body); font-weight: 700; font-size: var(--nav-size);
  cursor: pointer;
}
.nav-toggle svg { width: 17px; height: 17px; }

@media (min-width: 76.25rem) {
  .nav-main { display: block; }
  .nav-toggle { display: none; }
}

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 200; visibility: hidden;
}
.mobile-nav.is-open { visibility: visible; }
.mobile-nav-scrim {
  position: absolute; inset: 0; background: rgba(23,26,24,0.55); opacity: 0; transition: opacity .2s ease;
}
.mobile-nav.is-open .mobile-nav-scrim { opacity: 1; }
.mobile-nav-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(88vw, 380px);
  background: var(--cream); box-shadow: var(--shadow-editorial);
  transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.7,.3,1);
  overflow-y: auto; padding: 1.4rem 1.4rem 3rem;
}
.mobile-nav.is-open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.mobile-nav-close { width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15em; }
.mobile-nav a { color: var(--ink); text-decoration: none; font-weight: 600; display: block; padding: 0.7em 0.2em; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
.mobile-nav .nav-group-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--terracotta); font-weight: 700; margin: 1.3em 0 0.3em; }
@media (min-width: 76.25rem) { .mobile-nav { display: none !important; } }
body.nav-locked { overflow: hidden; }

/* ---------- Hero: homepage split ---------- */
.hero-split {
  background: var(--cream);
  display: grid; grid-template-columns: 1fr; align-items: stretch;
  min-height: 78vh;
}
@media (min-width: 64rem) {
  .hero-split { grid-template-columns: 1.05fr 0.95fr; min-height: 84vh; }
}
.hero-split-content {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2.5rem, 2rem + 3vw, 5rem) clamp(20px, 4vw, 5rem) clamp(2.5rem, 2rem + 3vw, 3.5rem);
}
.hero-split-content h1 { font-size: var(--h1-home-size); margin-bottom: 0.32em; }
.hero-split-content .lede { max-width: 34rem; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4em; }
.hero-split-media { position: relative; min-height: 320px; }
.hero-split-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption-card {
  position: absolute; left: clamp(16px, 3vw, 2.2rem); bottom: clamp(16px, 3vw, 2.2rem);
  background: var(--cream); border-radius: var(--radius); padding: 1em 1.3em; max-width: 15rem;
  box-shadow: var(--shadow-editorial);
}
.hero-caption-card .eyebrow { margin-bottom: 0.3em; }
.hero-caption-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Hero: editorial layered composition (homepage v3) ---------- */
.hero-ed {
  position: relative; background: var(--cream); overflow: hidden;
  min-height: 62vh; display: flex; align-items: center;
}
@media (min-width: 64rem) { .hero-ed { min-height: 87vh; overflow: visible; } }

.hero-ed-photo { position: absolute; inset: 0; z-index: 0; }
.hero-ed-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-ed-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,249,240,0.97) 0%, rgba(255,249,240,0.55) 34%, rgba(255,249,240,0) 52%);
}
@media (min-width: 64rem) {
  .hero-ed-photo::after { background: linear-gradient(100deg, rgba(255,249,240,0.98) 0%, rgba(255,249,240,0.75) 30%, rgba(255,249,240,0) 46%); }
}

.hero-ed-body { position: relative; z-index: 2; }
.hero-ed-panel {
  position: relative; z-index: 2; background: var(--cream);
  padding: clamp(2.2rem, 6vw, 3rem) clamp(20px, 5vw, 2.4rem);
  box-shadow: var(--shadow-editorial);
}
@media (min-width: 64rem) {
  .hero-ed-panel {
    width: min(43%, 600px); margin: clamp(2.2rem, 5vh, 4rem) 0;
    padding: clamp(2.2rem, 2.6vw, 3rem);
  }
}

.issue-label {
  display: flex; align-items: center; gap: 0.6em; font-family: var(--font-body); font-weight: 800;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terracotta);
  margin: 0 0 1.2em;
}
.issue-label .num { font-family: var(--font-head); font-style: italic; font-weight: 500; font-size: 1.1rem; color: var(--aged-brass); letter-spacing: 0; text-transform: none; }
.issue-label .sep { width: 20px; height: 1px; background: var(--aged-brass); display: inline-block; }

.hero-ed-headline {
  font-family: var(--font-head); font-weight: 600; letter-spacing: -0.015em;
  line-height: 0.98; margin: 0 0 0.5em;
}
.hero-ed-headline .hl-line { display: block; font-size: clamp(2.3rem, 1.9rem + 3vw, 4.4rem); }
.hero-ed-headline .hl-line + .hl-line { margin-top: 0.02em; }
.hero-ed-headline em {
  font-style: italic; font-weight: 400; color: var(--terracotta);
}
.hero-ed-headline .hl-3 {
  display: inline-block; font-size: clamp(1.7rem, 1.35rem + 2vw, 3rem); font-weight: 500; color: var(--teak);
  margin-top: 0.1em; background: var(--cream); padding: 0 0.06em;
}
@media (min-width: 64rem) {
  .hero-ed-headline .hl-3.hl-overlap { transform: translateX(clamp(20px, 9vw, 140px)); }
}

.rule-terracotta { display: block; width: 64px; height: 2px; background: var(--terracotta); margin: 0.8em 0 1em; border-radius: 2px; }

.hero-ed-panel .lede { max-width: 32rem; margin-bottom: 1.2em; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); }
.trust-note {
  margin: 1em 0 0; font-size: 0.8rem; letter-spacing: 0.02em; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 0.5em 0.7em; align-items: center;
}
.trust-note .sep { color: var(--terracotta); }

.hero-ed-detail {
  display: none;
}
@media (min-width: 64rem) {
  .hero-ed-detail {
    display: block; position: absolute; z-index: 3;
    right: clamp(2rem, 6vw, 5rem); bottom: clamp(1.5rem, 4vh, 3rem);
    width: clamp(160px, 13vw, 200px);
  }
  .hero-ed-detail img {
    width: 100%; aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow-editorial);
    border: 6px solid var(--cream);
  }
  .hero-ed-detail-caption { margin-top: 0.7em; font-size: 0.78rem; color: var(--ink); background: var(--cream); padding: 0.5em 0.7em; box-shadow: var(--shadow-editorial); }
  .hero-ed-detail-caption .cap-label { display: block; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.7rem; color: var(--aged-brass); margin-bottom: 0.25em; }
}

/* Mobile: photo first, panel in normal flow, no overlaps */
.hero-ed-mobile-photo { display: block; }
@media (min-width: 64rem) { .hero-ed-mobile-photo { display: none; } }
.hero-ed-mobile-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hero-ed-mobile-inset { margin-top: var(--sp-3); display: flex; gap: 0.9em; align-items: flex-start; }
.hero-ed-mobile-inset img { width: 96px; height: 120px; object-fit: cover; flex: none; }
.hero-ed-mobile-inset .cap-label { display: block; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.68rem; color: var(--aged-brass); margin-bottom: 0.3em; }
.hero-ed-mobile-inset p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Small recurring brand motifs */
.woven-strip { height: 34px; background-image:
  linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%),
  linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%);
  background-size: 14px 14px; background-position: 0 0, 7px 7px; opacity: 0.5;
}
.seed-dots { display: inline-flex; gap: 0.3em; align-items: center; }
.seed-dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--turmeric); display: inline-block; }
.coord-mark { width: 30px; height: 30px; flex: none; opacity: 0.85; }

/* Full-bleed photo hero (used on some article pages) */
.hero-photo { position: relative; overflow: clip; color: var(--ivory); min-height: 56vh; display: flex; align-items: flex-end; }
.hero-photo-media { position: absolute; inset: 0; z-index: 0; }
.hero-photo-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,26,24,0.1) 0%, rgba(23,26,24,0.6) 68%, rgba(23,26,24,0.88) 100%); }
.hero-photo-content { position: relative; z-index: 1; padding-block: var(--sp-5) 3.5rem; width: 100%; }
.hero-photo h1 { color: var(--ivory); max-width: 22ch; }
.hero-photo .lede { color: var(--warm-stone); max-width: 50ch; }

/* Article/editorial page hero (text-forward, textured band, no photo) */
.page-hero {
  background: var(--ink); color: var(--ivory); position: relative; overflow: clip;
  padding-block: clamp(3.5rem, 2.6rem + 4vw, 6rem) clamp(2.6rem, 2rem + 2vw, 3.6rem);
}
.page-hero::after {
  content: ""; position: absolute; right: -8%; top: -30%; width: 60%; height: 160%;
  background: radial-gradient(circle at center, rgba(212,155,50,0.16), transparent 68%);
  pointer-events: none;
}
.page-hero h1 { color: var(--ivory); max-width: 30ch; font-size: var(--h1-article-size); }
.page-hero .lede { color: var(--warm-stone); max-width: 58ch; }
.page-hero .eyebrow { color: var(--turmeric); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em; font-family: var(--font-body); font-weight: 700;
  font-size: var(--nav-size); padding: 0.95em 1.6em; border-radius: 6px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .15s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--deep-navy); color: var(--soft-white); }
.btn-primary:hover { background: var(--ink); }
.btn-ink { background: var(--ink); color: var(--ivory); }
.btn-ink:hover { background: #0E1418; }
.btn-outline { background: transparent; color: inherit; border-color: currentColor; }
.btn-outline:hover { background: rgba(0,0,0,0.06); }
.band-ink .btn-outline:hover { background: rgba(255,255,255,0.12); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; text-decoration: none; color: inherit;
  border-bottom: 1.5px solid currentColor; padding-bottom: 0.15em;
}
.link-arrow svg { width: 15px; height: 15px; transition: transform .15s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.82rem; padding-block: 1.1rem; }
.page-hero .breadcrumbs { color: var(--text-muted-on-dark); }
.breadcrumbs:not(.page-hero *) { color: var(--text-muted); border-bottom: 1px solid var(--border); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4em; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4em; opacity: 0.5; }
.breadcrumbs a { color: inherit; text-decoration: none; opacity: 0.75; }
.breadcrumbs a:hover { opacity: 1; text-decoration: underline; }
.breadcrumbs [aria-current="page"] { opacity: 1; font-weight: 600; }

/* ---------- Editorial cards ---------- */
.card-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .card-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 56rem) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.article-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border-top: 2px solid var(--ink); background: transparent;
}
.article-card .thumb { aspect-ratio: 4/3; overflow: clip; background: var(--warm-paper); margin-top: 1.1em; border-radius: var(--radius-sm); }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.article-card:hover .thumb img { transform: scale(1.05); }
.article-card .body { padding-top: 1.1em; display: flex; flex-direction: column; gap: 0.5em; flex: 1; }
.article-card h3 { font-size: var(--h4-size); margin: 0; }
.article-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.card-tag { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); }
.card-arrow { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 700; font-size: 0.88rem; margin-top: 0.3em; }
.card-arrow svg { width: 14px; height: 14px; transition: transform .15s ease; }
.article-card:hover .card-arrow svg { transform: translateX(4px); }

/* Staggered destination cards */
.stagger-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 56rem) {
  .stagger-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
  .stagger-grid > a:nth-child(2) { transform: translateY(2.5rem); }
}
.dest-card { position: relative; text-decoration: none; color: var(--ivory); border-radius: var(--radius); overflow: clip; aspect-ratio: 3/4; display: flex; align-items: flex-end; }
.dest-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.dest-card:hover img { transform: scale(1.06); }
.dest-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,26,24,0) 40%, rgba(23,26,24,0.85) 100%); }
.dest-card .dest-body { position: relative; z-index: 1; padding: 1.4em; }
.dest-card .card-tag { color: var(--turmeric); }
.dest-card h3 { color: var(--ivory); margin: 0.2em 0 0.3em; }
.dest-card p { color: var(--text-muted-on-dark); font-size: 0.9rem; margin: 0; }

/* Magazine list rows (numbered) */
.mag-list { list-style: none; margin: 0; padding: 0; }
.mag-list li { border-top: 1px solid var(--border-on-dark, var(--border)); }
.mag-list li:last-child { border-bottom: 1px solid var(--border-on-dark, var(--border)); }
.mag-list a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2em;
  padding: 1.5em 0; text-decoration: none; color: inherit;
}
.mag-num { font-family: var(--font-head); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.6rem); color: var(--terracotta); font-weight: 500; line-height: 1; }
.band-ink .mag-num { color: var(--turmeric); }
.mag-title h3 { margin: 0 0 0.15em; font-size: var(--h4-size); }
.mag-title p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.band-ink .mag-title p { color: var(--text-muted-on-dark); }
.mag-list a svg { width: 20px; height: 20px; transition: transform .15s ease; flex: none; }
.mag-list a:hover svg { transform: translateX(5px); }

/* Place / fact cards */
.place-card { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3); background: var(--bg-cream); }
.place-card h4 { margin: 0 0 0.3em; }
.place-card .place-meta { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 0.6em; }
.badge { display: inline-flex; align-items: center; gap: 0.35em; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.3em 0.7em; border-radius: 999px; border: 1px solid currentColor; }
.badge-halal-certified { color: var(--forest); }
.badge-halal-self { color: var(--aged-brass-text); }
.badge-halal-porkfree { color: var(--olive); }
.badge-not-halal { color: var(--deep-chili); }
.badge-unverified { color: var(--text-muted); border-style: dashed; }

/* ---------- Fact panel / key facts ---------- */
.fact-panel { background: var(--bg-cream); border: 1px solid var(--border); border-left: 3px solid var(--terracotta); border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0; }
.fact-panel h2, .fact-panel h3 { margin-top: 0; font-size: var(--h4-size); }
.fact-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4em 1.2em; margin: 0; font-size: 0.92rem; }
.fact-panel dt { font-weight: 700; color: var(--text-muted); }
.fact-panel dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Table of contents ---------- */
.toc { background: var(--bg-cream); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0; }
.toc summary { font-family: var(--font-head); font-weight: 600; font-size: var(--h4-size); cursor: pointer; }
.toc ol { margin: 0.8em 0 0; padding-left: 1.2em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: var(--sp-3) 0; border: 1px solid var(--border); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
table.data-table { min-width: 100%; font-size: 0.92rem; }
.data-table th, .data-table td { text-align: left; padding: 0.75em 1em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th { background: var(--warm-paper); font-family: var(--font-body); font-weight: 800; color: var(--ink); }
.data-table tr:last-child td { border-bottom: none; }

/* ---------- Source / verification block ---------- */
.sources-block { background: var(--bg-paper); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); margin: var(--sp-5) 0; font-size: 0.9rem; }
.sources-block h2 { font-size: var(--h4-size); margin-top: 0; }
.sources-block ul { margin: 0.5em 0 0; padding-left: 1.2em; }
.verify-note { color: var(--text-muted); font-style: italic; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--border); padding: var(--sp-3) 0; }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary { font-family: var(--font-head); font-weight: 600; font-size: var(--h4-size); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-body); font-weight: 400; flex: none; color: var(--terracotta); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 0.8em; color: var(--text-muted); }

/* ---------- Region nav / pills (metadata only) ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6em; }
.pill { display: inline-block; padding: 0.55em 1.1em; border: 1px solid var(--border-strong); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 0.88rem; font-weight: 600; }
.pill:hover { border-color: var(--aged-brass); color: var(--ink); }

/* ---------- Trust / methodology strip ---------- */
.trust-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 48rem) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item { border-top: 2px solid var(--turmeric); padding-top: 1.1em; }
.trust-item .icon { width: 34px; height: 34px; color: var(--turmeric); margin-bottom: 0.8em; }

/* ---------- Quote / fact strip ---------- */
.quote-strip { text-align: left; }
.quote-strip blockquote {
  font-family: var(--font-head); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 500;
  line-height: 1.3; margin: 0; max-width: 46rem;
}
.quote-strip cite { display: block; margin-top: 1em; font-style: normal; font-size: 0.9rem; color: var(--text-muted-on-dark); }

.feature-split { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 64rem) { .feature-split { grid-template-columns: 1.3fr 1fr; } }

/* ---------- Section photo w/ overlapping panel ---------- */
.image-panel { position: relative; }
.image-panel img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); }
.image-panel .overlap-card {
  background: var(--cream); border-radius: var(--radius); padding: 1.6em 1.8em; box-shadow: var(--shadow-editorial);
  margin: -3.5rem 1.5rem 0; position: relative; max-width: 34rem;
}
@media (max-width: 640px) { .image-panel .overlap-card { margin: -2rem 0.8rem 0; padding: 1.2em 1.4em; } }

figcaption { font-size: 0.86rem; color: var(--text-muted); margin-top: 0.6em; }
.band-ink figcaption { color: var(--text-muted-on-dark); }

/* ---------- Large featured story (e.g. Nasi Campur spotlight) ---------- */
.feature-story { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 64rem) { .feature-story { grid-template-columns: 1.15fr 1fr; gap: var(--sp-5); } }
.feature-story-media { position: relative; }
.feature-story-media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
@media (min-width: 64rem) { .feature-story-media img { aspect-ratio: 3/4; } }
.feature-story-text h2 { font-size: clamp(2.1rem, 1.7rem + 2vw, 3.4rem); margin-bottom: 0.4em; }
.feature-story-text .lede { margin-bottom: 1.3em; }
.feature-story-meta { display: flex; gap: 1.4em; flex-wrap: wrap; margin-top: 1.4em; padding-top: 1.2em; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.feature-story-meta strong { display: block; color: var(--ink); font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; }

/* ---------- Etiquette / terminology feature ---------- */
.etiquette-feature { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 64rem) { .etiquette-feature { grid-template-columns: 0.9fr 1.1fr; gap: var(--sp-5); } }
@media (min-width: 64rem) { .etiquette-feature .etiquette-media { order: 2; } .etiquette-feature .etiquette-text { order: 1; } }
.etiquette-media img { width: 100%; aspect-ratio: 5/4; object-fit: cover; }
.etiquette-list { list-style: none; margin: 1.5em 0 0; padding: 0; display: grid; gap: 0; }
.etiquette-list li { display: grid; grid-template-columns: auto 1fr; gap: 0.9em; padding: 1em 0; border-top: 1px solid var(--border); }
.etiquette-list li:last-child { border-bottom: 1px solid var(--border); }
.etiquette-list .et-num { font-family: var(--font-head); font-style: italic; color: var(--terracotta); font-size: 1.1rem; }
.etiquette-list h3 { margin: 0 0 0.2em; font-size: 1.05rem; }
.etiquette-list p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Dish index list (dark peek section) ---------- */
.dish-index { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 60rem) { .dish-index { grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; } }
.dish-index-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
@media (min-width: 60rem) { .dish-index-photo img { aspect-ratio: 3/4; } }

/* ---------- Update note ---------- */
.update-note { font-size: 0.88rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: var(--sp-3); margin-top: var(--sp-5); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--warm-stone); position: relative; overflow: clip; }
.site-footer .wrap { padding-block: var(--sp-5) var(--sp-4); position: relative; }
.footer-top { padding-bottom: var(--sp-5); border-bottom: 1px solid var(--border-on-dark); margin-bottom: var(--sp-4); }
.footer-statement { display: flex; align-items: flex-start; gap: 1.2em; flex-wrap: wrap; }
.footer-statement .brand-mark { width: 46px; height: 46px; flex: none; margin-top: 0.2em; }
.footer-statement h2 { color: var(--ivory); font-size: clamp(1.7rem, 1.4rem + 1.6vw, 2.9rem); max-width: 18ch; margin-bottom: 0.3em; }
.footer-statement p { color: var(--text-muted-on-dark); max-width: 40ch; }
.footer-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40rem) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-brand .brand-word { color: var(--ivory); }
.site-footer .brand { color: var(--ivory); }
.footer-col h3 { font-family: var(--font-body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--turmeric); margin-bottom: 1em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65em; }
.footer-col a { color: var(--warm-stone); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--turmeric); text-decoration: underline; }
.footer-legal { font-size: 0.82rem; color: #8C9290; display: flex; flex-direction: column; gap: 1em; }
.footer-disclaimer { max-width: 70ch; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8em; padding-top: 1.4em; border-top: 1px solid var(--border-on-dark); }
.footer-bottom a { color: #8C9290; }
.footer-motif { position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; opacity: 0.06; pointer-events: none; }

/* ---------- 404 ---------- */
.error-page { display: grid; grid-template-columns: 1fr; min-height: 72vh; }
@media (min-width: 56rem) { .error-page { grid-template-columns: 1fr 1fr; } }
.error-visual { position: relative; background: var(--ink); overflow: clip; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.error-visual img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.error-visual .big-404 {
  position: absolute; font-family: var(--font-head); font-size: clamp(6rem, 4rem + 12vw, 14rem);
  color: rgba(245,239,228,0.08); font-weight: 600; z-index: 0; user-select: none; line-height: 1;
}
.error-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(2.5rem, 2rem + 3vw, 5rem) clamp(20px, 4vw, 4rem); }
.error-content .eyebrow { color: var(--terracotta); }
.error-content h1 { font-size: var(--h1-article-size); margin-bottom: 0.4em; }
.error-content .handwritten { font-family: var(--font-head); font-style: italic; color: var(--terracotta); font-size: 1.15rem; margin: 1.4em 0; }
.error-links { list-style: none; margin: 1.6em 0 0; padding: 0; display: grid; gap: 0.2em; }
.error-links a { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.6em 0; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reading-meta { display: flex; flex-wrap: wrap; gap: 0.4em 1.2em; align-items: center; font-size: 0.88rem; color: var(--text-muted); margin: var(--sp-2) 0 var(--sp-4); }
.reading-meta .dot::before { content: "\2022"; margin-right: 1.2em; opacity: 0.5; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 250; background: rgba(23,26,24,0.55);
  display: none; align-items: flex-start; justify-content: center; padding: 10vh 20px 0;
}
.search-overlay.is-open { display: flex; }
.search-panel { background: var(--cream); border-radius: var(--radius); width: min(100%, 640px); box-shadow: var(--shadow-editorial); padding: 1.4rem; max-height: 70vh; display: flex; flex-direction: column; }
.search-panel input { width: 100%; font-family: var(--font-head); font-size: 1.5rem; border: none; border-bottom: 2px solid var(--border-strong); padding: 0.4em 0; background: transparent; color: var(--ink); }
.search-panel input:focus { outline: none; border-color: var(--terracotta); }
.search-results { margin-top: 1em; overflow-y: auto; list-style: none; padding: 0; }
.search-results li a { display: block; padding: 0.75em 0.3em; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--border); }
.search-results li a:hover { color: var(--deep-navy); }
.search-results .r-title { font-weight: 700; }
.search-results .r-desc { font-size: 0.85rem; color: var(--text-muted); }
.search-empty { color: var(--text-muted); padding: 0.75em 0.3em; font-size: 0.9rem; }

/* ---------- Restrained reveal motion ----------
   Gated behind .js-anim (added by an inline script in <head>) so content is
   never hidden if JavaScript is unavailable — progressive enhancement, not a
   dependency. main.js also force-reveals everything after a short timeout as
   a safety net in case IntersectionObserver never fires. */
.js-anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js-anim .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js-anim .hero-ed-panel { animation: heroFadeIn .8s cubic-bezier(.2,.7,.2,1) both; }
.js-anim .hero-ed-detail { animation: heroFadeIn 1s .15s cubic-bezier(.2,.7,.2,1) both; }
@keyframes heroFadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; }
  .js-anim .hero-ed-panel, .js-anim .hero-ed-detail { animation: none; }
}
