/* ============================================================
   Chaba — chaba.me
   Light, warm, quietly animated. Palette from the Chaba app:
   terracotta #b34a1f on cream #fafdf8, greens #1f7a4d.
   ============================================================ */

:root {
  --bg: #fafdf8;
  --bg-2: #f1f4ea;
  --panel: #ffffff;
  --line: rgba(25, 28, 26, 0.12);
  --line-soft: rgba(25, 28, 26, 0.07);
  --text: #1c1f1d;
  --muted: #55605a;
  --accent: #b34a1f;
  --accent-2: #d96c2f;
  --green: #1f7a4d;
  --wa: #1fae55;
  --wa-deep: #075e54;
  --grad: linear-gradient(92deg, var(--accent-2), var(--accent));
  --radius: 18px;
  --shadow: 0 24px 55px -28px rgba(25, 28, 26, 0.35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 85% -5%, rgba(217, 108, 47, 0.07), transparent 60%),
    radial-gradient(900px 480px at -10% 25%, rgba(31, 122, 77, 0.06), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
.center { text-align: center; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--muted); }
strong { color: var(--text); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}
.eyebrow-wa { color: var(--green); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section-alt {
  background: linear-gradient(180deg, var(--bg-2), rgba(241, 244, 234, 0.4));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section-lede {
  max-width: 720px;
  font-size: 1.1rem;
  margin-bottom: 2.6em;
}
.footnote {
  margin-top: 2.2em;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(179, 74, 31, 0.65);
}
.btn-primary:hover { box-shadow: 0 16px 34px -12px rgba(179, 74, 31, 0.75); }
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-wide { width: 100%; text-align: center; }
.card .btn { margin-top: 14px; }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(250, 253, 248, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: #fff; }
.nav-links .btn:hover { color: #fff; }
.nav-burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 130px 0 90px;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}
.orb-a { width: 480px; height: 480px; left: -140px; top: 8%; background: radial-gradient(circle, rgba(217, 108, 47, 0.2), transparent 70%); }
.orb-b { width: 420px; height: 420px; right: -120px; bottom: -8%; background: radial-gradient(circle, rgba(31, 122, 77, 0.16), transparent 70%); animation-delay: -8s; }
.orb-c { width: 380px; height: 380px; left: 50%; top: -80px; margin-left: -190px; background: radial-gradient(circle, rgba(217, 108, 47, 0.18), transparent 70%); }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, -34px, 0) scale(1.12); }
}
.hero-fade {
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  width: 100%;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  font-weight: 800;
  margin-bottom: 0.45em;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 38px; }
.hero-stats {
  list-style: none;
  display: flex;
  gap: clamp(20px, 3.4vw, 44px);
  padding: 0; margin: 0;
  flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.stat-label { font-size: 0.82rem; color: var(--muted); }

/* ---------------- Phone / chat mock (WhatsApp light) ---------------- */
.hero-phone { display: flex; justify-content: center; }
.phone {
  width: min(320px, 84vw);
  border-radius: 40px;
  background: linear-gradient(160deg, #2a2f2c, #141816 60%);
  border: 1px solid rgba(25, 28, 26, 0.35);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 12px;
  position: relative;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 22px;
  background: #141816;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.chat {
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 540px;
  background: #efeae2;
}
.phone-sm .chat { height: 470px; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 14px 10px;
  background: #f0f2f5;
  border-bottom: 1px solid rgba(25, 28, 26, 0.08);
}
.chat-avatar img { width: 34px; height: 34px; border-radius: 10px; display: block; }
.chat-head strong { display: block; font-size: 0.95rem; line-height: 1.2; color: #111b21; }
.chat-status { font-size: 0.72rem; color: var(--wa); font-weight: 600; }
.chat-body {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  background:
    radial-gradient(rgba(25, 28, 26, 0.045) 1px, transparent 1.4px) 0 0 / 22px 22px,
    #efeae2;
}
.bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #111b21;
  animation: pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
  position: relative;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.bubble.in  { align-self: flex-start; background: #ffffff; border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: #d9fdd3; border-bottom-right-radius: 4px; }
.bubble.typing { padding: 10px 14px; display: inline-flex; gap: 5px; align-self: flex-start; background: #ffffff; }
.bubble.typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #9aa59d;
  animation: blink 1.2s infinite;
}
.bubble.typing i:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 70%, 100% { opacity: 0.25; } 35% { opacity: 1; } }

/* ---------------- Marquee ---------------- */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
  animation: ticker 36s linear infinite;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 22px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track i { color: var(--accent); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------------- Cards ---------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 46px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 6px 24px -18px rgba(25, 28, 26, 0.3);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(179, 74, 31, 0.35);
  box-shadow: 0 30px 60px -30px rgba(25, 28, 26, 0.4);
}
.card-photo { padding: 0; }
.photo-wrap { overflow: hidden; }
.card-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-photo:hover img { transform: scale(1.05); }
.card-body { padding: 26px 28px 28px; }
.card-body p { margin-bottom: 0; }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(179, 74, 31, 0.08);
  border: 1px solid rgba(179, 74, 31, 0.25);
  color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card-tag { font-size: 0.85rem; font-weight: 600; color: var(--accent); margin: -4px 0 14px; }
.card-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.card-featured {
  border-color: rgba(179, 74, 31, 0.4);
  background:
    radial-gradient(400px 200px at 90% -10%, rgba(217, 108, 47, 0.1), transparent 60%),
    var(--panel);
}
.ticks { list-style: none; padding: 0; margin: 0 0 4px; }
.ticks li {
  padding: 7px 0 7px 28px;
  position: relative;
  color: var(--muted);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px; top: 13px;
  width: 9px; height: 5px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.board-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 6px 0 12px;
}
.board-row figure { margin: 0; }
.board-row img {
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #fff;
  transition: transform 0.5s ease;
}
.board-row figure:hover img { transform: scale(1.04); }
.board-row figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 7px; text-align: center; }

/* ---------------- Steps ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: 40px;
  position: relative;
}
.step { position: relative; padding-top: 10px; }
.step::before {
  content: "";
  position: absolute;
  top: 26px; left: 58px; right: -14px;
  height: 1px;
  background: linear-gradient(90deg, rgba(179, 74, 31, 0.5), rgba(217, 108, 47, 0.15));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s ease 0.3s;
}
.step.in::before { transform: scaleX(1); }
.step:last-child::before { display: none; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
  background: rgba(179, 74, 31, 0.08);
  border: 1px solid rgba(179, 74, 31, 0.4);
  margin-bottom: 16px;
}
.step h3 { font-size: 1.1rem; }
.step p { font-size: 0.95rem; margin-bottom: 0; }

/* ---------------- WhatsApp section ---------------- */
.section-wa {
  background:
    radial-gradient(700px 380px at 12% 8%, rgba(31, 174, 85, 0.07), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.wa-chip {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--wa);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.chat-demo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  background:
    radial-gradient(500px 260px at 88% 110%, rgba(31, 174, 85, 0.09), transparent 60%),
    var(--panel);
  padding: clamp(24px, 4vw, 48px);
}
.chat-demo-copy h3 { font-size: 1.5rem; }
.chat-demo-copy .ticks { margin-top: 14px; }

/* ---------------- App section ---------------- */
.app-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.app-chip-card h3 { font-size: 1.08rem; }
.app-chip-card p { margin-bottom: 0; font-size: 0.95rem; }
.app-shot {
  margin: 56px auto 0;
  text-align: center;
  max-width: 420px;
}
.app-shot .phone { margin: 0 auto; animation: none; }
.app-shot .phone-notch { display: none; }
.app-shot img {
  display: block;
  width: 100%;
  height: 600px;
  object-fit: cover;
  object-position: top;
  border-radius: 30px;
}
.app-shot figcaption {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}
.os-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.os-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg);
}

/* ---------------- Pricing ---------------- */
.price-wrap { display: flex; justify-content: center; }
.price-card {
  width: min(520px, 100%);
  text-align: center;
  padding: clamp(32px, 5vw, 52px);
  border-radius: 24px;
  border: 1px solid rgba(179, 74, 31, 0.35);
  background:
    radial-gradient(420px 240px at 50% -20%, rgba(217, 108, 47, 0.12), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow);
}
.price-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(179, 74, 31, 0.4);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
}
.price { display: flex; align-items: baseline; justify-content: center; gap: 2px; margin: 0 0 4px; }
.price-cur { font-size: 1.8rem; font-weight: 700; color: var(--text); }
.price-num { font-size: 4.6rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.price-per { font-size: 1.1rem; color: var(--muted); margin-left: 6px; }
.price-sub { margin-bottom: 26px; }
.price-card .ticks { text-align: left; margin-bottom: 30px; }
.price-foot { font-size: 0.85rem; margin: 18px 0 0; }
.price-card .btn-primary { margin-top: 6px; }
.wa-cta { background: linear-gradient(92deg, #23c55e, var(--wa)); color: #fff; box-shadow: 0 10px 26px -12px rgba(31, 174, 85, 0.6); }
.wa-cta:hover { box-shadow: 0 16px 34px -12px rgba(31, 174, 85, 0.75); }

/* ---------------- FAQ ---------------- */
.faq details {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq details[open] { border-color: rgba(179, 74, 31, 0.4); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  font-weight: 600;
  color: var(--text);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  animation: faq-in 0.35s ease;
}
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- Final + footer ---------------- */
.final { text-align: center; padding-bottom: 110px; }
.final-photo {
  width: min(340px, 70vw);
  border-radius: 20px;
  margin: 0 auto 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-soft);
}
.final .section-lede { margin-left: auto; margin-right: auto; }
.final .hero-cta { justify-content: center; }
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding: 56px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line-soft);
}
.footer .brand img { height: 30px; }
.footer-note { font-size: 0.9rem; margin-top: 14px; max-width: 340px; }
.footer h4 {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-grid a { display: block; color: var(--muted); padding: 5px 0; font-size: 0.94rem; }
.footer-grid a:hover { color: var(--text); }
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
}
.footer-base p { margin: 0; font-size: 0.82rem; color: var(--muted); }
.credits { max-width: 560px; }

/* ---------------- Reveal on scroll ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { order: -1; margin-top: 26px; }
  .hero { padding-top: 110px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step::before { display: none; }
  .trio { grid-template-columns: 1fr; }
  .app-chips { grid-template-columns: 1fr; }
  .chat-demo { grid-template-columns: 1fr; justify-items: center; text-align: left; }
}
@media (max-width: 760px) {
  .nav-burger { display: block; }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: rgba(250, 253, 248, 0.97);
    backdrop-filter: blur(16px);
    padding: 18px 24px 26px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav.open .nav-links { transform: none; }
  .nav-links a { padding: 10px 0; font-size: 1.05rem; width: 100%; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-stats { gap: 18px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .phone { animation: none; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .step::before { transform: none; transition: none; }
  .card, .btn, .card-photo img { transition: none; }
}
