/* =========================
   TIARATOTO — app.css (FINAL)
   Fokus: A11y/Performance
   ========================= */

/* --- Theme tokens --- */
:root{
  --bg:#0c0b0c;
  --fg:#f8f8f8;
  --muted:#b5b5b5;
  --accent:#ff244f;         /* bisa dipakai untuk badge/aksen kecil */
  --card:#111;
  --stroke:#242424;

  /* CTA khusus (kontras aman di dark UI) */
  --cta:#b00020;            /* merah gelap */
  --cta-hover:#9a001c;      /* hover sedikit lebih gelap */
  --cta-border:#7f0a1f;     /* border definisi */
  --cta-focus:#ffd6df;      /* focus ring */
}

/* --- Resets & base --- */
*{box-sizing:border-box}
html,body{
  margin:0; padding:0; background:var(--bg); color:var(--fg);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif
}
a{color:var(--fg); text-underline-offset:3px}
a:hover{color:#fff}
img{max-width:100%; height:auto; display:block}
img[width][height]{aspect-ratio: attr(width number) / attr(height number)}
html{scroll-behavior:smooth}
html,body{overflow-x:hidden}
.container{max-width:1120px; margin:auto; padding-inline:16px}
.footer{padding:32px 0; color:var(--muted)}

/* --- Header & nav --- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(12,12,12,.8);
  backdrop-filter:saturate(160%) blur(8px);
  border-bottom:1px solid var(--stroke)
}
.navbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; min-height:58px
}
.brand{display:inline-flex; align-items:center; gap:8px; text-decoration:none}
.brand .logo{height:32px; width:auto}

/* Desktop top-nav (tampil ≥ 901px) */
.desktop-nav{display:none; align-items:center; gap:12px}
.desktop-nav a{
  padding:.6rem .9rem; min-height:48px;
  border-radius:.65rem; text-decoration:none; color:var(--muted)
}
.desktop-nav a:hover{background:#1c1c1c; color:#fff}

/* --- Buttons --- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.8rem 1.05rem; min-height:48px;    /* target sentuh ≥48px */
  border-radius:.9rem; border:1px solid #333; background:#2a2a2a;
  color:#fff; text-decoration:none; line-height:1.1;
  transition:transform .15s ease, filter .15s ease, background .15s ease
}
.btn:visited{color:#fff}
.btn:hover{filter:brightness(1.05)}
.btn:focus-visible{outline:3px solid rgba(255,255,255,.35); outline-offset:2px}

/* CTA high-contrast (WCAG AA) */
.btn.cta{
  background:var(--cta);
  border-color:var(--cta-border);
  color:#fff;
    text-transform: uppercase;   /* ubah ke huruf kapital */
  font-weight: 800;            /* tebalkan */
  letter-spacing: .4px;        /* renggangkan sedikit */
}
.btn.cta:hover{background:var(--cta-hover); filter:none; transform:translateY(-1px)}
.btn.cta:active{transform:translateY(0)}
.btn.cta:focus-visible{outline:3px solid var(--cta-focus); outline-offset:2px}

/* --- Hero --- */
.hero{display:grid; gap:24px; align-items:center; margin-block:28px}
.hero-media{max-width:520px; justify-self:center}
.hero-copy h1{margin:0 0 8px; font-size:clamp(28px,4vw,40px); line-height:1.2}
.lead{color:var(--muted); max-width:62ch}
@media (min-width:900px){
  .hero{grid-template-columns:minmax(280px,520px) 1fr}
}

/* --- Sections & grids --- */
.section{padding-block:42px; border-top:1px solid var(--stroke)}
.section:first-of-type{border-top:0}
.section h2{font-size:clamp(22px,3.2vw,28px); margin:0 0 12px}
.section .sub{color:var(--muted); margin:0 0 18px}

.grid{display:grid; gap:14px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:900px){ .grid-2,.grid-3,.grid-4{grid-template-columns:1fr} }

.badges{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.badge{
  padding:.35rem .6rem; border:1px solid var(--stroke); border-radius:999px;
  background:#141414; color:#d6d6d6; font-size:.9rem
}

.feature{
  display:grid; gap:8px; border:1px solid var(--stroke); border-radius:12px;
  background:linear-gradient(180deg,#101010,#0d0d0d); padding:14px
}
.feature .ico{
  width:40px; height:40px; border-radius:10px; background:#171717;
  border:1px solid #2b2b2b; display:grid; place-items:center; font-size:18px
}
.feature h3{margin:0}

.steps{counter-reset:step}
.step{
  display:grid; grid-template-columns:48px 1fr; gap:12px; align-items:start;
  border:1px dashed #333; border-radius:12px; padding:12px
}
.step .num{
  width:48px; height:48px; border-radius:12px; background:#1a1a1a;
  border:1px solid #2c2c2c; display:grid; place-items:center; font-weight:700
}
.step .num:before{counter-increment:step; content:counter(step)}

.promo{display:grid; gap:10px; border:1px solid var(--stroke); border-radius:12px; background:#121212; padding:14px}
.promo h3{margin:0 0 6px}

.table{
  width:100%; border-collapse:collapse; overflow:hidden;
  border-radius:12px; border:1px solid var(--stroke)
}
.table th,.table td{padding:10px; border-bottom:1px solid #242424; text-align:left}
.table th{background:#121212}
.table tr:last-child td{border-bottom:0}

.testi{display:grid; gap:12px}
.quote{border:1px solid var(--stroke); border-radius:12px; padding:14px; background:#121212}
.quote b{color:#fff}

.cta-block{
  display:grid; gap:12px; text-align:center; border:1px solid var(--stroke);
  border-radius:16px; padding:24px; background:linear-gradient(180deg,#151515,#101010)
}

/* --- Back to top --- */
.backtop{position:fixed; right:14px; bottom:14px; z-index:60; opacity:.85}
.backtop .btn{padding:.6rem .8rem; border-radius:.7rem}

/* --- A11y helpers --- */
.sr-only{position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden}

/* --- Mobile drawer --- */
.nav-toggle{
  all:unset; display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:10px; border:1px solid var(--stroke);
  background:#141414; cursor:pointer
}
.nav-toggle:focus-visible{outline:3px solid rgba(255,255,255,.35); outline-offset:2px}
.nav-toggle-bar,.nav-toggle-bar::before,.nav-toggle-bar::after{
  content:""; display:block; width:18px; height:2px; background:#fff; position:relative; border-radius:2px
}
.nav-toggle-bar::before{position:absolute; top:-6px}
.nav-toggle-bar::after{position:absolute; top:6px}

.drawer{
  position:fixed; top:0; right:0; bottom:0; width:min(84vw,340px);
  transform:translateX(100%); transition:transform .2s ease;
  background:#0f0f10; border-left:1px solid var(--stroke); z-index:70;
  display:flex; flex-direction:column; gap:12px; padding:16px
}
.drawer-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:4px}
.drawer-header h2{font-size:18px; margin:0}
.drawer-close{
  all:unset; display:grid; place-items:center; width:36px; height:36px;
  border:1px solid var(--stroke); border-radius:10px; background:#141414; cursor:pointer
}
.drawer-close:focus-visible{outline:3px solid rgba(255,255,255,.35); outline-offset:2px}

.drawer-nav{display:flex; flex-direction:column; gap:8px; overflow:auto; padding-right:2px}
.drawer-nav a{
  display:block; padding:.9rem 1rem; min-height:48px;
  border-radius:.7rem; text-decoration:none; color:var(--fg)
}
.drawer-nav a:hover{background:#181818}
.drawer-nav .cta{background:var(--cta); border:1px solid var(--cta-border); text-align:center}

.menu-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.35); backdrop-filter:blur(1px);
  z-index:60; display:none
}

/* Open states (ditrigger via JS) */
html.drawer-open .drawer{transform:translateX(0)}
html.drawer-open .menu-overlay{display:block}
html.drawer-open, html.drawer-open body{overflow:hidden}

/* Jarak antar item FAQ agar tidak dempet */
#faq details{
  margin-block: 14px;          /* atas-bawah */
}
#faq details:first-of-type{ margin-top: 0 }
#faq details:last-of-type{  margin-bottom: 0 }

details > summary{
  list-style:none; cursor:pointer;
  padding:16px 18px; min-height:52px;          /* >48px */
  display:flex; align-items:center; gap:10px;
  font-weight:600; line-height:1.4; font-size:1rem
}
details > summary::-webkit-details-marker{display:none}
details > summary:hover{background:#181818}
details > summary:focus-visible{
  outline:3px solid rgba(255,255,255,.35); outline-offset:2px; border-radius:10px
}
details > summary::after{content:"▾"; margin-left:auto; opacity:.7}
details[open] > summary{border-bottom:1px solid #222}
details[open] > summary::after{content:"▴"}

/* --- Sentuh nyaman untuk semua link nav di header --- */
.desktop-nav a, .drawer-nav a, .navbar .btn, .navbar a{
  min-height:48px; padding-block:12px
}

/* --- Desktop overrides --- */
@media (min-width:901px){
  .desktop-nav{display:flex}
  .nav-toggle{display:none}
}

/* === FAQ: spacing & marker mobile-friendly === */

/* Paksa jarak vertikal (fallback utk browser yg cuek dgn margin-block) */
#faq details,
#faq .card{
  margin-top: 14px;
  margin-bottom: 14px;
}
#faq .card:first-of-type{ margin-top: 0 }
#faq .card:last-of-type{  margin-bottom: 0 }

/* Perbesar area ketuk & isi konten saat terbuka */
#faq summary{
  padding: 16px 18px;                /* ≥48px tap target */
  border-radius: 12px;
}
#faq details[open] summary{
  border-bottom: 1px solid #222;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
#faq details > *:not(summary){
  padding: 14px 18px 16px;           /* isi jawaban nyaman dibaca */
}

/* Hilangkan marker default (segitiga) di semua engine */
#faq summary::-webkit-details-marker{ display: none }
#faq summary::marker{ content: "" }

/* Ganti marker sendiri yang konsisten */
#faq summary::before{
  content: "▸";
  margin-right: 8px;
  opacity: .75;
}
#faq details[open] summary::before{ content: "▾" }

/* Tweak kecil khusus layar sempit */
@media (max-width: 480px){
  #faq .card{ margin: 16px 0 }       /* sedikit lebih lega di HP kecil */
}


/* ===== Kebijakan: mobile polish ===== */
main.policy .lead{color:var(--muted); max-width:70ch}

/* Breadcrumb ringkas & bisa di-scroll kalau kepanjangan */
.breadcrumb ol{
  display:flex; gap:8px; padding:8px 0; margin:0 0 8px;
  list-style:none; overflow:auto; -webkit-overflow-scrolling:touch;
}
.breadcrumb a{color:var(--muted); text-decoration:none}
.breadcrumb li[aria-current="page"]{color:#fff; opacity:.9}

/* Spasi & tipografi nyaman di layar kecil */
@media (max-width: 600px){
  .container{padding-inline:14px}
  .section{padding-block:28px}
  h1{font-size:clamp(22px, 6vw, 28px); line-height:1.25; margin-bottom:8px}
  h2{font-size:clamp(18px, 5vw, 22px); line-height:1.3; margin-bottom:10px}
  p, li{line-height:1.6}

  /* Badge wrap rapi */
  .badges{row-gap:8px}

  /* CTA full-width biar gampang diklik */
  .btn.cta{width:100%; justify-content:center}

  /* Jarak antar bagian kebijakan lebih lega */
  #main .section + .section{margin-top:6px}

  /* Detail FAQ/kebijakan: target sentuh dan jarak */
  details{border:1px solid var(--stroke); border-radius:12px; background:#121212}
  details + details{margin-top:12px}
  details > summary{
    list-style:none; cursor:pointer; padding:16px 18px; min-height:52px;
    display:flex; align-items:center; gap:10px; font-weight:600
  }
  details > summary::-webkit-details-marker{display:none}
}

/* Sentuh nyaman untuk link di header/drawer */
.desktop-nav a, .drawer-nav a, .navbar .btn, .navbar a{
  min-height:48px; padding-block:12px
}
