/* The Pasar Week — Dapur Pak Bayu
   Palette: daun (banana leaf), kunyit (turmeric), cabai (chili), kapur (lime-wash), tinta (ink) */

:root {
  --daun: #16382a;
  --daun-soft: #214a38;
  --kunyit: #edaf1f;
  --kunyit-deep: #c78d00;
  --cabai: #cf3322;
  --kapur: #f1f4ea;
  --kapur-deep: #e3e8d8;
  --tinta: #15211b;
  --tinta-soft: #44524a;
  --nota: #fbfaf3;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;
  --receipt: "Courier Prime", "Courier New", monospace;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 62ch;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--kapur);
  color: var(--tinta);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--cabai);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "wdth" 88;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 7.4vw, 5.9rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 750; }
h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.brand {
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.topbar nav { display: flex; gap: 1.5rem; font-family: var(--display); font-weight: 560; font-size: 0.98rem; }
.topbar nav a { text-decoration: none; padding-block: 0.35rem; border-bottom: 2px solid transparent; }
.topbar nav a:hover { border-color: var(--kunyit); }
@media (max-width: 640px) { .topbar nav a:not(.keep) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  padding: 1.1rem 1.7rem;
  border-radius: 999px;
  border: 2px solid var(--tinta);
  background: var(--kunyit);
  color: var(--tinta);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--tinta);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--tinta); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--tinta); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--tinta); }
.btn-dark { background: var(--tinta); color: var(--kapur); box-shadow: 0 4px 0 var(--kunyit-deep); border-color: var(--tinta); }
.btn-dark:hover { box-shadow: 0 2px 0 var(--kunyit-deep); }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3.5rem, 8vw, 6rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero h1 { margin-bottom: 0.35em; }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.6; color: var(--tinta-soft); max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; margin-top: 2rem; }
.hero-price { font-family: var(--display); font-weight: 650; font-size: 1.05rem; line-height: 1.35; }
.hero-price .was { font-weight: 500; font-size: 0.55em; letter-spacing: 0; color: var(--tinta-soft); text-decoration-thickness: 2px; text-decoration-color: var(--cabai); margin-right: 0.15em; }
.deal { display: inline-block; margin-bottom: 0.45rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--cabai); color: #fff; font-size: 0.85rem; font-weight: 650; line-height: 1.4; }
.sticky-buy .was { color: #b9c8bd; font-weight: 500; text-decoration-color: var(--kunyit); }
.nota [data-discount-row] span:last-child { color: var(--cabai); font-weight: 700; }
.hero-price strong { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }

.arch {
  position: relative;
  width: min(100%, 440px);
  margin-inline: auto;
  isolation: isolate;
}
.arch::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(20px, 20px);
  background: var(--kunyit);
  border-radius: 999px 999px 18px 18px;
  z-index: -1;
}
.arch img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 999px 999px 18px 18px;
  border: 2px solid var(--tinta);
  background: var(--daun);
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .arch { width: min(78%, 360px); margin-inline: 0 auto; order: -1; margin-bottom: 1.25rem; }
}

