/* ============================================================
   CounterFat — design system. Token dari app/brand_kit.py (SSOT).
   Selera: premium-minimalis ala Apple — netral (krem) dominan + 1 aksen (amber),
   whitespace berani, 1 pesan/1 aksi per section, detail obsesif. Acuan: Aesop / The Nue Co.
   ============================================================ */

/* — Font self-host (woff2, OFL). Sumber static .ttf = app/assets/fonts (SSOT brand_kit). —
   Self-host = nol request eksternal + nol FOUT swap (LCP & CLS lebih baik). */
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/PlayfairDisplay-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/PlusJakartaSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/PlusJakartaSans-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/PlusJakartaSans-Bold.woff2") format("woff2");
}

:root {
  /* — Warna: krem netral dominan · hijau struktural (peran near-black) · amber = 1 AKSEN — */
  --bg:        #F6F1E7;   /* krem hangat — latar utama */
  --bg-sink:   #EFE9DB;   /* krem lebih dalam — band selang-seling */
  --green:     #28503B;   /* hijau apothecary — heading & struktur (jangkar) */
  --green-700: #1E4230;   /* hover */
  --ink:       #1E2A22;   /* teks utama (near-black, bukan #000) */
  --muted:     #5A6B5F;   /* teks sekunder (sage) */
  --subtle:    #8A9590;   /* teks tersier / hint */
  --line:      #DED7C7;   /* garis tipis di krem */
  --accent:    #C8862B;   /* amber — SATU aksen, ditahan (garis/nomor/aksen kecil) */
  /* dark surface (klimaks) */
  --dark:        #163024;
  --on-dark:     #F4EFE3;
  --on-dark-mut: #AEBCAF;
  --on-dark-line:#2C4A3A;

  /* — Skala spasi (basis 4/8) — */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* — Ritme & ukuran — */
  --measure: 60ch;        /* lebar baca ~60–75 karakter */
  --maxw: 1080px;
  --section-y: clamp(64px, 11vw, 128px);
  --radius: 999px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(40,80,59,0.16); color: var(--ink); }
svg, img { max-width: 100%; }

/* fokus keyboard (a11y) */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--green); color: var(--bg);
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; font-weight: 600; font-size: 14px; }
.skip:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s6); }
@media (max-width: 600px){ .wrap { padding: 0 var(--s5); } }

/* ---------------- Tipografi ---------------- */
h1, h2, h3, .wordmark, .display {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--green);
  font-weight: 600; line-height: 1.12; letter-spacing: -0.012em;
}
.kicker {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--muted);
}
p { max-width: var(--measure); }
a { color: var(--green); text-decoration: none; transition: color .15s var(--ease), opacity .15s var(--ease); }
em { font-style: italic; }

/* ---------------- Mark (tetes) ---------------- */
.mark { display: inline-flex; align-items: center; gap: 10px; }
.mark svg { width: 23px; height: 29px; display: block; flex: none; }
.wordmark { font-size: 22px; letter-spacing: -0.01em; }

