/* MyFinances360 — public site. Brand tokens from handoffs/design_handoff_brand_identity. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('/assets/fonts/InstrumentSans.woff2') format('woff2'),
       url('/assets/fonts/InstrumentSans.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --indigo: #4f46e5;
  --indigo-dark: #3f38b0;
  --ink: #191927;
  --bg: #f5f4f0;
  --card: #ffffff;
  --muted: #6b6b74; /* 4.8:1 on --bg (was #77777f, failed WCAG AA at 4.0:1) */
  --border: #eceae4;
  --chip-bg: #efedea;
  --chip-fg: #44444c;
  --banner-bg: #e8e6fb;
  --banner-fg: #3f38b0;
  --green: #12996b;
  --mint: #7ef0c4;
  --lavender: #a5a0ff;
  --radius: 20px;
  --radius-btn: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--indigo); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 8px; }
body {
  margin: 0;
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--indigo); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
.lead { font-size: 1.12rem; color: var(--chip-fg); max-width: 34em; }
.section-sub { color: var(--muted); max-width: 40em; margin: -0.4em 0 1.6em; }

/* Buttons */
.btn {
  display: inline-block;
  border-radius: var(--radius-btn);
  padding: 12px 22px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); }
.btn-light { background: #fff; color: var(--indigo); }
.btn-light:hover { background: var(--banner-bg); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-nav { padding: 9px 16px; font-size: 0.92rem; }

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 32px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lang-switch a {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a.active { background: var(--banner-bg); color: var(--banner-fg); }
.lang-switch a:hover { color: var(--indigo); }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-note { color: var(--muted); font-size: 0.92rem; }
.hero-visual { display: flex; justify-content: center; }
@media (min-width: 820px) {
  .hero { padding: 80px 0 64px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

/* Sections */
section { padding: 48px 0; }
.features { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Cards + grids */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(23, 23, 31, 0.05);
}
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 620px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--bg); }
.feature p { color: var(--chip-fg); font-size: 0.95rem; margin-bottom: 0; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--banner-bg);
  color: var(--banner-fg);
  margin-bottom: 12px;
}
.feature-icon svg { width: 22px; height: 22px; }

/* Currency strip */
.currencies-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.currencies-row .section-sub { margin-bottom: 0; }
.currency-chips { display: flex; gap: 10px; }
.chip {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.chip:nth-child(2) { background: #0f7f59; } /* darker than --green so white text passes 4.5:1 */
.chip:nth-child(3) { background: var(--banner-fg); }

/* How it works diagram */
.how-it-works { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.how-it-works .section-sub { margin-left: auto; margin-right: auto; }
.how-svg-wrap { overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.how-svg-wrap svg { display: block; width: 100%; min-width: 1000px; height: auto; }

/* Screenshots band */
.screens { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.screens-band {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  padding-top: 8px;
}

/* Phone frame around a real app screenshot (webpage 2.1, scripts/app-screenshots.mjs) */
.phone {
  width: 270px;
  border: 10px solid var(--ink);
  border-radius: 40px;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(23, 23, 31, 0.18);
  flex: 0 0 auto;
}
.phone-sm { width: 250px; }
.phone img { display: block; width: 100%; height: auto; }

/* Founders bar */
.founders { background: var(--ink); color: #fff; }
.founders-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.founders-row p { margin: 0; }
.founders-left { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 700; font-size: 0.85rem; }

/* Download badges (placeholders until DOWNLOAD_URLS are set) */
.download { text-align: center; }
.download .section-sub { margin-left: auto; margin-right: auto; }
.dl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.dl-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 190px; padding: 10px 18px 10px 14px;
  border-radius: 14px; background: var(--ink); color: #fff;
  text-decoration: none; text-align: left; line-height: 1.15;
  transition: background 0.15s, transform 0.15s;
}
.dl-badge:hover { background: var(--indigo-dark); transform: translateY(-1px); }
.dl-icon { display: inline-flex; width: 30px; height: 30px; flex: 0 0 auto; }
.dl-icon svg { width: 100%; height: 100%; }
.dl-text { display: flex; flex-direction: column; }
.dl-text small { font-size: 0.72rem; letter-spacing: 0.02em; opacity: 0.8; }
.dl-text strong { font-size: 1.05rem; font-weight: 700; }
.dl-badge-soon { background: var(--chip-bg); color: var(--muted); cursor: default; border: 1px dashed #cfcdc6; }
.dl-badge-soon:hover { background: var(--chip-bg); transform: none; }
.dl-badge-soon .dl-text strong { color: var(--chip-fg); }
.dl-web { margin: 22px 0 0; color: var(--chip-fg); }
.dl-web a { font-weight: 600; }
.dl-web-note { color: var(--muted); }

/* Pricing */
.pricing { text-align: center; }
.pricing-card { max-width: 420px; margin: 0 auto; padding: 32px 28px; }
.pricing-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.pricing-price { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.pricing-period { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-alt { color: var(--muted); margin-top: 2px; }
.pricing-list { list-style: none; padding: 0; margin: 20px 0 24px; text-align: left; }
.pricing-list li { padding: 7px 0 7px 28px; position: relative; color: var(--chip-fg); }
.pricing-list li::before { content: '✓'; position: absolute; left: 4px; color: var(--green); font-weight: 700; }
.pricing-more { margin: 18px 0 0; font-size: 0.95rem; }

/* Pricing page */
.pricing-page { text-align: center; padding-top: 40px; }
.pricing-page .lead { margin-left: auto; margin-right: auto; }
.plans { display: grid; gap: 16px; max-width: 760px; margin: 28px auto 0; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, 1fr); } }
/* Three tiers since the Negocio plan (2026-09-22): one row on a wide screen,
   two columns on a tablet, stacked on a phone. */
@media (min-width: 1000px) { .plans { max-width: 1040px; grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; padding: 28px 24px; }
/* Smaller than the landing card's fixed 2.6rem: "US$ 49.99" + the period must
   still fit inside a 320 px-wide phone (card content ≈ 232 px). */
.plan .pricing-price { font-size: clamp(2.1rem, 6vw, 2.6rem); }
.plan .btn { margin-top: auto; align-self: center; }
.plan-featured { border-color: var(--indigo); box-shadow: 0 10px 30px rgba(79, 70, 229, 0.12); }
.plan-badge {
  align-self: center;
  background: var(--banner-bg);
  color: var(--banner-fg);
  border-radius: 999px;
  padding: 3px 12px;
  margin: -6px 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.plan-note { color: var(--muted); font-size: 0.95rem; margin: 6px 0 20px; }
.plan-save { color: var(--banner-fg); font-weight: 600; font-size: 0.92rem; margin: 6px 0 0; }
/* Monthly AI-capture allowance per plan (rest-api 60.1). */
.plan-captures { color: var(--ink); font-weight: 600; font-size: 0.92rem; margin: 8px 0 0; }
.plans-note { color: var(--muted); font-size: 0.92rem; margin: 16px 0 0; }
.included { max-width: 760px; margin: 28px auto 0; text-align: left; }
.included h2 { font-size: 1.15rem; margin-bottom: 0.4em; }
.included .pricing-list { margin: 0; }

/* FAQ (landing + pricing page) */
.faq { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.faq-grid { display: grid; gap: 22px 36px; }
@media (min-width: 760px) { .faq-grid { grid-template-columns: repeat(2, 1fr); } }
.faq-item h3 { margin-bottom: 0.35em; }
.faq-item p { margin: 0; color: var(--chip-fg); font-size: 0.95rem; }

/* CTA band */
.cta-band { background: var(--indigo); color: #fff; text-align: center; padding: 64px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { opacity: 0.85; max-width: 34em; margin: 0 auto 24px; }

/* Referral */
.referral-hero { text-align: center; padding-bottom: 24px; }
.referral-hero .lead { margin-left: auto; margin-right: auto; }
.ref-code-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 6px;
}
.ref-code {
  display: inline-block;
  background: var(--banner-bg);
  color: var(--banner-fg);
  border-radius: 14px;
  padding: 12px 26px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 18px;
}
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step p { margin: 4px 0 0; color: var(--chip-fg); }
.step-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Legal pages */
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 64px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.legal h2 { font-size: 1.25rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal-date { color: var(--muted); font-size: 0.92rem; }

/* Footer */
.site-footer { background: var(--ink); color: #c9c9d4; }
.footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand img { height: 32px; width: auto; }
.footer-tagline { color: #8f8fa0; margin: 10px 0 0; }
.footer-links h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8f8fa0;
  margin-bottom: 10px;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #c9c9d4; text-decoration: none; }
.footer-links a:hover { color: var(--lavender); }
.footer-bottom { border-top: 1px solid #2a2a35; padding-top: 16px; padding-bottom: 20px; }
.footer-bottom p { margin: 0; font-size: 0.85rem; color: #8f8fa0; }

/* 404 page */
.notfound { text-align: center; padding: 72px 0 96px; }
.notfound-code { font-size: 5rem; font-weight: 800; color: var(--banner-bg); line-height: 1; margin: 0 0 8px; }
.notfound p { color: var(--chip-fg); max-width: 34em; margin-left: auto; margin-right: auto; }
