:root {
  --navy: #1e3a8a;
  --navy-700: #1e40af;
  --navy-800: #1d3578;
  --navy-900: #14245a;
  --emerald: #10b981;
  --emerald-600: #059669;
  --emerald-50: #ecfdf5;
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e6e8ee;
  --line-2: #eef0f4;
  --warn: oklch(0.62 0.18 25);
  --warn-bg: oklch(0.97 0.02 25);
  --line-color: #06C755; /* LINE green */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --shadow-md: 0 8px 24px -8px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.04);
  --shadow-lg: 0 24px 60px -20px rgba(30,58,138,.25), 0 8px 20px -8px rgba(15,23,42,.08);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans Thai', 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lang selector */
body[data-lang="en"] .th { display: none; }
body[data-lang="th"] .en { display: none; }

/* Tone selector */
body[data-tone="formal"] .tone-modern { display: none; }
body[data-tone="modern"] .tone-formal { display: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 72px; height: 32px;
  background: url("logo.png") center / contain no-repeat;
  border-radius: 0;
  display: inline-block;
  position: relative;
  box-shadow: none;
  flex-shrink: 0;
}
.brand-mark::after { content: none; }
.brand-name { font-size: 16px; }
.brand-sub { color: var(--ink-3); font-weight: 500; font-size: 13px; margin-left: 2px; }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--navy); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: white;
  box-shadow: 0 4px 14px -4px rgba(30,58,138,.5);
}
.btn-primary:hover { background: var(--navy-700); transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(30,58,138,.55); }
.btn-emerald {
  background: var(--emerald);
  color: white;
  box-shadow: 0 4px 14px -4px rgba(16,185,129,.5);
}
.btn-emerald:hover { background: var(--emerald-600); transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(16,185,129,.6); }
.btn-ghost {
  background: transparent; color: var(--ink-2); border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 12px; }

.btn-arrow { transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 85% 0%, rgba(16,185,129,.08), transparent 60%),
    radial-gradient(70% 70% at 0% 10%, rgba(30,58,138,.07), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 24px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16,185,129,.18);
}

h1.hero-h {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--ink);
  text-wrap: pretty;
}
h1.hero-h .accent { color: var(--navy); }
h1.hero-h .strike {
  position: relative;
  white-space: nowrap;
}
h1.hero-h .strike::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px;
  top: 56%;
  height: 8px;
  background: var(--warn);
  opacity: .65;
  transform: skewY(-3deg);
  border-radius: 2px;
  animation: strikeIn 1s ease 0.6s both;
  transform-origin: left;
}
@keyframes strikeIn {
  from { transform: scaleX(0) skewY(-3deg); }
  to { transform: scaleX(1) skewY(-3deg); }
}

.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 36px;
  max-width: 540px;
}
.hero-sub b.hl {
  color: var(--emerald-600);
  font-weight: 700;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 36px;
  display: flex; gap: 28px;
  color: var(--ink-3);
  font-size: 13.5px;
  flex-wrap: wrap;
}
.hero-meta span { display: inline-flex; gap: 8px; align-items: center; }
.hero-meta svg { color: var(--emerald); }

/* hero bullets list */
.hero-bullets {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px;
  font-size: 13.5px;
}
.hero-bullets li {
  display: flex; gap: 8px; align-items: center;
  color: var(--ink-2);
}
.hero-bullets li svg {
  color: white;
  background: var(--emerald);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
  width: 18px; height: 18px;
}

