/* KASAMBAHAY landing page. Tokens mirror apps/mobile/lib/core/theme. */
:root {
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-muted: #F0F0EC;
  --border: #E6E5E0;
  --border-strong: #D3D2CC;
  --text: #17181A;
  --text-2: #5C5D5A;
  --text-3: #8A8B86;
  --accent: #0F766E;
  --on-accent: #FFFFFF;
  --accent-soft: #E3F1EE;
  --warning: #B45309;
  --warning-soft: #FCF1E3;
  --tasks: #0F766E;     --tasks-soft: #E0F2EF;
  --shopping: #C2410C;  --shopping-soft: #FFEDDF;
  --money: #15803D;     --money-soft: #E3F5E8;
  --bills: #1D4ED8;     --bills-soft: #E3ECFD;
  --people: #BE185D;    --people-soft: #FCE8F1;
  --phone-bezel: #17181A;
  --shadow: 0 1px 2px rgba(23, 24, 26, .06), 0 12px 32px -12px rgba(23, 24, 26, .22);
  --radius: 16px;
  --wrap: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0E0E;
    --surface: #161818;
    --surface-muted: #1D2020;
    --border: #272A2A;
    --border-strong: #363A3A;
    --text: #F1F1EE;
    --text-2: #A9AAA5;
    --text-3: #787975;
    --accent: #3CB8A9;
    --on-accent: #04201D;
    --accent-soft: #12302C;
    --warning: #F5B54A;
    --warning-soft: #2E2210;
    --tasks: #5EEAD4;     --tasks-soft: #12302C;
    --shopping: #FDBA74;  --shopping-soft: #3A2414;
    --money: #86EFAC;     --money-soft: #15301E;
    --bills: #93C5FD;     --bills-soft: #16253F;
    --people: #F9A8D4;    --people-soft: #3A1A2A;
    --phone-bezel: #2A2D2D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -12px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-scrolled { border-bottom-color: var(--border); }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .06em; font-size: 15px; }
.brand img { border-radius: 8px; }
.brand--small { font-size: 13px; }
.brand--small img { border-radius: 6px; }
.nav { display: none; gap: 4px; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-muted); }
@media (min-width: 720px) { .nav { display: flex; } }