/* ---------- how it works (a real sequence, so numbered) ---------- */
.band-daun { background: var(--daun); color: var(--kapur); }
.band-daun .lede, .band-daun p { color: #d3dfd4; }
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--kunyit); padding-top: 1.25rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--kunyit);
  margin-bottom: 0.6rem;
}
.steps h3 { color: #fff; }
.steps p { margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- inside ---------- */
.inside-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.inside-list { list-style: none; margin: 0; padding: 0; }
.inside-list li { padding: 1.4rem 0; border-bottom: 1.5px dashed var(--tinta-soft); display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.75rem; }
.inside-list li:first-child { padding-top: 0; }
.inside-list svg { width: 1.7rem; height: 1.7rem; margin-top: 0.15rem; color: var(--cabai); }
.inside-list h3 { margin-bottom: 0.2em; }
.inside-list p { margin: 0; color: var(--tinta-soft); }
@media (max-width: 820px) { .inside-grid { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.about { position: relative; color: #fff; background: var(--tinta); overflow: hidden; }
.about-photo { position: absolute; inset: 0; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@media (min-width: 761px) { .about-photo img { width: 84%; margin-left: 16%; } }
.about-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #15211b 0%, #15211b 24%, rgba(21,33,27,0.72) 40%, rgba(21,33,27,0.08) 70%); }
.about .wrap { position: relative; padding-block: clamp(4rem, 10vw, 8rem); min-height: clamp(26rem, 48vw, 36rem); display: flex; align-items: center; }
.about-copy { max-width: 34rem; }
.about-copy p { color: #e6ece6; }
.fine { font-size: 0.9rem; color: var(--tinta-soft); }
.about .fine { color: #b9c8bd; }
@media (max-width: 760px) {
  .about-photo::after { background: linear-gradient(0deg, rgba(14,24,19,0.95) 30%, rgba(14,24,19,0.35) 100%); }
  .about .wrap { align-items: flex-end; }
}

/* ---------- buy / nota ---------- */
.buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.buy-points { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.buy-points li { display: flex; gap: 0.75rem; padding: 0.55rem 0; }
.buy-points svg { flex: none; width: 1.4rem; height: 1.4rem; margin-top: 0.25rem; color: var(--daun-soft); }

.nota {
  position: relative;
  background: var(--nota);
  border: 2px solid var(--tinta);
  border-radius: 6px 6px 0 0;
  padding: 1.75rem 1.75rem 2.4rem;
  font-family: var(--receipt);
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 10px 10px 0 var(--kunyit);
  transform: rotate(0.6deg);
}
.nota::after {
  /* torn paper edge */
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: -14px; height: 14px;
  background:
    linear-gradient(135deg, var(--nota) 7px, transparent 0) 0 0 / 14px 14px repeat-x,
    linear-gradient(225deg, var(--nota) 7px, transparent 0) 0 0 / 14px 14px repeat-x;
  filter: drop-shadow(0 2px 0 var(--tinta));
}
.nota h3 { font-family: var(--receipt); font-weight: 700; font-size: 1.25rem; letter-spacing: 0; margin: 0; text-align: center; font-variation-settings: normal; }
.nota .sub { text-align: center; margin: 0 auto 1rem; font-size: 0.92rem; color: var(--tinta-soft); }
.nota hr { border: 0; border-top: 2px dashed var(--tinta); margin: 1rem 0; }
.nota .row { display: flex; justify-content: space-between; gap: 1rem; margin: 0; max-width: none; }
.nota .row.total { font-weight: 700; font-size: 1.25rem; margin-top: 0.35rem; }
.nota .row span:first-child { min-width: 0; }
.nota .thanks { text-align: center; margin: 1.25rem 0 0; font-size: 0.9rem; color: var(--tinta-soft); max-width: none; }

.pay { display: grid; gap: 0.9rem; margin-top: 1.4rem; font-family: var(--display); }
.pay .or { text-align: center; font-size: 0.95rem; color: var(--tinta-soft); display: flex; align-items: center; gap: 0.8rem; }
.pay .or::before, .pay .or::after { content: ""; flex: 1; border-top: 1.5px solid var(--tinta-soft); opacity: 0.5; }
.pay-note { font-size: 0.88rem; line-height: 1.5; color: var(--tinta-soft); margin: 0; font-family: var(--body); }
.pay-msg { font-family: var(--body); font-size: 0.95rem; padding: 0.8rem 1rem; border-radius: 8px; background: #fde9e5; border: 1.5px solid var(--cabai); margin: 0; max-width: none; }
.pay-msg[hidden] { display: none; }
#paypal-buttons { min-height: 48px; }

@media (max-width: 900px) { .buy-grid { grid-template-columns: 1fr; } .nota { transform: none; } }

/* ---------- reviews ---------- */
.reviews-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.review-list { display: grid; gap: 1.25rem; }
#review-summary:not(:empty) { margin-bottom: 0.9rem; font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--tinta); }
.review { background: #fff; border: 2px solid var(--tinta); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.review p { margin: 0.5rem 0 0.75rem; }
.review .who { font-family: var(--display); font-weight: 650; font-size: 0.98rem; margin: 0; }
.review .when { color: var(--tinta-soft); font-weight: 400; }
.stars { display: inline-flex; gap: 2px; color: var(--cabai); }
.stars svg { width: 1.15rem; height: 1.15rem; }
.stars .off { color: var(--kapur-deep); }
.empty { border: 2px dashed var(--tinta-soft); border-radius: var(--radius); padding: 1.75rem; background: transparent; }
.empty h3 { margin-bottom: 0.3em; }
.empty p { margin: 0; color: var(--tinta-soft); }

.review-form { background: var(--kapur-deep); border: 2px solid var(--tinta); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; }
.review-form h3 { margin: 0; }
.field { display: grid; gap: 0.35rem; font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.field input, .field textarea {
  font: inherit; font-family: var(--body); font-weight: 400;
  padding: 0.75rem 0.9rem; border: 2px solid var(--tinta); border-radius: 10px; background: #fff; color: var(--tinta); width: 100%;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.rating { border: 0; margin: 0; padding: 0; min-width: 0; }
.rating legend { font-family: var(--display); font-weight: 600; font-size: 0.98rem; margin-bottom: 0.35rem; padding: 0; }
.stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.15rem; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label { cursor: pointer; color: var(--kapur); -webkit-text-stroke: 0; line-height: 0; }
.rating label svg { width: 2.1rem; height: 2.1rem; stroke: var(--tinta); stroke-width: 1.5; fill: #fff; }
.rating input:checked ~ label svg, .rating label:hover svg, .rating label:hover ~ label svg { fill: var(--kunyit); }
.rating input:focus-visible + label { outline: 3px solid var(--cabai); outline-offset: 2px; border-radius: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-family: var(--display); font-weight: 600; max-width: none; }
.form-msg.ok { color: var(--daun-soft); }
.form-msg.bad { color: var(--cabai); }
@media (max-width: 860px) { .reviews-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; }
.faq details { border-bottom: 2px solid var(--tinta); }
.faq details:first-of-type { border-top: 2px solid var(--tinta); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 1.3rem 3rem 1.3rem 0; position: relative;
  font-family: var(--display); font-weight: 650; font-size: 1.28rem; line-height: 1.25; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.2rem; top: 50%; width: 1.5rem; height: 1.5rem; margin-top: -0.75rem;
  background:
    linear-gradient(var(--tinta), var(--tinta)) center / 100% 2.5px no-repeat,
    linear-gradient(var(--tinta), var(--tinta)) center / 2.5px 100% no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 1.4rem; color: var(--tinta-soft); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.footer { background: var(--tinta); color: #cdd8cf; padding-block: 2.5rem 6rem; font-size: 0.95rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer a { color: #fff; }
.footer p { margin: 0 0 0.4rem; max-width: 46ch; }

/* ---------- sticky mobile buy bar ---------- */
.sticky-buy {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem var(--gutter); background: var(--tinta); color: #fff;
  font-family: var(--display); font-weight: 650;
  transform: translateY(110%); transition: transform 0.25s ease;
}
.sticky-buy.show { transform: translateY(0); }
.sticky-buy .btn { padding: 0.85rem 1.3rem; font-size: 1rem; box-shadow: none; }
@media (max-width: 760px) { .sticky-buy { display: flex; } }
@media (prefers-reduced-motion: reduce) { .sticky-buy { transition: none; } }

/* ---------- policy + success pages ---------- */
.prose { max-width: 46rem; padding-block: 2rem 5rem; }
.prose h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.5rem; }
.prose ul { padding-left: 1.2rem; max-width: var(--measure); }
.prose li { margin-bottom: 0.5rem; }
.toc { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-family: var(--display); font-weight: 600; margin: 1.5rem 0 0; padding: 0; list-style: none; }

.success { max-width: 40rem; padding-block: 3rem 6rem; }
.success .nota { transform: none; margin-top: 1.5rem; box-shadow: 8px 8px 0 var(--kunyit); }
.success .btn { margin-top: 1rem; }
.success .state[hidden] { display: none; }