/* ============== v3-style CTA row + trust row ============== */
.cta-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 28px;
  max-width: 620px;
}
@media (max-width: 720px) {
  .cta-row { grid-template-columns: 1fr; }
}
.cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  min-height: 68px;
}
.cta-primary {
  background: var(--emerald);
  color: white;
  box-shadow: 0 6px 20px -8px rgba(16,185,129,.55), 0 2px 6px rgba(16,185,129,.2);
}
.cta-primary:hover {
  background: var(--emerald-600);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(16,185,129,.65);
}
.cta-secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line-2);
}
.cta-secondary:hover {
  border-color: var(--ink-2);
  transform: translateY(-1px);
}
.cta .cta-ico {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.cta-primary .cta-ico { color: white; }
.cta-secondary .cta-ico { color: var(--ink); }
.cta .cta-txt {
  display: flex; flex-direction: column;
  line-height: 1.25;
  flex: 1; min-width: 0;
}
.cta .cta-txt b {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.cta .cta-sub {
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 3px;
  opacity: 0.85;
}
.cta-primary .cta-sub { color: rgba(255,255,255,0.9); }
.cta-secondary .cta-sub { color: var(--ink-2); }
.cta-arrow { color: var(--ink-2); flex-shrink: 0; }
.cta-secondary .cta-txt b {
  font-size: 16px;
}

.trust-row {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 620px;
}
@media (max-width: 720px) {
  .trust-row { grid-template-columns: repeat(2, 1fr); }
}
.trust-row li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
  font-weight: 500;
}
.trust-row .trust-ico {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: oklch(0.96 0.04 160);
  color: var(--emerald-600);
  display: flex; align-items: center; justify-content: center;
}

/* highlighted overdue row */
.dash-row.highlight-overdue {
  background: var(--warn-bg);
  border-color: oklch(0.85 0.1 25);
  position: relative;
  animation: pulseRow 2.4s ease-in-out infinite;
}
.dash-row.highlight-overdue::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--warn); border-radius: 10px 0 0 10px;
}
.dash-row.highlight-overdue .st {
  background: var(--warn); color: white;
  font-weight: 700;
}
@keyframes pulseRow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
  50% { box-shadow: 0 0 0 6px rgba(220,38,38,.06); }
}

