:root {
  --counter: #062036;
  --counter-2: #0b2a45;
  --paper: #ffffff;
  --ink: #062036;
  --ink-soft: #5b6776;
  --carbon: #2536a0;
  --numerator: #fc5b02;
  --stamp: #c43f00;
  --amber: #faa403;
  --teal: #73cabf;
  --rule: #c9d6e3;
  --on-counter: #ffffff;
  --on-counter-soft: #c5d0db;
  --print: "Archivo", "Arial Narrow", sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  scrollbar-color: var(--amber) var(--counter);
  accent-color: var(--carbon);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

::selection { background: var(--amber); color: var(--ink); }

body {
  margin: 0;
  background: var(--counter);
  color: var(--on-counter);
  font-family: var(--print);
  font-size: 1rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 96;
  -webkit-text-size-adjust: 100%;
}

img { display: block; max-width: 100%; }
p { margin: 0; text-wrap: pretty; }
h1, h2 { margin: 0; text-wrap: balance; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.nota :focus-visible, .kartu :focus-visible { outline-color: var(--carbon); }

/* ---------- Bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(6, 32, 54, 0.97);
  border-bottom: 1px solid var(--counter-2);
}

.bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-variation-settings: "wdth" 110;
  letter-spacing: 0.01em;
  min-height: 44px;
  white-space: nowrap;
}

.bar-brand img { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24); }

.bar-nav { display: none; }

.bar-wa {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s var(--ease);
}

.bar-wa:hover { background: #ffb42d; }
.bar-wa svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Counter (hero) ---------- */
.counter { padding: 32px 0 56px; }

.counter-grid { display: grid; gap: 32px; }

.pitch h1 {
  font-size: clamp(2rem, 1.35rem + 3.2vw, 3.7rem);
  font-weight: 800;
  font-variation-settings: "wdth" 82;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.pitch h1 em {
  display: block;
  margin-top: 0.3em;
  font-style: normal;
  color: var(--amber);
}

.pitch-sub {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 1.06rem;
  color: var(--on-counter-soft);
}

.rating {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--on-counter-soft);
}

.rating svg { width: 18px; height: 18px; fill: var(--amber); flex-shrink: 0; }
.rating strong { color: var(--on-counter); font-weight: 800; }

.pitch-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Nota ---------- */
.nota-stack { position: relative; }

/* Rangkap di bawah lembar atas: kuning dan hijau seperti buku nota konter */
.nota-stack::before,
.nota-stack::after {
  content: "";
  position: absolute;
  inset: 10px -4px -10px 6px;
  border-radius: 3px;
  background: var(--teal);
  transform: rotate(2.2deg);
}

.nota-stack::after {
  inset: 4px 4px -5px -3px;
  background: var(--amber);
  transform: rotate(-1.4deg);
}

.nota {
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--ink);
  border-radius: 3px;
  padding: 26px 18px 0;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.18), 0 18px 40px -12px rgba(0, 0, 0, 0.5);
}

/* Lubang sobekan dari buku nota di tepi atas */
.nota::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 14px;
  right: 14px;
  height: 7px;
  background: radial-gradient(circle, var(--counter) 2.4px, transparent 2.9px) 0 50% / 13px 7px repeat-x;
  opacity: 0.85;
}

.nota-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.nota-head > img { width: 56px; height: 56px; border-radius: 6px; }

