/* Diabetter landing page. Mobile-first; huruf besar dan kontras tinggi untuk pembaca yang lebih tua. */

@font-face { font-family: "Righteous"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/righteous-400.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ubuntu-400.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ubuntu-500.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/ubuntu-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --brown: #603814;
  --brown-dark: #3f2409;
  --green: #2e7d32;
  --green-dark: #1b5e20;
  --gold: #cba26c;
  --cream: #fff9ee;
  --sand: #f6eedc;
  --white: #ffffff;
  --ink: #2a2118;
  --muted: #5a4e40;
  --line: #d9c9ad;
  --error: #b3261e;
  --mint: #e9f4ea;
  --mint-line: #bcdcbe;
  --amber: #fff3d6;
  --amber-soft: #fff6e3;
  --red-dark: #8a1c14;
  --error-bg: #fff5f4;
  --field-bg: #fffdf8;
  --field-line: #8a7b66;
  --on-brown: #f1e4cf;
  --on-brown-dark: #eadfcb;
  --on-brown-dark-muted: #d9cbb2;
  --link-hover-green: #8fd694;
  --focus: #1a73e8;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(96, 56, 20, 0.12);
  --font-head: "Righteous", "Ubuntu", system-ui, sans-serif;
  --font-body: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem; /* 18px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  padding-bottom: 88px; /* ruang untuk bar CTA bawah di HP */
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-head); font-weight: 400; color: var(--brown); line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 7.2vw, 3rem); }
h2 { font-size: clamp(1.6rem, 5.6vw, 2.25rem); text-align: center; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a, button, summary, input, label { touch-action: manipulation; }
a { color: var(--green-dark); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 18px; }
.section { padding-block: 44px; }
.section--sand { background: var(--sand); }
.section--white { background: var(--white); }
.lead { font-size: 1.2rem; color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { font-family: var(--font-head); font-size: 1.6rem; color: var(--brown); text-decoration: none; letter-spacing: 0.01em; }
.brand span { color: var(--green); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 14px 26px; border: 0; border-radius: 14px; cursor: pointer;
  font: 700 1.2rem/1.2 var(--font-body); text-decoration: none; text-align: center;
  background: var(--green); color: var(--white); box-shadow: 0 4px 0 var(--green-dark), 0 8px 18px rgba(27, 94, 32, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-dark); }
.btn[disabled] { opacity: 0.75; cursor: progress; }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 48px; padding: 10px 18px; font-size: 1.05rem; box-shadow: none; }
.btn svg { width: 26px; height: 26px; flex: none; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%); padding-block: 28px 40px; }
.hero .wrap { display: grid; gap: 26px; }
.chip {
  display: inline-block; background: var(--mint); color: var(--green-dark); font-weight: 700; font-size: 1rem;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; border: 1px solid var(--mint-line);
}
.hero-sub { font-size: 1.22rem; color: var(--muted); margin-bottom: 20px; }
.hero-note { font-size: 1rem; color: var(--muted); margin: 10px 0 0; }
.hero-photo { position: relative; max-width: 520px; margin-inline: auto; width: 100%; }
.hero-photo img { border-radius: 24px; box-shadow: var(--shadow); aspect-ratio: 1 / 1; object-fit: cover; }
.trust { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.trust li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.trust li::before {
  content: ""; flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* ---------- Otoritas ---------- */
.authority { display: grid; gap: 22px; align-items: center; }
.authority img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.authority h2 { text-align: left; }

/* ---------- Harga ---------- */
.pricing { display: grid; gap: 18px; margin: 26px 0 8px; }
.price-card {
  background: var(--white); border: 2px solid var(--line); border-radius: 20px; padding: 24px 20px; text-align: center; position: relative;
}
.price-card--best { border-color: var(--green); box-shadow: var(--shadow); }
.badge {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--green); color: var(--white);
  font-weight: 700; font-size: 0.98rem; padding: 5px 16px; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { margin-bottom: 6px; }
.price-old { text-decoration: line-through; color: var(--red-dark); font-size: 1.3rem; margin: 0; }
.price-now, .price-old { font-variant-numeric: tabular-nums; }
.price-now { font-family: var(--font-head); font-size: clamp(2.3rem, 9vw, 3rem); color: var(--green-dark); margin: 0; line-height: 1.1; }
.price-note { color: var(--muted); font-size: 1rem; margin: 6px 0 0; }
.fine { font-size: 1rem; color: var(--muted); text-align: center; }

/* ---------- Form ---------- */
.form-card { background: var(--white); border: 2px solid var(--line); border-radius: 22px; padding: 24px 20px; box-shadow: var(--shadow); max-width: 560px; margin: 22px auto 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--brown); }
.field input {
  width: 100%; min-height: 58px; padding: 12px 16px; font: 400 1.2rem var(--font-body); color: var(--ink);
  background: var(--field-bg); border: 2px solid var(--field-line); border-radius: 12px;
}
.field input:focus { border-color: var(--green); outline: 3px solid rgba(46, 125, 50, 0.3); }
.field .hint { font-size: 0.98rem; color: var(--muted); margin: 4px 0 0; }
.field .error { color: var(--error); font-weight: 700; margin: 0; }
.field .error:not(:empty) { margin-top: 6px; }
.field.invalid input { border-color: var(--error); background: var(--error-bg); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { font-size: 0.98rem; color: var(--muted); margin: 14px 0 0; text-align: center; }
.alt-link { display: block; margin-top: 14px; text-align: center; font-weight: 500; }
.fallback { margin-top: 14px; padding: 14px; background: var(--amber); border-radius: 12px; font-weight: 500; text-align: center; }
.fallback[hidden] { display: none; }

/* ---------- Kartu alasan ---------- */
.cards { display: grid; gap: 16px; margin-top: 26px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; display: flex; gap: 16px; align-items: flex-start; }
.card img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.card p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- Bahan ---------- */
.ingredients { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
.ingredients li { text-align: center; font-weight: 700; color: var(--brown); line-height: 1.3; }
.ingredients img { width: min(150px, 100%); aspect-ratio: 1; margin: 0 auto 10px; }

/* ---------- Cara pakai ---------- */
.howto { max-width: 760px; margin: 26px auto 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.howto li { background: var(--white); border-left: 6px solid var(--green); border-radius: 10px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(96, 56, 20, 0.07); }
.howto li.warn { border-left-color: var(--brown); background: var(--amber-soft); font-weight: 500; }

/* ---------- Testimoni ---------- */
.testimonials { display: grid; gap: 28px; margin-top: 26px; justify-items: center; }
.testimonial { max-width: 340px; width: 100%; text-align: center; }
.testimonial img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); width: 100%; }
.testimonial figcaption { margin-top: 10px; font-weight: 500; color: var(--muted); }

/* ---------- Langkah ---------- */
.steps { counter-reset: step; list-style: none; margin: 26px auto 0; padding: 0; display: grid; gap: 16px; max-width: 820px; }
.steps li { counter-increment: step; display: flex; gap: 16px; align-items: flex-start; background: var(--white); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.steps li::before {
  content: counter(step); flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--brown); color: var(--white);
  font: 400 1.5rem/46px var(--font-head); text-align: center;
}
.steps strong { display: block; color: var(--brown); font-size: 1.15rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 26px auto 0; display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 54px 18px 18px; min-height: 58px; list-style: none; position: relative; color: var(--brown); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; line-height: 1; color: var(--green-dark); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 18px 18px; color: var(--muted); }

/* ---------- Penutup ---------- */
.final { background: var(--brown); color: #fff; text-align: center; }
.final h2 { color: #fff; }
.final .lead { color: var(--on-brown); }
.final .form-card { text-align: left; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown-dark); color: var(--on-brown-dark); padding-block: 36px; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer address { font-style: normal; margin-bottom: 14px; }
.site-footer .brand { color: #fff; display: inline-block; margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0; }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 14px; margin-top: 14px; font-size: 0.95rem; color: var(--on-brown-dark-muted); }

/* ---------- Bar CTA bawah (HP) ---------- */
.sticky-cta {
  position: fixed; inset: auto 0 0 0; z-index: 40; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(110%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.sticky-cta.show { transform: none; visibility: visible; transition-delay: 0s; }
.sticky-cta .btn { width: 100%; }

/* ---------- Modal ---------- */
dialog.modal { border: 0; border-radius: 22px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
dialog.modal::backdrop { background: rgba(30, 18, 6, 0.6); }
.modal-inner { padding: 24px 20px 22px; background: var(--cream); }
.modal-close {
  position: absolute; top: 8px; right: 8px; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #fff; cursor: pointer;
  font-size: 2rem; line-height: 1; color: var(--brown); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.modal h2 { text-align: left; font-size: 1.55rem; padding-right: 48px; }

/* ---------- Tablet ke atas ---------- */
@media (min-width: 720px) {
  body { padding-bottom: 0; font-size: 1.1875rem; }
  .section { padding-block: 72px; }
  .header-cta { display: inline-flex; }
  .sticky-cta { display: none; }
  .hero { padding-block: 56px 72px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
  .authority { grid-template-columns: 0.9fr 1.1fr; gap: 48px; }
  .pricing { grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 820px; margin-inline: auto; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .ingredients { grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
  .ingredients img { width: 170px; }
  .testimonials { grid-template-columns: repeat(2, 1fr); align-items: start; max-width: 820px; margin-inline: auto; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; text-align: left; }
  .btn:not(.btn--block):not(.btn--sm) { min-width: 340px; }
  .form-card { padding: 32px 30px; }
}

@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .card { flex-direction: column; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .sticky-cta { transition: none; }
}
