/* pahibalo.online. Brand colours from the app: teal #1B7B83, amber #E28C28 (amber carries dark text only). */
:root {
  --teal: #1b7b83;
  --teal-deep: #0f5b66;
  --night: #0a2d33;
  --night-2: #0e3a41;
  --card-dark: rgba(255, 255, 255, 0.06);
  --line-dark: rgba(238, 247, 247, 0.14);
  --amber: #e28c28;
  --ink: #13262a;
  --ink-soft: #4a5f63;
  --paper: #f4f9f9;
  --white: #ffffff;
  --on-dark: #eef7f7;
  --on-dark-soft: #b6d3d6;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --shadow: 0 1px 2px rgba(10, 45, 51, 0.06), 0 12px 32px rgba(10, 45, 51, 0.08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 45, 51, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line-dark);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--on-dark); text-decoration: none; font-weight: 500; font-size: 15px; opacity: 0.88; }
.nav a:hover { opacity: 1; }
.nav .btn { opacity: 1; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-dark); color: var(--on-dark); border-radius: 10px; width: 44px; height: 44px; }
.menu-btn svg { width: 22px; height: 22px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-amber { background: var(--amber); color: var(--ink); box-shadow: 0 8px 24px rgba(226, 140, 40, 0.28); }
.btn-amber:hover { box-shadow: 0 10px 30px rgba(226, 140, 40, 0.38); }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: var(--line-dark); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-deep); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }

/* ---------- hero ---------- */
.hero {
  position: relative; color: var(--on-dark); overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% 38%, rgba(27, 123, 131, 0.55), transparent 70%),
    radial-gradient(700px 480px at 8% 90%, rgba(226, 140, 40, 0.12), transparent 70%),
    var(--night);
  padding: 128px 0 72px;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; min-height: min(760px, 88vh); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--on-dark-soft); letter-spacing: 0.01em; }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(226, 140, 40, 0.18); }
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); font-weight: 800; margin: 18px 0 20px; }
.hero h1 .soft { color: var(--on-dark-soft); }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--on-dark-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; font-size: 14px; color: var(--on-dark-soft); }
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof svg { width: 18px; height: 18px; color: var(--amber); flex: none; }

.stage { position: relative; height: min(640px, 72vh); min-height: 460px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.stage-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  transition: opacity 0.6s ease;
}
.stage-fallback img { width: min(300px, 60%); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.35)); }
.stage.ready .stage-fallback { opacity: 0; pointer-events: none; }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .eyebrow { color: var(--teal); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; margin: 10px 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 18px; }
.dark { background: var(--night); color: var(--on-dark); }
.dark .section-head .eyebrow { color: var(--amber); }
.dark .section-head p { color: var(--on-dark-soft); }

/* trust strip */
.strip { background: var(--night-2); color: var(--on-dark-soft); border-top: 1px solid var(--line-dark); }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; padding-top: 22px; padding-bottom: 22px; font-weight: 600; font-size: 15px; }
.strip span { display: inline-flex; align-items: center; gap: 10px; }
.strip svg { width: 20px; height: 20px; color: var(--amber); }

/* feature cards with a gentle 3D tilt */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; }
.card {
  background: var(--white); border: 1px solid rgba(19, 38, 42, 0.08); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transform-style: preserve-3d; transition: transform 0.18s ease, box-shadow 0.2s ease;
  will-change: transform;
}
.card:hover { box-shadow: 0 2px 4px rgba(10, 45, 51, 0.06), 0 24px 48px rgba(10, 45, 51, 0.14); }
.card .icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(27, 123, 131, 0.1); color: var(--teal); margin-bottom: 18px; transform: translateZ(28px);
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; transform: translateZ(18px); }
.card p { color: var(--ink-soft); font-size: 16px; transform: translateZ(10px); }
.card .sample {
  margin-top: 16px; background: var(--paper); border-radius: 14px 14px 14px 4px; padding: 12px 14px;
  font-size: 14px; color: var(--ink); border: 1px solid rgba(19, 38, 42, 0.06);
}
.card .sample b { color: var(--teal); font-weight: 700; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--card-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 28px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--amber); color: var(--ink); font-weight: 800; margin-bottom: 18px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--on-dark-soft); font-size: 16px; }

