/* One Calculator — landing site (2026 redesign) */
:root {
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --blue-soft: #dbeafe;
  --ink: #0f1220;
  --ink-soft: #5b6270;
  --bg: #fbfcfe;
  --card: #ffffff;
  --line: #e6eaf2;
  --amber: #f59e0b;
  --radius: 20px;
  --max: 1120px;
  --shadow-sm: 0 1px 2px rgba(15, 18, 32, 0.06), 0 4px 14px rgba(15, 18, 32, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 18, 32, 0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Noto Sans Thai", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 254, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 22px; height: 64px; }
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16.5px; letter-spacing: -0.2px; color: var(--ink);
}
.nav .brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--ink-soft); font-size: 14.5px; font-weight: 500; transition: color 0.15s; }
.nav a.link:hover { color: var(--blue); }
.nav .cta {
  background: var(--blue); color: #fff !important;
  padding: 8px 18px; border-radius: 999px; font-weight: 600;
  transition: background 0.15s;
}
.nav .cta:hover { background: var(--blue-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 90px;
  background:
    radial-gradient(720px 420px at 85% -10%, rgba(96, 165, 250, 0.22), transparent 60%),
    radial-gradient(640px 380px at -10% 30%, rgba(37, 99, 235, 0.14), transparent 60%),
    linear-gradient(180deg, #f4f7ff 0%, var(--bg) 100%);
}
.hero .grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  color: var(--blue-dark);
  font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.hero h1 {
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.06;
  letter-spacing: -1.6px;
  margin-bottom: 18px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--blue) 20%, var(--blue-light) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.tag { font-size: 18.5px; color: var(--ink-soft); margin-bottom: 30px; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  padding: 14px 26px; border-radius: 14px;
  font-weight: 700; font-size: 15.5px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-soft); font-weight: 600; font-size: 15px;
  padding: 14px 6px;
}
.btn-ghost:hover { color: var(--blue); }
.hero .platform-note { margin-top: 18px; font-size: 13.5px; color: var(--ink-soft); }

/* Phone mockup in hero */
.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: auto -20% -12% -20%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.18), transparent);
  filter: blur(10px);
}
.phone {
  position: relative;
  width: 280px;
  border-radius: 42px;
  border: 10px solid #101426;
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-2.5deg);
  transition: transform 0.35s ease;
}
.phone:hover { transform: rotate(0deg) translateY(-6px); }
.phone img { display: block; width: 100%; }
.hero-float {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.hero-float .big { font-size: 18px; font-weight: 800; color: var(--blue-dark); }
.hero-float.one { top: 8%; left: -6%; animation: floaty 5s ease-in-out infinite; }
.hero-float.two { bottom: 10%; right: -4%; animation: floaty 6s ease-in-out 1s infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- Stats strip ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 30px 12px; }
.stat .num {
  font-size: 34px; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(120deg, var(--blue), var(--blue-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .label { font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.sec-head { max-width: 620px; margin-bottom: 44px; }
.sec-head .kicker {
  color: var(--blue); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px;
}
.sec-head h2 { font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -0.8px; line-height: 1.15; margin-bottom: 12px; }
.sec-head p { color: var(--ink-soft); font-size: 16px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card .icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--blue-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; stroke: var(--blue); }
.card h3 { font-size: 16.5px; margin-bottom: 8px; letter-spacing: -0.2px; }
.card p { font-size: 14.5px; color: var(--ink-soft); }

/* Tools chips */
.tools-band { background: #101426; border-radius: 28px; color: #fff; padding: 56px 48px; position: relative; overflow: hidden; }
.tools-band::after {
  content: "";
  position: absolute; right: -120px; top: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(96, 165, 250, 0.35), transparent);
}
.tools-band h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.6px; margin-bottom: 10px; }
.tools-band p { color: #aab4d4; margin-bottom: 26px; max-width: 560px; }
.tools-band .chips { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: #e8ecf8;
}

/* Screenshots in device frames */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.shot { text-align: center; }
.shot .frame {
  border-radius: 30px;
  border: 9px solid #101426;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease;
}
.shot:hover .frame { transform: translateY(-8px) scale(1.02); }
.shot img { display: block; width: 100%; }
.shot figcaption { margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(110deg, var(--blue-dark), var(--blue) 60%, var(--blue-light));
  border-radius: 28px;
  color: #fff;
  padding: 64px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before, .cta-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.cta-band::before { width: 260px; height: 260px; top: -110px; right: -60px; }
.cta-band::after { width: 190px; height: 190px; bottom: -80px; left: 40px; }
.cta-band h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.6px; margin-bottom: 10px; position: relative; }
.cta-band p { opacity: 0.9; margin-bottom: 28px; position: relative; }
.cta-band .btn-white {
  position: relative;
  display: inline-block;
  background: #fff; color: var(--blue-dark);
  padding: 14px 32px; border-radius: 14px;
  font-weight: 800; font-size: 15.5px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}
.cta-band .btn-white:hover { transform: translateY(-2px); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 12px;
}
.faq summary {
  font-weight: 600; font-size: 15.5px;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: "+"; font-size: 20px; color: var(--blue); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 10px; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- Policy pages ---------- */
.doc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px;
  max-width: 840px;
}
.doc h1 { font-size: 32px; letter-spacing: -0.6px; margin-bottom: 4px; }
.doc .updated { color: var(--ink-soft); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 19px; margin: 28px 0 10px; }
.doc p, .doc li { font-size: 15px; color: #333a46; margin-bottom: 10px; }
.doc ul { margin-left: 22px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 30px 0;
  color: var(--ink-soft);
  font-size: 14px;
}
footer .row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
footer .spacer { flex: 1; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-visual { order: -1; }
  .grid-3 { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  .tools-band { padding: 40px 28px; }
  .cta-band { padding: 48px 28px; }
  .nav a.link:not(.cta) { display: none; }
}
