/* ------------------------------------------------------------------ tokens
   Diwarisi dari aplikasi (lib/theme.dart): satu aksen teal di atas netral
   hangat, angka tabular, radius 12/16, kertas nota sebagai motif.        */
:root {
  --teal: #0F766E;
  --teal-dark: #0B5B55;
  --teal-soft: #DDF2EF;
  --ink: #1A1D1C;
  --muted: #5C6663;
  --paper: #F6F7F5;
  --tint: #EEF1EF;
  --line: #E1E5E2;
  --white: #FFFFFF;
  --success: #067647;
  --success-soft: #DCFAE6;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  --r: 12px;
  --r-lg: 16px;
  --wrap: 1120px;

  /* Emil: ease-out kuat untuk enter, di bawah 300ms untuk UI */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --fast: 160ms;
  --normal: 240ms;
  --reveal: 380ms;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--teal-soft); color: var(--teal-dark); }
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { max-width: 720px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 20px; height: 48px;
  border-radius: 14px; border: 1px solid transparent;
  font: 600 15px/1 var(--font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--fast) var(--ease-out), background-color var(--fast) ease, border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--teal); color: #fff; box-shadow: 0 1px 2px rgba(15,118,110,.25), 0 6px 16px -8px rgba(15,118,110,.6); }