/* Hero */
.hero { padding: 32px 0 56px; overflow: hidden; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.hero h1 { margin-top: 16px; font-size: clamp(34px, 8.6vw, 60px); font-weight: 800; letter-spacing: -.035em; }
.lead { margin-top: 16px; font-size: clamp(17px, 2.4vw, 20px); color: var(--text-2); max-width: 34em; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 164px; padding: 9px 18px 10px; border-radius: 12px;
  background: var(--text); color: var(--bg);
  line-height: 1.15;
}
.store__small { font-size: 11px; opacity: .78; letter-spacing: .01em; }
.store__big { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.hero__note { margin-top: 16px; font-size: 14px; color: var(--text-3); }
.hero__art { position: relative; display: flex; justify-content: center; padding: 8px 0 8px; }
.hero__art::before {
  content: ""; position: absolute; z-index: -1; inset: 8% 6% 2%;
  border-radius: 48px;
  background: radial-gradient(120% 90% at 30% 20%, var(--accent-soft), transparent 70%);
}
@media (min-width: 900px) {
  .hero { padding: 56px 0 88px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .hero__art { justify-content: flex-start; padding-left: 8%; }
}

/* Phone frame */
.phone {
  position: relative;
  width: clamp(220px, 64vw, 280px);
  padding: 8px;
  border-radius: 38px;
  background: var(--phone-bezel);
  box-shadow: var(--shadow);
  flex: none;
}
.phone img { width: 100%; border-radius: 24px; background: var(--surface); aspect-ratio: 540 / 1200; }
.phone--hero { z-index: 1; width: clamp(240px, 68vw, 300px); }
.phone--peek { display: none; }
@media (min-width: 900px) {
  .phone--peek {
    display: block; position: absolute; z-index: 0;
    width: 240px; left: 52%; top: 64px;
    transform: rotate(5deg);
    opacity: .96;
  }
  .phone--hero { transform: rotate(-2deg); }
}

/* Sections */
.section { padding: 64px 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.section h2 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.section__lead { margin-top: 10px; color: var(--text-2); font-size: 17px; }
@media (min-width: 900px) { .section { padding: 96px 0; } }

/* Tones */
.tone-tasks { --tone: var(--tasks); --tone-soft: var(--tasks-soft); }
.tone-shopping { --tone: var(--shopping); --tone-soft: var(--shopping-soft); }
.tone-money { --tone: var(--money); --tone-soft: var(--money-soft); }
.tone-bills { --tone: var(--bills); --tone-soft: var(--bills-soft); }
.tone-people { --tone: var(--people); --tone-soft: var(--people-soft); }

/* Who */
.who { display: grid; gap: 14px; margin-top: 32px; }
@media (min-width: 640px) { .who { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .who { grid-template-columns: repeat(4, 1fr); } }
.who__card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.who__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tone-soft); color: var(--tone); }
.who__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.who__card h3 { margin-top: 16px; font-size: 18px; }
.who__card p { margin-top: 6px; color: var(--text-2); font-size: 15px; }

/* Features */
.feature { display: grid; gap: 28px; justify-items: center; margin-top: 56px; }
.feature__copy { max-width: 32rem; width: 100%; }
.feature h3 { margin-top: 12px; font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -.025em; }
.feature__copy > p:not(.tag):not(.note) { margin-top: 12px; color: var(--text-2); font-size: 17px; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--tone-soft); color: var(--tone); font-size: 13px; font-weight: 700; }
.plus {
  display: inline-block; padding: 1px 7px; border-radius: 6px; vertical-align: 1px;
  background: var(--warning-soft); color: var(--warning);
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.tag .plus { vertical-align: 0; }
.ticks { margin-top: 18px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft);
}
.ticks li::after {
  content: ""; position: absolute; left: 7px; top: 7px;
  width: 5px; height: 9px;
  border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.note {
  margin-top: 20px; padding: 16px 18px; border-radius: 12px;
  background: var(--surface-muted); border-left: 4px solid var(--people);
  color: var(--text-2); font-size: 15px;
}
.note strong { color: var(--text); }
.feature--text { justify-items: stretch; }
.feature--text .feature__copy {
  max-width: none; padding: 28px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border);
}
.feature__phones { display: flex; gap: 16px; justify-content: center; align-items: flex-start; }
.feature__phones .phone { width: clamp(150px, 42vw, 250px); padding: 6px; border-radius: 30px; }
.feature__phones .phone img { border-radius: 20px; }
.feature__phones .phone + .phone { margin-top: 40px; }
@media (min-width: 900px) {
  .feature { grid-template-columns: auto 1fr; gap: 80px; margin: 88px auto 0; max-width: 960px; justify-items: start; align-items: center; }
  .feature--flip { grid-template-columns: 1fr auto; }
  .feature--flip > .phone { order: 2; }
  .feature--simple { max-width: none; }
  .feature--text { grid-template-columns: 1fr; }
  .feature--text .feature__copy { padding: 40px 44px; }
  .feature--text .feature__copy > p:not(.tag):not(.note) { max-width: 40rem; }
}

/* Privacy */
.privacy { display: grid; gap: 14px; margin-top: 32px; }
@media (min-width: 640px) { .privacy { grid-template-columns: 1fr 1fr; } }
.privacy li { padding: 22px 22px 22px 58px; position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.privacy li::before {
  content: ""; position: absolute; left: 20px; top: 22px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent);
}
.privacy li::after {
  content: ""; position: absolute; left: 30px; top: 28px;
  width: 6px; height: 11px;
  border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.privacy h3 { font-size: 18px; }
.privacy p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.more { margin-top: 24px; font-weight: 600; }

/* Pricing */
.plans { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; max-width: 880px; } }
.plan { position: relative; padding: 28px; border-radius: 20px; background: var(--bg); border: 1px solid var(--border); }
.plan--plus { border: 2px solid var(--accent); background: var(--surface); }
.plan h3 { font-size: 20px; }
.price { margin-top: 12px; }
.price__amt { font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.price__per { color: var(--text-2); font-weight: 600; }
.price__alt { color: var(--text-2); font-size: 15px; }
.plan .ticks { margin-top: 20px; }
.plan__soon {
  margin-top: 24px; padding: 12px; border-radius: 12px; text-align: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.fine { margin-top: 16px; color: var(--text-3); font-size: 14px; }

/* FAQ */
.faq { margin-top: 28px; max-width: 760px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 20px 40px 20px 0; font-weight: 650; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border: solid var(--text-2); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 20px; color: var(--text-2); }

/* Footer */
.foot { padding: 40px 0 48px; border-top: 1px solid var(--border); }
.foot__inner { display: grid; gap: 16px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.foot__links a { color: var(--text-2); }
.foot__copy { color: var(--text-3); font-size: 14px; }
@media (min-width: 900px) {
  .foot__inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
  .foot__links { justify-content: center; }
}

/* Reveal on scroll (only when JS is running and motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .feature .phone.reveal { transform: translateY(28px) scale(.98); }
  .js .feature .phone.reveal.is-visible { transform: none; }
  .hero__copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__copy > :nth-child(2) { animation-delay: .06s; }
  .hero__copy > :nth-child(3) { animation-delay: .12s; }
  .hero__copy > :nth-child(4) { animation-delay: .18s; }
  .hero__copy > :nth-child(5) { animation-delay: .24s; }
  .phone--hero { animation: float-in .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
  .phone--peek { animation: fade .9s .35s ease both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes float-in { from { opacity: 0; transform: translateY(32px) rotate(-2deg); } }
@media (max-width: 899px) {
  @keyframes float-in { from { opacity: 0; transform: translateY(32px); } }
}
