/* ═══════════════════════════════════════════
   ThermalFoto — landing page
   Tema: kertas thermal (warm white + ink + red)
   ═══════════════════════════════════════════ */

:root {
  --paper: #f7f2e7;
  --paper-2: #efe8d8;
  --paper-edge: #e6ddc8;
  --ink: #141414;
  --ink-2: #3d3d3d;
  --red: #e23d28;
  --red-dark: #c2321f;
  --green: #15803d;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 16px;
  --shadow: 0 20px 50px -18px rgba(20, 20, 20, .28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* atribut hidden WAJIB menang — jangan sampai CSS display menimpanya */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* kertas texture subtle di body */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.mono { font-family: var(--mono); }

/* ── NAV ─────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 231, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--paper-edge);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; font-size: 18px;
  box-shadow: 3px 3px 0 var(--red);
}
.brand-name { font-size: 18px; font-weight: 500; letter-spacing: -.2px; }
.brand-name b { font-weight: 700; }

.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--red); }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ── BUTTONS ─────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 11px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s, background .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 13px; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.btn-accent { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(226, 61, 40, .55); }
.btn-accent:hover { background: var(--red-dark); transform: translateY(-1px); }

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ── HERO ────────────────────────── */
.hero { padding: 88px 0 96px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  background: var(--ink); color: var(--paper);
  padding: 6px 12px; border-radius: 999px; letter-spacing: .3px;
  margin-bottom: 22px;
}

h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -1.5px; font-weight: 700; }
h1 em { font-style: normal; color: var(--red); position: relative; }
h1 em::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10'%3E%3Cpath d='M0 8 Q 10 2 20 7 T 40 8 T 60 6 T 80 8 T 100 7 T 120 8' stroke='%23e23d28' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x bottom;
  z-index: -1;
}

.lead { margin-top: 20px; font-size: 17.5px; color: var(--ink-2); max-width: 520px; }

.hero-cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-points { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; }
.hero-points li { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.hero-points li::before { content: ''; }

/* visual printer + receipt */
.hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; }