/* bigger QR in LINE bubble */
.line-bubble .qr.qr-big {
  padding: 10px;
  background: white;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  max-width: 100%;
  overflow: hidden;
}
.line-bubble .qr.qr-big .qr-img {
  width: 48px; height: 48px;
  background: white;
  border-radius: 4px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.line-bubble .qr.qr-big .qr-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.line-bubble .qr.qr-big .qr-text b {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.line-bubble .qr.qr-big .qr-text span {
  font-size: 9.5px;
  color: var(--ink-3);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* repositioned floating revenue badge */
.float-card.fc-1 {
  animation: floatY 4s ease-in-out infinite;
}

/* ============ HERO VISUAL ============ */
/* ============ HERO VISUAL ============ */
.hero-visual {
  position: relative;
  height: 540px;
  perspective: 1400px;
}

/* inline hero view toggle */
.hv-toggle {
  position: absolute;
  top: -56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  gap: 4px;
  background: white;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 8px 24px -8px rgba(15,23,42,.15), 0 2px 6px rgba(15,23,42,.06);
}
.hv-toggle button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .18s ease;
  white-space: nowrap;
}
.hv-toggle button:hover { color: var(--ink); }
.hv-toggle button.on {
  background: var(--ink);
  color: white;
  box-shadow: 0 2px 6px rgba(15,23,42,.2);
}
.hv-toggle button svg { flex-shrink: 0; }

/* mode visibility */
body[data-hero="dash"] .phone,
body[data-hero="dash"] .line-toast { display: none; }
body[data-hero="dash"] .dash {
  right: 50%;
  transform: translateX(50%) rotateY(0) rotateX(0);
}
body[data-hero="line"] .dash,
body[data-hero="line"] .float-card.fc-1 { display: none; }
body[data-hero="line"] .phone {
  position: relative;
  bottom: auto; left: 50%;
  transform: translateX(-50%) rotate(0);
  margin: 0 auto;
}
body[data-hero="line"] .hero-visual { display: grid; place-items: center; }

.dash {
  position: absolute;
  top: 0; right: 0;
  width: 580px;
  max-width: 100%;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line-2);
  transform: rotateY(-6deg) rotateX(2deg);
  transform-origin: center;
}
.dash-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  background: #fbfbfb;
}
.dash-bar .d {
  width: 10px; height: 10px; border-radius: 999px; background: #e1e4ea;
}
.dash-bar .d:nth-child(1) { background: #ff5f57; }
.dash-bar .d:nth-child(2) { background: #febc2e; }
.dash-bar .d:nth-child(3) { background: #28c840; }
.dash-bar .url {
  margin-left: 12px; padding: 4px 10px; background: white; border: 1px solid var(--line-2);
  border-radius: 6px; font-size: 11px; color: var(--ink-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.dash-body { padding: 20px; }
.dash-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 18px;
}
.dash-title { font-size: 13px; color: var(--ink-3); margin: 0 0 6px; font-weight: 500; }
.dash-num {
  font-family: 'Inter', sans-serif;
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink);
}
.dash-num .cur { font-size: 16px; color: var(--ink-3); font-weight: 500; margin-right: 4px; }
.dash-delta {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--emerald-50); color: var(--emerald-600);
  font-size: 12px; font-weight: 600;
  padding: 4px 8px; border-radius: 6px;
  margin-left: 8px;
}
.dash-period {
  display: flex; gap: 4px;
}
.dash-period span {
  font-size: 11px; padding: 4px 10px; border-radius: 6px;
  color: var(--ink-3); cursor: default;
}
.dash-period .on { background: var(--ink); color: white; }

.chart {
  height: 200px; margin: 0 -4px 12px; position: relative;
}
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line-2); stroke-dasharray: 3 3; }
.chart .axis text { fill: var(--ink-3); font-size: 10px; font-family: 'Inter'; }
.chart .area { fill: url(#areaGrad); opacity: .9; }
.chart .line {
  fill: none; stroke: var(--emerald); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 1.6s ease 0.3s forwards;
}
.chart .baseline {
  fill: none; stroke: #cbd5e1; stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.chart .pt {
  fill: white; stroke: var(--emerald); stroke-width: 2.5;
  opacity: 0; animation: popIn .3s ease forwards;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes popIn { to { opacity: 1; } }

.dash-legend {
  display: flex; gap: 18px; font-size: 11px; color: var(--ink-3);
  padding-top: 10px; border-top: 1px solid var(--line-2);
}
.dash-legend i {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px;
  vertical-align: middle;
}
.dash-legend .l1 i { background: var(--emerald); }
.dash-legend .l2 i { background: #cbd5e1; }

.dash-rows {
  margin-top: 14px;
  display: grid; gap: 6px;
}
.dash-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px; align-items: center;
  padding: 10px 12px;
  background: #fbfbfb;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font-size: 12px;
}
.dash-row .nm { color: var(--ink); font-weight: 500; }
.dash-row .am { font-family: 'Inter'; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-row .st {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--emerald-50); color: var(--emerald-600); font-weight: 600;
}
.dash-row.over .st { background: var(--warn-bg); color: var(--warn); }

/* phone */
.phone {
  position: absolute;
  bottom: -40px; left: -10px;
  width: 248px;
  background: #1a1a1c;
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-4deg);
  z-index: 2;
}
.phone-screen {
  background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 30px;
  overflow: hidden;
  height: 460px;
  position: relative;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #1a1a1c;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}
.phone-status {
  display: flex; justify-content: space-between;
  padding: 7px 22px 0;
  font-family: 'Inter';
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1c;
}
.phone-status .icons { display: flex; gap: 3px; align-items: center; }
.phone-status .icons span { display: inline-block; }
.phone-status .icons .sig {
  width: 14px; height: 9px;
  background: linear-gradient(to right, #1a1a1c 0 25%, #1a1a1c 33% 58%, #1a1a1c 66% 91%, transparent 0);
  background:
    linear-gradient(to top, #1a1a1c 0 30%, transparent 30%) 0 0/3px 100% no-repeat,
    linear-gradient(to top, #1a1a1c 0 55%, transparent 55%) 4px 0/3px 100% no-repeat,
    linear-gradient(to top, #1a1a1c 0 80%, transparent 80%) 8px 0/3px 100% no-repeat,
    linear-gradient(to top, #1a1a1c 0 100%, transparent 100%) 12px 0/3px 100% no-repeat;
}
.phone-status .icons .bat {
  width: 22px; height: 10px; border: 1px solid #1a1a1c;
  border-radius: 3px; position: relative; padding: 1px;
}
.phone-status .icons .bat::after {
  content: ""; position: absolute; right: -3px; top: 3px;
  width: 2px; height: 4px; background: #1a1a1c; border-radius: 0 2px 2px 0;
}
.phone-status .icons .bat::before {
  content: ""; display: block; width: 80%; height: 100%; background: #1a1a1c; border-radius: 1px;
}

.line-app {
  padding: 28px 14px 0;
}
.line-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px 14px;
}
.line-header .back { color: #5a6577; font-size: 18px; font-family: 'Inter'; font-weight: 300; }
.line-header .av {
  width: 32px; height: 32px;
  background: var(--line-color);
  border-radius: 8px;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 15px;
  font-family: 'Inter';
}
.line-header .nm {
  font-size: 13px; font-weight: 600; color: #1a1a1c;
}
.line-header .st {
  font-size: 10.5px; color: #5a6577;
}

.line-msgs {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 4px;
}
.line-bubble {
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  max-width: 86%;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  font-size: 11.5px;
  line-height: 1.5;
  color: #1a1a1c;
  align-self: flex-start;
  opacity: 0; transform: translateY(8px);
  animation: msgIn .5s ease forwards;
}
.line-bubble:nth-child(1) { animation-delay: .8s; }
.line-bubble:nth-child(2) { animation-delay: 1.4s; }
.line-bubble:nth-child(3) { animation-delay: 2.0s; }
@keyframes msgIn { to { opacity: 1; transform: translateY(0); } }

.line-bubble .biller {
  font-weight: 700; color: var(--navy); font-size: 11px;
  display: block; margin-bottom: 4px;
}
.line-bubble .amt {
  font-family: 'Inter'; font-weight: 700; font-size: 16px;
  color: var(--ink); margin: 6px 0 4px;
}
.line-bubble .qr {
  margin-top: 8px;
  padding: 8px;
  background: #f8f9fb;
  border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
}
.line-bubble .qr-img {
  width: 38px; height: 38px;
  background:
    linear-gradient(45deg, #1a1a1c 25%, transparent 25%) 0 0/6px 6px,
    linear-gradient(-45deg, #1a1a1c 25%, transparent 25%) 0 0/6px 6px,
    linear-gradient(45deg, transparent 75%, #1a1a1c 75%) 3px 3px/6px 6px,
    linear-gradient(-45deg, transparent 75%, #1a1a1c 75%) 3px 3px/6px 6px,
    white;
  border: 2px solid #1a1a1c;
  border-radius: 4px;
}
.line-bubble .qr-text {
  font-size: 10px; color: var(--ink-3); line-height: 1.35;
}
.line-bubble .qr-text b { color: var(--ink); font-size: 10.5px; display: block; margin-bottom: 2px; }

.line-toast {
  position: absolute;
  top: 30px; left: 12px; right: 12px;
  background: rgba(20,20,22,.92);
  backdrop-filter: blur(10px);
  color: white;
  padding: 10px 12px;
  border-radius: 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.4);
  font-size: 11px;
  z-index: 6;
  animation: toastLoop 8s ease-in-out infinite;
  opacity: 0;
}
.line-toast .av {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--line-color);
  color: white; display: grid; place-items: center;
  font-weight: 700; font-family: 'Inter'; font-size: 14px;
}
.line-toast .t-name { font-weight: 700; font-size: 11.5px; }
.line-toast .t-text { color: rgba(255,255,255,.78); font-size: 10.5px; }
.line-toast .t-time { font-size: 10px; color: rgba(255,255,255,.55); margin-left: auto; }
@keyframes toastLoop {
  0%, 5% { opacity: 0; transform: translateY(-12px); }
  10%, 45% { opacity: 1; transform: translateY(0); }
  50%, 100% { opacity: 0; transform: translateY(-12px); }
}

/* floating side card */
.float-card {
  position: absolute;
  background: white;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-2);
  display: flex; gap: 12px; align-items: center;
  font-size: 13px;
  animation: floatY 6s ease-in-out infinite;
}
.float-card.fc-1 {
  top: 30px; left: -20px;
  z-index: 3;
}
.float-card .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--emerald-50); color: var(--emerald-600);
  display: grid; place-items: center;
}
.float-card .lbl { color: var(--ink-3); font-size: 11.5px; margin-bottom: 2px; }
.float-card .val { font-weight: 700; font-family: 'Inter'; font-size: 15px; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ============ SECTIONS COMMON ============ */
section { padding: 96px 0; position: relative; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-600);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.section-tag.navy { background: rgba(30,58,138,.08); color: var(--navy); }
.section-tag.warn { background: var(--warn-bg); color: var(--warn); }

h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
  text-wrap: balance;
}
.section-head p {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ PROBLEM ============ */
.problem-bg { background: white; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.problem-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.problem-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; gap: 18px;
  position: relative;
  overflow: hidden;
}
.problem-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--warn); opacity: 0;
  transition: opacity .25s ease;
}
.problem-card:hover::before { opacity: 1; }
.problem-icon {
  width: 48px; height: 48px;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.problem-card:hover .problem-icon {
  animation: shake .5s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px) rotate(-2deg); }
  40% { transform: translateX(3px) rotate(2deg); }
  60% { transform: translateX(-2px) rotate(-1deg); }
  80% { transform: translateX(2px) rotate(1deg); }
}
.problem-card h3 { font-size: 18px; margin: 0 0 6px; letter-spacing: -0.01em; }
.problem-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.problem-card .stat {
  margin-top: 12px;
  font-family: 'Inter';
  font-size: 12px;
  color: var(--warn);
  font-weight: 600;
}

/* ============ SOLUTION (before/after) ============ */
.solution {
  padding: 96px 0;
}
.ba-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}
.ba-card {
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 420px;
  display: flex; flex-direction: column;
}
.ba-before {
  background: #f3f4f6;
  border: 1px solid var(--line);
  position: relative;
}
.ba-after {
  background: white;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-md);
  position: relative;
}
.ba-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 16px;
}
.ba-before .ba-label { color: var(--ink-3); }
.ba-after .ba-label { color: var(--emerald-600); }
.ba-label .dotty { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.ba-title { font-size: 18px; margin: 0 0 16px; letter-spacing: -0.01em; }

/* fake excel */
.excel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  overflow: hidden;
  flex: 1;
}
.excel-head {
  display: grid; grid-template-columns: 24px 1.4fr 1fr 0.8fr 0.7fr;
  background: #e8eaee; color: #5a6275;
  font-weight: 600; font-size: 10px;
  border-bottom: 1px solid #cdd1da;
}
.excel-head div { padding: 5px 8px; border-right: 1px solid #cdd1da; }
.excel-row {
  display: grid; grid-template-columns: 24px 1.4fr 1fr 0.8fr 0.7fr;
  border-bottom: 1px solid #eef0f4;
}
.excel-row > div { padding: 5px 8px; border-right: 1px solid #eef0f4; color: #1a1a1c; }
.excel-row .rn { background: #e8eaee; color: #5a6275; font-weight: 600; }
.excel-row.err > div:nth-child(2),
.excel-row.err > div:nth-child(3) { background: oklch(0.96 0.04 25); color: var(--warn); position: relative; }
.excel-row.err > div:nth-child(2)::after {
  content: ""; position: absolute; top: 4px; right: 4px;
  width: 5px; height: 5px; background: var(--warn);
  border-radius: 50%;
}
.excel-strike {
  text-decoration: line-through;
  color: #94a3b8;
}
.excel-foot {
  display: flex; gap: 4px; padding: 4px;
  background: #f3f4f6; border-top: 1px solid #cdd1da;
}
.excel-foot span {
  font-size: 10px; padding: 2px 8px;
  background: white; border: 1px solid #cdd1da;
  color: #5a6275;
}
.excel-foot span.active { background: white; font-weight: 600; color: var(--ink); }

.ba-issues {
  margin-top: 16px;
  display: grid; gap: 6px;
  font-size: 12.5px;
}
.ba-issues .iss {
  display: flex; gap: 8px; align-items: flex-start;
  color: var(--warn);
}
.ba-issues .iss::before {
  content: "✕"; font-weight: 700;
}

/* mini dashboard */
.mini-dash {
  flex: 1;
  display: grid; gap: 10px;
}
.mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.mini-stat {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 12px;
}
.mini-stat .k { font-size: 10.5px; color: var(--ink-3); margin-bottom: 4px; }
.mini-stat .v { font-family: 'Inter'; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.mini-stat .v small { color: var(--emerald-600); font-size: 10px; margin-left: 3px; }

.mini-chart {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px;
  flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.mini-chart .h {
  font-size: 11px; color: var(--ink-3); display: flex; justify-content: space-between;
}
.mini-chart .bars {
  display: grid; grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 6px; height: 60px;
}
.mini-chart .bar {
  background: linear-gradient(180deg, var(--emerald) 0%, #6ee7b7 100%);
  border-radius: 3px 3px 0 0;
  width: 100%;
  animation: barGrow 1s ease both;
  transform-origin: bottom;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.mini-rows {
  display: grid; gap: 6px;
}
.mini-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px; align-items: center;
}
.mini-row .nm { font-weight: 500; }
.mini-row .am { font-family: 'Inter'; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-row .st {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: var(--emerald-50); color: var(--emerald-600); font-weight: 600;
}

.ba-arrow {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -6px rgba(30,58,138,.5);
}

/* ============ FEATURES ============ */
.features-bg { background: white; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(30,58,138,.08);
  color: var(--navy);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.feature-card.em .feature-icon { background: var(--emerald-50); color: var(--emerald-600); }
.feature-card h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.feature-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.feature-card .ftag {
  margin-top: 14px;
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  padding: 3px 8px;
  background: white;
  border: 1px solid var(--line-2);
  border-radius: 4px;
}

/* ============ IMPACT ============ */
.impact {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.impact::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 50% at 80% 30%, rgba(16,185,129,.18), transparent 60%),
    radial-gradient(30% 50% at 10% 80%, rgba(255,255,255,.06), transparent 60%);
  pointer-events: none;
}
.impact .section-head h2 { color: white; }
.impact .section-head p { color: rgba(255,255,255,.7); }
.impact .section-tag { background: rgba(16,185,129,.15); color: #6ee7b7; }

.impact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  position: relative;
}
.impact-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(8px);
}
.impact-num {
  font-family: 'Inter';
  font-size: 56px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 4px;
}
.impact-num .unit { font-size: 28px; -webkit-text-fill-color: #6ee7b7; color: #6ee7b7; }
.impact-card h3 { font-size: 17px; margin: 0 0 6px; color: white; letter-spacing: -0.01em; }
.impact-card p { font-size: 14px; color: rgba(255,255,255,.65); margin: 0; line-height: 1.5; }
.impact-card .pill {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,.7);
  padding: 3px 9px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}

.impact-foot {
  margin-top: 56px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

/* ============ TARGET USERS ============ */
.users-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.user-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.user-illu {
  height: 140px;
  background: linear-gradient(180deg, #eef2f8 0%, #e2e8f0 100%);
  border-radius: 12px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.user-illu .building {
  position: relative; bottom: 0;
}
.user-card h3 { font-size: 19px; margin: 0 0 6px; letter-spacing: -0.01em; }
.user-card p { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; line-height: 1.5; }
.user-card .stats {
  display: flex; gap: 16px;
  font-size: 12.5px; color: var(--ink-3);
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}
.user-card .stats b { color: var(--ink); font-family: 'Inter'; font-weight: 700; }

/* SVG building illustrations */
.illu-bg { background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%); }
.illu-bg-2 { background: linear-gradient(180deg, #ecfdf5 0%, #a7f3d0 100%); }
.illu-bg-3 { background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%); }

/* ============ OFFER ============ */
.offer-bg {
  background: linear-gradient(180deg, var(--bg) 0%, #f0fdf4 100%);
}
.offer {
  background: white;
  border: 2px solid var(--emerald);
  border-radius: var(--radius-xl);
  padding: 56px;
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(16,185,129,.25);
}
.offer::before {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.2) 0%, transparent 70%);
  right: -120px; top: -120px;
  pointer-events: none;
}
.offer-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--emerald);
  color: white;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.offer h2 { margin: 0 0 12px; }
.offer p { font-size: 16px; color: var(--ink-2); margin: 0 0 24px; max-width: 540px; }
.offer-list {
  display: grid; gap: 8px;
  margin: 0 0 28px;
  padding: 0; list-style: none;
}
.offer-list li {
  display: flex; gap: 10px; align-items: center;
  font-size: 14.5px;
  color: var(--ink-2);
}
.offer-list li svg { color: var(--emerald-600); flex-shrink: 0; }

.pulse-cta {
  position: relative;
}
.pulse-cta::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 12px;
  background: var(--emerald);
  opacity: .6;
  animation: pulseCta 2s ease-in-out infinite;
  z-index: -1;
}
@keyframes pulseCta {
  0% { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.18); opacity: 0; }
}

.offer-visual {
  position: relative;
  width: 280px;
}
.offer-gift {
  width: 240px; height: 240px;
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-600) 100%);
  border-radius: 32px;
  display: grid; place-items: center;
  color: white;
  box-shadow: 0 24px 60px -20px rgba(16,185,129,.6);
  position: relative;
}
.offer-gift::after {
  content: "";
  position: absolute;
  inset: -20px;
  border: 2px dashed rgba(16,185,129,.4);
  border-radius: 40px;
  animation: spin 30s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ TRUST ============ */
.trust-bg { background: white; border-top: 1px solid var(--line-2); }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.trust-item {
  text-align: left;
}
.trust-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--emerald-50);
  color: var(--emerald-600);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.trust-item h3 { font-size: 16px; margin: 0 0 6px; letter-spacing: -0.01em; }
.trust-item p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.5; }

.pilot-strip {
  margin-top: 64px;
  border-top: 1px solid var(--line-2);
  padding-top: 32px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.pilot-strip .pilots {
  display: flex; gap: 32px; justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.pilot-strip .pilot {
  padding: 10px 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg);
}
.pilot-strip .pilot .pn { color: var(--ink-2); font-weight: 600; }

/* ============ FINAL CTA ============ */
.final-cta {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 50%, var(--navy-700) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 80% at 50% 0%, rgba(16,185,129,.15), transparent 70%),
    radial-gradient(60% 60% at 50% 100%, rgba(110,231,183,.1), transparent 60%);
  animation: bgShift 12s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0% { transform: translateX(-5%) scale(1); }
  100% { transform: translateX(5%) scale(1.05); }
}
.final-cta h2 {
  color: white;
  font-size: clamp(36px, 4.6vw, 60px);
  margin-bottom: 20px;
}
.final-cta p { color: rgba(255,255,255,.75); font-size: 18px; margin: 0 0 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.final-cta .btn-emerald {
  position: relative;
  box-shadow: 0 0 0 0 rgba(16,185,129,.6);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5), 0 4px 14px -4px rgba(16,185,129,.6); }
  50% { box-shadow: 0 0 0 14px rgba(16,185,129,0), 0 4px 14px -4px rgba(16,185,129,.6); }
}

.final-foot {
  margin-top: 40px;
  display: flex; gap: 24px; justify-content: center;
  font-size: 13.5px;
  color: rgba(255,255,255,.6);
  flex-wrap: wrap;
}
.final-foot span { display: inline-flex; gap: 6px; align-items: center; }

/* ============ FOOTER ============ */
footer {
  background: #0a1230;
  color: rgba(255,255,255,.55);
  padding: 56px 0 32px;
  font-size: 13.5px;
}
footer a { color: rgba(255,255,255,.7); text-decoration: none; }
footer a:hover { color: white; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: white; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid p { margin: 12px 0 0; line-height: 1.6; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12.5px;
  color: rgba(255,255,255,.4);
}

/* responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 80px; }
  .hero-visual { height: 600px; }
  .ba-grid { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); margin: 0 auto; }
  .features-grid, .impact-grid, .users-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .offer { grid-template-columns: 1fr; padding: 36px; }
  .offer-visual { margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .problem-grid { grid-template-columns: 1fr; }
}

/* on tablet/mobile: stack dashboard above phone, dashboard goes full width */
@media (max-width: 720px) {
  .hero-visual {
    height: auto;
    min-height: 0;
  }
  .hero-visual {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }
  .dash {
    position: relative;
    top: auto; right: auto;
    width: 100%;
    max-width: 520px;
    transform: none !important;
  }
  .line-app-wrap, .phone, .line-app-frame {
    position: relative;
    transform: none !important;
    margin: 0 auto;
  }
  .float-card.fc-1 {
    position: relative;
    top: auto; left: auto; right: auto;
    margin: 0 auto -8px;
    z-index: 5;
  }
  /* hide floating LINE toast on mobile to avoid overlap */
  .line-toast {
    display: none;
  }
}