/* rules */
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.rule-list { display: grid; gap: 18px; }
.rule { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.rule svg { width: 28px; height: 28px; color: var(--teal); margin-top: 2px; }
.rule h3 { font-size: 18px; margin-bottom: 4px; }
.rule p { color: var(--ink-soft); font-size: 16px; }
.phone-card {
  background: var(--night); border-radius: 32px; padding: 22px; color: var(--on-dark); box-shadow: var(--shadow);
  max-width: 380px; justify-self: center; width: 100%;
}
.phone-card .bar { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line-dark); margin-bottom: 16px; }
.phone-card .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; font-weight: 800; }
.bubble { max-width: 86%; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: var(--night-2); margin-bottom: 10px; font-size: 15px; }
.bubble.me { margin-left: auto; background: var(--teal); border-radius: 18px 18px 6px 18px; }
.bubble .foot { display: block; color: var(--on-dark-soft); margin-top: 6px; font-size: 13px; }
.phone-card .note { font-size: 13px; color: var(--on-dark-soft); text-align: center; margin-top: 10px; }

/* pricing */
.price-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.price-card {
  position: relative; background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--line-dark); border-radius: 24px; padding: 34px; overflow: hidden;
}
.price-card .tag { display: inline-block; background: var(--amber); color: var(--ink); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.price { font-size: clamp(44px, 6vw, 60px); font-weight: 800; margin: 14px 0 4px; letter-spacing: -0.03em; }
.price small { font-size: 16px; font-weight: 600; color: var(--on-dark-soft); letter-spacing: 0; }
.price .was { display: block; font-size: 22px; font-weight: 600; color: var(--on-dark-soft); letter-spacing: 0; text-decoration-thickness: 2px; }
.includes { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; }
.includes li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; color: var(--on-dark); }
.includes svg { width: 20px; height: 20px; color: var(--amber); margin-top: 3px; }
.price-card .btn { width: 100%; }
.pay-note { margin-top: 14px; font-size: 14px; color: var(--on-dark-soft); text-align: center; }
.shop-msg { margin-top: 14px; font-size: 15px; color: var(--on-dark); text-align: center; min-height: 1.4em; }

/* faq */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid rgba(19, 38, 42, 0.1); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-weight: 800; font-size: 22px; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin-top: 12px; }

/* cta + footer */
.cta { text-align: center; }
.cta h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; margin-bottom: 16px; }
.cta p { color: var(--on-dark-soft); margin-bottom: 30px; font-size: 18px; }
.site-footer { background: var(--night); color: var(--on-dark-soft); border-top: 1px solid var(--line-dark); padding: 40px 0; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); }
.site-footer img { height: 28px; width: auto; }

/* ---------- simple pages (update, thank you, legal) ---------- */
.page-hero { background: var(--night); color: var(--on-dark); padding: 132px 0 56px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin: 10px 0 12px; }
.page-hero p { color: var(--on-dark-soft); font-size: 18px; max-width: 40em; }
.page { padding: 56px 0 96px; }
.page .narrow { max-width: 760px; }
.panel { background: var(--white); border: 1px solid rgba(19, 38, 42, 0.08); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel h2 { font-size: 22px; margin-bottom: 10px; }
.panel p, .panel li { color: var(--ink-soft); }
.panel ol { padding-left: 20px; margin: 10px 0 0; display: grid; gap: 8px; }
.field { display: grid; gap: 8px; margin-top: 16px; }
.field label { font-weight: 700; font-size: 15px; }
.field input {
  font: inherit; font-size: 16px; min-height: 52px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(19, 38, 42, 0.2); background: var(--paper); color: var(--ink); width: 100%;
}
.field input:focus { outline: 3px solid rgba(27, 123, 131, 0.35); border-color: var(--teal); }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; align-items: center; }
.code-box {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 16px; word-break: break-all;
  background: var(--paper); border: 1px dashed rgba(27, 123, 131, 0.5); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--ink);
}
.status { margin-top: 14px; font-weight: 600; min-height: 1.5em; }
.status.error { color: #b3261e; }
.legal h2 { font-size: 22px; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.draft-note { background: rgba(226, 140, 40, 0.14); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--ink); font-size: 15px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .stage { height: 460px; min-height: 0; margin-top: 8px; }
  .grid, .steps { grid-template-columns: 1fr 1fr; }
  .rules, .price-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
         background: rgba(10, 45, 51, 0.97); padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line-dark);
         transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 17px; }
  .nav .btn { margin-top: 14px; border-bottom: 0; }
  .menu-btn { display: grid; place-items: center; }
  .hero { padding-top: 104px; }
  .stage { height: 400px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .strip .wrap { justify-content: flex-start; }
  .card { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card { transform: none !important; transition: none; }
}