.btn--primary:hover { background: var(--teal-dark); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--light { background: #fff; color: var(--teal-dark); }
.btn--light:hover { background: var(--teal-soft); }
.btn--lg { height: 54px; padding: 0 24px; font-size: 16px; }
.btn--sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 11px; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--normal) ease, box-shadow var(--normal) ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand__mark { border-radius: 8px; }
.nav__links { display: flex; gap: 22px; margin-left: 8px; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: 15px; text-decoration: none; transition: color var(--fast) ease; }
.nav__links a:hover { color: var(--ink); }
.nav .btn { margin-left: auto; }

/* ------------------------------------------------------------------ hero */
.hero { padding: 40px 0 72px; overflow: clip; }
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.hero__copy { padding-top: 48px; }
.hero__title {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
}
.hero__lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__meta { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* --- printer scene: nota keluar dari printer saat halaman dibuka */
.scene { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 12px; }
.printer {
  width: 300px; padding: 16px 18px 0;
  background: linear-gradient(180deg, #2A2F2D, #1B1F1E);
  border-radius: 22px 22px 14px 14px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  position: relative; z-index: 2;
}
.printer__top { display: flex; justify-content: space-between; align-items: center; color: #B8C0BD; font-size: 12px; font-weight: 500; }
.printer__led { display: inline-flex; align-items: center; gap: 7px; color: #7EE2C3; }
.printer__led i { width: 8px; height: 8px; border-radius: 50%; background: #3DDC97; box-shadow: 0 0 0 3px rgba(61,220,151,.18); }
.printer__label { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: #8C9591; }
.printer__slot {
  height: 14px; margin: 14px -6px 0;
  background: #0D100F; border-radius: 6px 6px 0 0;
  box-shadow: inset 0 3px 6px rgba(0,0,0,.8);
}
.paper-wrap { position: relative; z-index: 1; width: 264px; margin-top: -2px; }
.paper {
  background: #fff; padding: 18px 16px 6px;
  box-shadow: 0 18px 30px -18px rgba(0,0,0,.45);
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}
.paper.is-printing { animation: print 2.8s linear forwards; }
.paper.is-done { clip-path: inset(0 0 0 0); }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
/* bayangan dari slot ke kertas */
.paper-wrap::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 22px; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0));
  pointer-events: none;
}
.paper__tear {
  height: 10px; margin: 0 -16px -6px;
  background: linear-gradient(135deg, #fff 0 50%, transparent 50%) 0 0 / 12px 10px repeat-x,
              linear-gradient(225deg, #fff 0 50%, transparent 50%) 6px 0 / 12px 10px repeat-x;
  background-color: transparent;
}
.replay {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font: 500 13px/1 var(--font); cursor: pointer;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--normal) var(--ease-out), transform var(--normal) var(--ease-out), color var(--fast) ease, border-color var(--fast) ease;
}
.replay.is-visible { opacity: 1; transform: none; }
.replay:hover { color: var(--ink); border-color: var(--muted); }
.replay:active { transform: scale(0.97); }

/* --- receipt text (dipakai hero, spec sheet, 4 bentuk) */
.rc { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: #111; letter-spacing: 0; }
.rc > div { min-height: 1.5em; white-space: pre; }
.rc__big { font-size: 1.7em; font-weight: 600; text-align: center; line-height: 1.25; letter-spacing: -0.01em; }
.rc__c { text-align: center; }
.rc__lr { display: flex; justify-content: space-between; gap: 8px; }
.rc__b { font-weight: 600; }
.rc__sep { color: #9AA3A0; }
.rc pre { margin: 0; font: inherit; white-space: pre; }
.rc pre .rc__big { display: block; }
.rc b { font-weight: 600; }
.rc__tall { display: inline-block; line-height: 2.1; transform: scaleY(1.35); transform-origin: left center; }

/* ------------------------------------------------------------------ strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.strip__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding: 16px 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.strip__in span { display: inline-flex; align-items: center; gap: 10px; }
.strip__in span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

/* ------------------------------------------------------------------ sections */
.sec { padding: 96px 0; }
.sec--tint { background: var(--tint); }
.sec__title { font-size: clamp(1.75rem, 3.4vw, 2.6rem); max-width: 26ch; }
.sec__lead { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 40rem; }

/* --- steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.step h3 { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 20px; }
.step__n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.step p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.phone {
  width: min(100%, 250px);
  padding: 8px; border-radius: 34px;
  background: #141716;
  box-shadow: 0 30px 50px -26px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 26px; }
.phone--sm { width: 220px; margin-top: 40px; }

/* --- fitur */
.feat { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.feat__copy p { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 34rem; }
.feat__list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; max-width: 34rem; }
.feat__list li { padding-left: 22px; position: relative; font-size: 16px; color: var(--muted); }
.feat__list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--teal); }
.feat__list strong { color: var(--ink); font-weight: 600; }
.spec { position: sticky; top: 92px; justify-self: center; width: 320px; background: #fff; padding: 22px 18px 0; box-shadow: 0 30px 50px -30px rgba(0,0,0,.4); }
.rc--spec { font-size: 13px; }
.spec .paper__tear { margin: 0 -18px -1px; }

/* --- 4 bentuk */
.tpls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; width: min(100% - 32px, var(--wrap)); margin: 48px auto 0; }
.tpl { margin: 0; display: flex; flex-direction: column; }
.tpl .rc--mini { background: #fff; padding: 16px 12px 14px; font-size: 10.6px; line-height: 1.45; box-shadow: 0 16px 28px -20px rgba(0,0,0,.4); overflow-x: auto; }
.tpl figcaption { order: -1; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.tpl figcaption strong { color: var(--ink); font-weight: 600; }

/* --- harga */
.price { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; max-width: 880px; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; }
.plan--pro { border-color: var(--teal); box-shadow: 0 24px 40px -30px rgba(15,118,110,.5); }
.plan h3 { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: uppercase; }
.plan__amt { margin-top: 8px; font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.plan__amt small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.plan__note { margin-top: 10px; color: var(--muted); font-size: 15px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; font-size: 15px; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: .35em; width: 14px; height: 14px; border-radius: 50%; background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230B5B55' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 9px no-repeat; }
.plan__dim { color: var(--muted); }
.plan__dim::before { background-color: var(--tint) !important; background-image: none !important; }
.plan .btn { margin-top: auto; justify-content: center; }
.plan__fine { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* --- faq */
.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--normal) var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--normal) var(--ease-out); }
.faq details[open] .faq__a { grid-template-rows: 1fr; }
.faq__a > p { overflow: hidden; min-height: 0; color: var(--muted); font-size: 16px; padding-bottom: 22px; }

/* --- kabari (form) */
.kabari { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.kabari__copy p { margin-top: 16px; color: var(--muted); font-size: 17px; max-width: 30rem; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 16px; position: relative; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field label small { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 500 16px/1.4 var(--font); color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%235C6663' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; }
.field input::placeholder, .field textarea::placeholder { color: #9AA3A0; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.field.is-invalid input { border-color: #B42318; box-shadow: 0 0 0 3px #FEE4E2; }
.field__err { display: none; font-size: 13px; color: #B42318; }
.field.is-invalid .field__err { display: block; }
.form__submit { justify-content: center; }
.form__spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.form.is-sending .form__spinner { display: inline-block; }
.form.is-sending .form__submit { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__fine { font-size: 13px; color: var(--muted); }
.form__done { display: none; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r); background: var(--success-soft); color: var(--success); font-size: 15px; line-height: 1.5; }
.form__done svg { flex: none; margin-top: 2px; }
.form__done strong { display: block; color: var(--success); }
.form__done div { color: var(--ink); }
.form__fail { font-size: 14px; color: #B42318; }
[hidden] { display: none !important; }
.form.is-done > :not(.form__done) { display: none; }
.form.is-done .form__done { display: flex; }

/* --- close */
.close { background: var(--teal); color: #fff; padding: 96px 0; }
.close__in { text-align: center; }
.close h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.close p { margin: 14px auto 28px; color: var(--teal-soft); font-size: 18px; max-width: 32rem; }

/* --- footer */
.foot { padding: 28px 0; font-size: 14px; color: var(--muted); background: var(--ink); color: #A9B2AE; }
.foot__in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: #DCE3DF; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }

/* ------------------------------------------------------------------ reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--reveal) var(--ease-out), transform var(--reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .hero__in { grid-template-columns: 1fr; gap: 40px; }
  .scene { order: -1; }
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .step { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
  .step .phone { grid-row: span 2; width: 200px; }
  .step h3 { margin-top: 0; }
  .feat { grid-template-columns: 1fr; gap: 40px; }
  .spec { position: static; width: min(100%, 320px); }
  .tpls { grid-template-columns: repeat(2, 1fr); }
  .price { grid-template-columns: 1fr; }
  .kabari { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .form { padding: 20px; }
  .nav__links { display: none; }
  .nav__in { height: 60px; }
  .hero { padding: 24px 0 56px; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .printer { width: 260px; }
  .paper-wrap { width: 232px; }
  .rc { font-size: 11px; }
  .sec { padding: 64px 0; }
  .step { grid-template-columns: 1fr; }
  .step .phone { width: 220px; grid-row: auto; }
  .tpls { grid-template-columns: 1fr; }
  .strip__in { flex-direction: column; gap: 8px; }
  .phone--sm { display: none; }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .paper, .paper.is-printing { animation: none; clip-path: inset(0 0 0 0); }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .replay, .faq summary::after, .faq__a { transition: none; }
}