.nota-shop p {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.nota-shop .shop-name {
  font-size: 1.2rem;
  font-weight: 900;
  font-variation-settings: "wdth" 118;
  color: var(--ink);
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.shop-name span { font-weight: 600; letter-spacing: 0.18em; font-size: 0.7em; }

.nota-shop .shop-promise {
  margin-top: 4px;
  font-weight: 700;
  color: var(--ink);
}

.nota-no {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.nota-no h2 {
  font-size: 1.05rem;
  font-weight: 900;
  font-variation-settings: "wdth" 70;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.numerator {
  font-size: 1.6rem;
  font-weight: 800;
  font-variation-settings: "wdth" 62;
  color: var(--numerator);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.numerator .blank {
  display: inline-block;
  width: 3.2em;
  border-bottom: 2px dotted var(--ink-soft);
  vertical-align: -2px;
}

.no-hint {
  width: 100%;
  text-align: right;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.row {
  margin: 0;
  padding: 14px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
}

.row legend,
.row-line label,
.row-label {
  padding: 0;
  font-size: 0.78rem;
  font-weight: 800;
  font-variation-settings: "wdth" 75;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.row legend { float: left; width: 100%; margin-bottom: 6px; }
.row legend + * { clear: both; }

.ticks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
.ticks-device .tick:last-child { grid-column: 1 / -1; }

.tick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.3;
}

.tick input {
  position: absolute;
  opacity: 0;
  width: 24px;
  height: 24px;
  margin: 0;
}

.box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  position: relative;
}

.box svg {
  position: absolute;
  left: -3px;
  top: -9px;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--carbon);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset 0.28s var(--ease);
}

.tick input:checked + .box svg { stroke-dashoffset: 0; }
.tick input:focus-visible + .box { outline: 3px solid var(--carbon); outline-offset: 3px; }
.tick:hover .box { background: #eef3f8; }
.tick input:checked ~ * { color: var(--ink); }

.ticks-device .tick { font-weight: 700; }

.keluhan[hidden] { display: none; }

.row-line {
  display: grid;
  gap: 2px;
}

.row-line input {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1.5px dotted var(--ink-soft);
  background: transparent;
  font-family: var(--hand);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--carbon);
  caret-color: var(--carbon);
  padding: 4px 0;
  outline-offset: 2px;
}

.row-line input::placeholder { color: var(--ink-soft); font-weight: 400; }

.row-estimasi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 16px 0;
}

/* ---------- Cap bulat: satu-satunya cap di halaman, nilai kolom estimasi ---------- */
.stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 196px;
  min-height: 106px;
  padding: 14px 18px;
  border: 3px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4.5px currentColor;
  color: var(--stamp);
  text-align: center;
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.05;
  transform: rotate(-8deg);
  filter: url(#ink-rough);
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}

.stamp span:last-child { font-size: 0.72em; letter-spacing: 0.07em; }

.stamp.is-pending { opacity: 0; transform: rotate(-8deg) scale(1.08); }

/* ---------- Kirim ---------- */
.nota-send { padding: 18px 0 22px; }

.nota-send button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  font-variation-settings: "wdth" 100;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.nota-send button:hover { background: #0d3558; }
.nota-send button:active { transform: translateY(1px); }
.nota-send button svg { width: 22px; height: 22px; fill: currentColor; }

.send-hint {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.preview {
  display: block;
  margin-top: 8px;
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--carbon);
  line-height: 1.35;
}

.preview:empty { display: none; }

/* ---------- Lembar pelanggan ---------- */
.stub {
  position: relative;
  margin: 0 -18px;
  padding: 26px 18px 22px;
  background: var(--amber);
  color: var(--ink);
  border-top: 2px dashed var(--ink);
  border-radius: 0 0 3px 3px;
}

.tear {
  position: absolute;
  top: -13px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  background: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}

.tear svg { width: 18px; height: 18px; color: var(--ink); }

.stub-title {
  font-size: 1.15rem;
  font-weight: 900;
  font-variation-settings: "wdth" 75;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.stub p:last-child { max-width: 52ch; }

/* ---------- Alur (lembar rangkap hijau) ---------- */
.alur { padding: 24px 0 64px; }

.sheet-teal {
  background: var(--teal);
  color: var(--ink);
  border-radius: 3px;
  padding: 30px 18px 34px;
  transform: rotate(-0.4deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.18), 0 18px 40px -16px rgba(0, 0, 0, 0.45);
}

.sheet-teal h2 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem);
  font-weight: 900;
  font-variation-settings: "wdth" 80;
  line-height: 1.05;
}

.steps {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 26px;
  counter-reset: step;
}

.steps li { counter-increment: step; display: grid; gap: 10px; justify-items: start; align-content: start; }

.steps li > p:last-child { max-width: 38ch; font-size: 1rem; }

.step-label {
  margin: 0;
  padding: 6px 0 4px;
  border-bottom: 2px solid var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  font-variation-settings: "wdth" 70;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.step-label::before { content: counter(step) ". "; }

/* Langkah transparansi biaya dicetak terbalik: inti janji Nuara */
.step-label-key {
  padding: 6px 10px 5px;
  background: var(--ink);
  color: var(--teal);
}

/* ---------- Lokasi ---------- */
.lokasi { padding: 16px 0 72px; }

.lokasi-grid { display: grid; gap: 36px; align-items: center; }

.lokasi-text h2 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem);
  font-weight: 900;
  font-variation-settings: "wdth" 80;
  line-height: 1.05;
}

.lokasi-text > p {
  margin-top: 14px;
  max-width: 50ch;
  color: var(--on-counter-soft);
  font-size: 1.05rem;
}

.lokasi-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-amber,
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #ffb42d; }
.btn-line { border: 2px solid var(--on-counter-soft); color: var(--on-counter); }
.btn-line:hover { border-color: var(--on-counter); }
.btn-amber svg, .btn-line svg { width: 20px; height: 20px; fill: currentColor; }
.btn-amber svg { fill: none; }

/* Kartu nama: rasio 85 x 55 seperti kartu nama cetak */
.kartu {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  aspect-ratio: 85 / 55;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 32px 28px;
  background: var(--paper);
  color: var(--ink);
  font-style: normal;
  border-radius: 8px;
  transform: rotate(-2deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2), 0 20px 36px -14px rgba(0, 0, 0, 0.55);
}

.kartu-top { display: flex; align-items: center; gap: 14px; padding-right: 48px; }
.kartu-top img { width: 62px; height: 62px; border-radius: 12px; flex-shrink: 0; }
.kartu-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.kartu-name {
  font-weight: 900;
  font-size: 1.55rem;
  font-variation-settings: "wdth" 118;
  line-height: 1.05;
}

.kartu-name > span { font-weight: 600; font-size: 0.6em; letter-spacing: 0.24em; vertical-align: 0.18em; white-space: nowrap; }

@media (max-width: 479px) {
  .kartu { aspect-ratio: auto; padding: 22px 20px 20px; gap: 14px; }
  .kartu-top { gap: 12px; padding-right: 36px; }
  .kartu-top img { width: 44px; height: 44px; }
  .kartu-name { font-size: 1.15rem; }
  .kartu-name > span { display: block; margin-top: 4px; vertical-align: 0; }
  .kartu-mark { top: 18px; right: 16px; transform: rotate(-38deg) scale(0.8); }
}
.kartu-role { font-size: 0.9rem; font-weight: 600; font-variation-settings: "wdth" 90; color: var(--ink-soft); }

.kartu-contact {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  line-height: 1.4;
}

.kartu-row { display: grid; grid-template-columns: 18px 1fr; column-gap: 12px; align-items: start; }
.kartu-row svg { width: 18px; height: 18px; margin-top: 1px; color: var(--ink); }
.kartu-row .kartu-wa-icon { fill: currentColor; }
.kartu-row strong { font-weight: 800; letter-spacing: 0.02em; }
.kartu-soft { color: var(--ink-soft); }

/* Tiga kapsul warna logo, miring seperti huruf N di logo */
.kartu-mark {
  position: absolute;
  top: 26px;
  right: 26px;
  display: flex;
  gap: 5px;
  transform: rotate(-38deg);
}

.kartu-mark i { display: block; width: 9px; height: 26px; border-radius: 999px; background: var(--teal); }
.kartu-mark i:nth-child(2) { background: var(--amber); transform: translateY(-5px); }
.kartu-mark i:nth-child(3) { background: var(--numerator); transform: translateY(-10px); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--counter-2);
  padding: 22px 0 28px;
  color: var(--on-counter-soft);
  font-size: 0.85rem;
}

.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }

/* ---------- < 640px: nota harus muncul di layar pertama ---------- */
@media (max-width: 639px) {
  .counter { padding-top: 22px; }
  .counter-grid { gap: 26px; }
  .pitch-sub { margin-top: 14px; }
  .rating { margin-top: 14px; }
  .pitch-actions { margin-top: 16px; }
  .pitch-actions { gap: 8px; }
  .pitch-actions a { flex: 1 1 auto; justify-content: center; gap: 8px; min-height: 48px; padding: 0 10px; font-size: 0.88rem; white-space: nowrap; }
  .pitch-actions svg { width: 18px; height: 18px; }
  .shop-address { display: none; }
  .nota { padding-top: 24px; }
  .nota-head { padding-bottom: 12px; }
  .nota-no { margin-top: 10px; padding-top: 10px; }
  .row { padding: 10px 0 8px; }
  .tick { gap: 10px; font-size: 0.94rem; }
  .row-estimasi { padding: 12px 0; }
  .nota-send { padding: 14px 0 20px; }
}

/* ---------- HP sempit: header tetap satu baris tanpa geser ke samping ---------- */
@media (max-width: 399px) {
  .bar-wa-verb { display: none; }
  .bar-wa { padding: 0 14px; }
}

@media (max-width: 359px) {
  .wrap { padding: 0 14px; }
  .bar-brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .nota { padding-left: 14px; padding-right: 14px; }
  .stub { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .ticks { grid-template-columns: 1fr; }
  .ticks-device .tick:last-child { grid-column: auto; }
  .stamp { width: 176px; font-size: 1.15rem; }
}

/* ---------- >= 640px ---------- */
@media (min-width: 640px) {
  .wrap { padding: 0 28px; }
  .nota { padding: 30px 32px 0; }
  .stub { margin: 0 -32px; padding: 28px 32px 24px; }
  .nota-head { grid-template-columns: auto 1fr auto; }
  .nota-no { grid-column: auto; flex-direction: column; align-items: flex-end; margin: 0; padding: 0; border: 0; }
  .ticks { column-gap: 18px; }
  .ticks-device { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 28px; }
  .ticks-device .tick:last-child { grid-column: auto; }
  .sheet-teal { padding: 40px 40px 44px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 32px 36px; }
}

/* ---------- >= 820px: nav muncul ---------- */
@media (min-width: 820px) {
  .bar-nav { display: flex; gap: 4px; margin-left: 28px; }
  .bar-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    color: var(--on-counter-soft);
  }
  .bar-nav a:hover { color: var(--on-counter); background: var(--counter-2); }
  .lokasi-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- >= 1080px: meja konter penuh ---------- */
@media (min-width: 1080px) {
  .counter { padding: 56px 0 88px; }
  .counter-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
  .pitch { position: sticky; top: 108px; padding-top: 24px; }
  .nota-stack::before { inset: 16px -14px -16px 12px; transform: rotate(3deg); }
  .nota-stack::after { inset: 6px 8px -9px -8px; transform: rotate(-2deg); }
  .nota { transform: rotate(-0.8deg); }
  .ticks { grid-template-columns: 1fr 1fr; }
  .alur { padding: 32px 0 96px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .lokasi { padding: 24px 0 104px; }
}