/* ---------------- Header ---------------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,231,0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
header.site.scrolled { border-bottom-color: var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
header.site nav { display: flex; align-items: center; gap: var(--s6); }
header.site nav a.navlink { font-size: 14px; font-weight: 600; color: var(--ink); }
header.site nav a.navlink:hover { color: var(--green); }
@media (max-width: 680px){ header.site nav a.navlink { display: none; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  border: 1.5px solid var(--green);
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--solid { background: var(--green); color: var(--bg); }
.btn--solid:hover { background: var(--green-700); border-color: var(--green-700); }
.btn--ghost { color: var(--green); background: transparent; }
.btn--ghost:hover { background: var(--green); color: var(--bg); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
/* di atas permukaan gelap */
.on-dark .btn--solid { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.on-dark .btn--solid:hover { background: #fff; border-color: #fff; }
.on-dark .btn--ghost { color: var(--on-dark); border-color: rgba(244,239,227,0.45); }
.on-dark .btn--ghost:hover { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }

/* link tenang (aksi sekunder, bukan tombol) */
.qlink { font-weight: 600; font-size: 15px; color: var(--green); border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.qlink:hover { color: var(--green-700); }
.qlink .arrow { transition: transform .2s var(--ease); display: inline-block; }
.qlink:hover .arrow { transform: translateX(3px); }

/* ---------------- Sections ---------------- */
section { padding: var(--section-y) 0; scroll-margin-top: 88px; }
section.sink { background: var(--bg-sink); }
.section-head { margin-bottom: clamp(28px, 5vw, 56px); }
.section-head .kicker { display: block; margin-bottom: var(--s3); }
.section-head h2 { font-size: clamp(28px, 5.2vw, 44px); max-width: 18ch; }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; text-align: center;
  padding: clamp(80px, 15vw, 152px) 0 clamp(64px, 11vw, 116px); }
.hero .watermark {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: min(440px, 80vw); opacity: .045; color: var(--green); pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .kicker { display: block; margin-bottom: var(--s6); }
.hero h1 { font-size: clamp(44px, 9vw, 84px); }
.hero .lede { max-width: 32ch; margin: var(--s5) auto 0; color: var(--ink); font-size: clamp(17px, 2.1vw, 19px); }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: center; align-items: center; margin-top: var(--s7); }

/* ---------------- Manifesto ---------------- */
.manifesto { text-align: center; }
.manifesto .kicker { display: block; margin-bottom: var(--s5); }
.manifesto .display { font-size: clamp(27px, 5.2vw, 48px); max-width: 20ch; margin: 0 auto var(--s5); line-height: 1.2; }
.manifesto .rule { width: 36px; height: 2px; background: var(--accent); margin: 0 auto var(--s6); border: 0; }
.manifesto p { margin: 0 auto; color: var(--ink); font-size: clamp(17px, 2.1vw, 19px); max-width: 52ch; }

/* ---------------- Apa itu (2 kolom) ---------------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 88px); align-items: center; }
.split .col-visual { display: flex; justify-content: center; }
.split .col-visual svg { width: clamp(140px, 22vw, 200px); height: auto; color: var(--green); }
@media (max-width: 760px){ .split { grid-template-columns: 1fr; gap: var(--s7); } .split .col-visual { order: -1; } }

/* ---------------- Ritual (langkah) ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px); }
@media (max-width: 720px){ .steps { grid-template-columns: 1fr; gap: var(--s6); } }
.step .num { font-family: "Playfair Display", serif; font-size: 16px; color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1.5px solid var(--accent); border-radius: var(--radius); margin-bottom: var(--s4); }
.step h3 { font-size: 21px; margin-bottom: var(--s1); }
.step p { color: var(--muted); }
.ritual-note { margin-top: clamp(36px, 5vw, 56px); padding-top: var(--s5);
  border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; max-width: 56ch; }

/* ---------------- Pilar ---------------- */
.pillars { display: grid; gap: 0; }
.pillar { display: grid; grid-template-columns: auto 1fr; gap: var(--s5); padding: var(--s6) 0; border-top: 1px solid var(--line); }
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar .dot { width: 8px; height: 8px; border-radius: var(--radius); background: var(--accent); margin-top: 12px; }
.pillar h3 { font-size: 22px; margin-bottom: var(--s1); }
.pillar p { color: var(--muted); }

/* ---------------- Panduan ritual (first-party capture) ---------------- */
.capture { text-align: center; }
.capture .kicker { display: block; margin-bottom: var(--s4); }
.capture h2 { font-size: clamp(28px, 5.2vw, 44px); max-width: 18ch; margin: 0 auto; }
.capture p { margin: var(--s5) auto 0; color: var(--ink); font-size: clamp(17px, 2.1vw, 19px); max-width: 46ch; }
.capture .actions { margin-top: var(--s6); display: flex; justify-content: center; }

/* ---------------- Sertifikasi ---------------- */
.trust { display: flex; flex-wrap: wrap; gap: clamp(28px, 6vw, 72px); justify-content: center; text-align: center; }
.trust .item .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--green); font-weight: 600; margin-bottom: var(--s2); }
.trust .item .val { color: var(--muted); font-size: 14px; }

/* ---------------- CTA gelap (klimaks) ---------------- */
.cta-dark { background: var(--dark); color: var(--on-dark); text-align: center; position: relative; overflow: hidden; }
.cta-dark .watermark { position: absolute; left: 50%; bottom: -36%; transform: translateX(-50%);
  width: min(520px, 90vw); opacity: .06; color: var(--on-dark); pointer-events: none; }
.cta-dark .wrap { position: relative; z-index: 1; }
.cta-dark .kicker { color: var(--on-dark-mut); display: block; margin-bottom: var(--s4); }
.cta-dark h2 { color: var(--on-dark); font-size: clamp(30px, 5.6vw, 50px); max-width: 20ch; margin: 0 auto; }
.cta-dark p { color: var(--on-dark-mut); margin: var(--s4) auto 0; max-width: 46ch; }
.cta-dark .stores { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; margin-top: var(--s7); }

/* ---------------- Footer ---------------- */
footer.site { border-top: 1px solid var(--line); padding: var(--s8) 0 var(--s8); color: var(--muted); font-size: 14px; }
footer.site .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s5); align-items: flex-start; }
footer.site .tagline { color: var(--muted); margin-top: var(--s2); max-width: 24ch; }
footer.site .links { display: flex; flex-wrap: wrap; gap: var(--s5); }
footer.site .links a { color: var(--muted); font-weight: 600; }
footer.site .links a:hover { color: var(--green); }
footer.site .legal-no { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); line-height: 1.9; color: var(--muted); }

/* ---------------- Halaman 404 ---------------- */
.notfound { text-align: center; padding: clamp(72px, 14vw, 140px) 0 clamp(64px, 11vw, 120px); }
.notfound .kicker { display: block; margin-bottom: var(--s4); color: var(--accent); }
.notfound h1 { font-size: clamp(34px, 7vw, 56px); }
.notfound p { margin: var(--s5) auto 0; color: var(--muted); max-width: 40ch; }
.notfound .actions { margin-top: var(--s7); display: flex; justify-content: center; }

/* ---------------- Halaman legal ---------------- */
.legal { padding: clamp(56px, 9vw, 96px) 0 var(--s8); }
.legal h1 { font-size: clamp(30px, 7vw, 46px); }
.legal .updated { color: var(--muted); font-size: 14px; margin-top: var(--s2); }
.legal h2 { font-size: 22px; margin: var(--s7) 0 var(--s3); }
.legal p, .legal li { color: var(--ink); margin-bottom: var(--s3); max-width: 68ch; }
.legal ul { padding-left: var(--s5); }
.legal .back { display: inline-block; margin-top: var(--s2); font-size: 14px; font-weight: 600; }

/* ---------------- Reveal (motion halus) ---------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