.printer { width: 240px; position: relative; z-index: 2; filter: drop-shadow(0 24px 30px rgba(20,20,20,.25)); }
.printer-top { height: 34px; background: linear-gradient(#2b2b2b, #1a1a1a); border-radius: 18px 18px 0 0; }
.printer-slot { height: 14px; background: #050505; position: relative; }
.printer-slot::after {
  content: ''; position: absolute; inset: 4px 14px 3px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 3px, transparent 3px 7px);
}
.printer-body { height: 74px; background: linear-gradient(#1f1f1f, #141414); border-radius: 0 0 16px 16px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.printer-led { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.printer-label { font-family: var(--mono); color: #888; font-size: 9.5px; letter-spacing: 2px; text-align: right; line-height: 1.5; }

/* receipt kertas */
.receipt {
  background: #fff;
  box-shadow: var(--shadow);
  position: relative;
}
.receipt::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 14px;
  background:
    linear-gradient(135deg, transparent 12px, #fff 0) 0 0/14px 14px repeat-x,
    linear-gradient(225deg, transparent 12px, #fff 0) 7px 0/14px 14px repeat-x;
}
.receipt::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 10px;
  background:
    linear-gradient(135deg, transparent 9px, #fff 0) 0 0/12px 12px repeat-x,
    linear-gradient(225deg, transparent 9px, #fff 0) 6px 0/12px 12px repeat-x;
}

.receipt-hero { width: 260px; padding: 16px 14px 26px; margin-top: -34px; z-index: 1; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.receipt-img {
  height: 170px; border-radius: 4px;
  background:
    radial-gradient(circle at 30% 30%, #2a2a2a 0 9px, transparent 9.5px),
    radial-gradient(circle at 60% 55%, #1c1c1c 0 14px, transparent 14.5px),
    radial-gradient(circle at 80% 25%, #333 0 6px, transparent 6.5px),
    radial-gradient(circle at 45% 80%, #222 0 10px, transparent 10.5px),
    radial-gradient(circle at 20% 70%, #2e2e2e 0 5px, transparent 5.5px),
    radial-gradient(circle at 70% 85%, #2a2a2a 0 8px, transparent 8.5px),
    #f2f2f2;
  background-size: 100% 100%;
  position: relative;
}
.receipt-img::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='60' height='60' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.receipt-line { height: 6px; background: #222; border-radius: 2px; margin: 9px 0; opacity: .85; }
.receipt-line.short { width: 55%; }
.receipt-mono { font-family: var(--mono); font-size: 10.5px; text-align: center; letter-spacing: 1.5px; padding: 4px 0; }

/* ── SECTIONS ────────────────────── */
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-kicker { color: var(--red); font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -1px; margin-top: 8px; }
.section-head p { margin-top: 12px; color: var(--ink-2); font-size: 16px; }

.card {
  background: #fff; border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px -18px rgba(20,20,20,.25);
}

/* ── DEMO ────────────────────────── */
.demo { background: var(--paper-2); }
.demo-grid { display: grid; grid-template-columns: 420px 1fr; gap: 32px; align-items: start; }

.demo-controls { padding: 24px; }

.dropzone {
  border: 2px dashed #b9ad92; border-radius: 12px;
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  background: rgba(255,255,255,.55);
}
.dropzone:hover, .dropzone.drag { border-color: var(--red); background: rgba(226,61,40,.05); }
.dz-icon { font-size: 34px; margin-bottom: 8px; }
.dz-sub { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.dz-preview img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; display: block; }
.dz-preview { text-align: center; }
.dz-preview .btn { margin-top: 12px; }

.controls { margin-top: 20px; display: grid; gap: 16px; }

.ctrl-row label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; letter-spacing: .2px; }

.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  border: 0; background: transparent; color: var(--ink-2);
  padding: 6px 11px; border-radius: 7px; cursor: pointer; transition: .15s;
}
.seg button.active { background: var(--ink); color: var(--paper); }

.slider input[type="range"] { width: 100%; accent-color: var(--red); height: 28px; cursor: pointer; }
.slider output { font-family: var(--mono); font-size: 12px; color: var(--red); font-weight: 600; }

.check-label { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; cursor: pointer; }
.check-label input { width: 17px; height: 17px; accent-color: var(--red); cursor: pointer; }

/* output / kertas */
.demo-output { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.paper-stand {
  background: linear-gradient(180deg, #e9e0cc, #ddd2b9);
  border-radius: 18px;
  padding: 46px 30px 20px;
  width: 100%; display: flex; justify-content: center;
  position: relative;
  min-height: 480px;
}
.paper-stand::before {
  content: ''; position: absolute; top: 22px; width: 120px; height: 12px;
  background: rgba(20,20,20,.14); border-radius: 6px;
}

.paper-wrap {
  filter: drop-shadow(0 18px 40px rgba(20, 20, 20, .38));
  max-width: 100%;
}
.paper {
  background: #fff;
  width: var(--w);
  max-width: 100%;
  padding: 14px 12px 20px;
  position: relative;
  /* gigi kertas di bawah (dibuat dinamis oleh JS) */
}
.paper-head { font-size: 9.5px; letter-spacing: 2px; color: #666; text-align: center; margin-bottom: 10px; }
.paper-foot { font-size: 9.5px; letter-spacing: 1px; color: #666; text-align: center; margin-top: 10px; }
.paper canvas { width: 100%; display: block; }

.output-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hint { font-size: 12px; color: var(--ink-2); }

/* animasi cetak */
.print-anim {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: rgba(20,20,20,.55); backdrop-filter: blur(3px);
}
.print-anim .receipt { width: 300px; padding: 14px 12px 24px; animation: feed .9s cubic-bezier(.2,.7,.3,1); }
@keyframes feed {
  0% { transform: translateY(-120%) skewY(3deg); opacity: 0; }
  100% { transform: translateY(0) skewY(0); opacity: 1; }
}
.print-anim .receipt img { width: 100%; border-radius: 3px; display: block; }
.print-anim .receipt-mono { font-size: 10px; }

/* ── FITUR ───────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 28px 26px; transition: transform .18s, box-shadow .18s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.f-icon { font-size: 30px; margin-bottom: 14px; }
.feature h3 { font-size: 18px; letter-spacing: -.3px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--ink-2); }

/* ── CARA ────────────────────────── */
.how { background: var(--ink); color: var(--paper); }
.how .section-kicker { color: var(--red); }
.how .section-head h2 { color: var(--paper); }
.how .section-head p { color: #bdbdbd; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-step { background: #1d1d1d; border: 1px solid #2e2e2e; padding: 30px 26px; position: relative; }
.how-num { font-size: 42px; font-weight: 600; color: var(--red); display: block; margin-bottom: 14px; }
.how-step h3 { font-size: 19px; margin-bottom: 8px; }
.how-step p { font-size: 14.5px; color: #b0b0b0; }

/* ── KOMPATIBILITAS ──────────────── */
.compat-list { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  background: #fff; border: 1.5px solid var(--ink);
  border-radius: 999px; padding: 9px 18px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s;
}
.chip:hover { transform: translate(-1px,-1px); }

/* ── CTA ─────────────────────────── */
.cta { text-align: center; background: var(--paper-2); }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -1px; margin-top: 26px; }
.cta p { color: var(--ink-2); font-size: 16.5px; margin-top: 12px; max-width: 520px; }
.cta-buttons { margin-top: 30px; }
.cta-note { margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }

.receipt-cta { width: 240px; padding: 16px 14px 26px; }
.receipt-cta .receipt-mono { font-size: 11px; letter-spacing: 2px; padding: 6px 0; }

/* ── FOOTER ──────────────────────── */
.footer { background: var(--ink); color: #999; padding: 36px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .brand { color: var(--paper); }
.footer .mono { font-size: 12.5px; }

/* ── REVEAL ──────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── RESPONSIVE ──────────────────── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { order: -1; }
  .demo-grid { grid-template-columns: 1fr; }
  .feature-grid, .how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 6px;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--paper-edge);
    padding: 14px 24px 20px;
  }
  .nav-links.open a { padding: 9px 0; font-size: 16px; }
  .nav-cta { display: none; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 72px 0; }
  .feature-grid, .how-grid { grid-template-columns: 1fr; }
  .printer { width: 200px; }
  .receipt-hero { width: 230px; }
  .paper-stand { min-height: 400px; padding: 40px 14px 14px; }
}
