/* ============================================================
   Smart Budget Tracker — styles.css
   Palette: Primary #1E88E5 · Secondary #26A69A · Accent #FFB300
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  --primary: #1E88E5;
  --primary-dark: #1565C0;
  --secondary: #26A69A;
  --accent: #FFB300;
  --accent-dark: #FF8F00;

  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --bg-card: #ffffff;
  --text: #1a2233;
  --text-soft: #5a6b85;
  --border: #e6ecf5;
  --shadow-sm: 0 2px 10px rgba(30,136,229,.07);
  --shadow-md: 0 12px 30px rgba(30,136,229,.12);
  --shadow-lg: 0 24px 60px rgba(30,136,229,.18);

  --grad: linear-gradient(135deg, var(--primary), var(--secondary));
  --grad-soft: linear-gradient(135deg, #e8f2fd, #e6f6f3);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --header-h: 72px;

  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
  --bg: #0c1424;
  --bg-soft: #111c30;
  --bg-card: #15203a;
  --text: #e8eef9;
  --text-soft: #9aabc7;
  --border: #21304d;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
  --shadow-md: 0 12px 30px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  --grad-soft: linear-gradient(135deg, #14233f, #12302c);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
.lead { font-size: 1.15rem; color: var(--text-soft); }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { color: var(--text-soft); margin-top: 12px; font-size: 1.05rem; }

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  border: none; border-radius: var(--radius-sm); padding: 11px 22px;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(.97); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #2a1c00; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--primary); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { box-shadow: var(--shadow-md); }

/* ---- Loader ---- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Header ---- */
#header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
#header.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-weight: 500; font-size: .95rem; color: var(--text-soft); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--primary); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--primary); transition: width .25s; }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; transition: transform .2s; }
.theme-toggle:hover { transform: rotate(20deg); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Sections ---- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); }

/* ---- Hero ---- */
.hero { padding: 64px 0 88px; background: var(--grad-soft); position: relative; overflow: hidden; }
.hero::before { content:''; position:absolute; top:-120px; right:-120px; width:380px; height:380px; border-radius:50%; background:radial-gradient(circle, rgba(30,136,229,.18), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; position: relative; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lead { margin-bottom: 30px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }
.hero-stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--primary); }
.hero-stats span { font-size: .85rem; color: var(--text-soft); }
.hero-art img { filter: drop-shadow(var(--shadow-lg)); }
.floaty { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---- Features ---- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-card .fi { font-size: 2rem; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--grad-soft); border-radius: 14px; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-soft); font-size: .92rem; }

/* ---- Demo ---- */
.demo-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.demo-grid h2 { margin: 8px 0 16px; }
.demo-grid p { color: var(--text-soft); margin-bottom: 20px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--text); }
.checklist li::before { content: '✔'; position: absolute; left: 0; color: var(--secondary); font-weight: 700; }
.video-frame {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  background: var(--grad); box-shadow: var(--shadow-lg);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; }
.play-btn { width: 84px; height: 84px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.play-btn:hover { transform: scale(1.08); }
.play-icon { width: 0; height: 0; border-left: 22px solid var(--primary); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.play-btn::after { content:''; position:absolute; width:84px; height:84px; border-radius:50%; border:3px solid rgba(255,255,255,.6); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity:.7; } 100% { transform: scale(1.5); opacity:0; } }
.video-label { color: #fff; font-weight: 600; }

/* ---- Carousel ---- */
.carousel { display: flex; align-items: center; gap: 14px; }
.car-viewport { overflow: hidden; border-radius: var(--radius); flex: 1; }
.car-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.car-slide { min-width: 100%; }
.car-slide img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.car-slide figcaption { text-align: center; margin-top: 14px; font-weight: 600; color: var(--text-soft); }
.car-arrow { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); color: var(--primary); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); transition: background .2s, transform .2s; }
.car-arrow:hover { background: var(--primary); color: #fff; transform: scale(1.05); }
.car-dots { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.car-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; transition: background .2s, width .2s; }
.car-dot.active { background: var(--primary); width: 26px; border-radius: 5px; }

/* ---- Pricing ---- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 420px));
    gap: 28px;
    justify-content: center;
    align-items: stretch;
}
.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 38px 30px 30px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}
.price-card .btn-block { margin-top: auto; }
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.price-card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #2a1c00; font-weight: 700; font-size: .78rem; padding: 6px 16px; border-radius: 20px; }
.price-card h3 { font-size: 1.4rem; margin-bottom: 14px; }
.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.price .amount { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--text); }
.price .per { color: var(--text-soft); font-weight: 500; }
.price-sub { color: var(--text-soft); font-size: .92rem; margin-bottom: 22px; }
.price-desc { color: var(--text-soft); font-size: .85rem; line-height: 1.55; margin: -14px 0 20px; }
.price-features { margin-bottom: 26px; flex: 1; }
.price-features li { padding: 9px 0 9px 28px; position: relative; border-bottom: 1px solid var(--border); font-size: .95rem; }
.price-features li::before { content: '✔'; position: absolute; left: 0; color: var(--secondary); font-weight: 700; }

/* ---- Payment ---- */
.ssl-note { color: var(--secondary); font-weight: 600; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 36px; }
.pay-chip { background: var(--bg-card); border: 1px solid var(--border); border-radius: 30px; padding: 10px 20px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-sm); transition: transform .2s, border-color .2s; }
.pay-chip:hover { transform: translateY(-3px); border-color: var(--primary); }
.pay-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Compare table ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.compare { width: 100%; border-collapse: collapse; background: var(--bg-card); min-width: 480px; }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.compare thead th { background: var(--grad); color: #fff; font-family: var(--font-display); }
.compare thead th:not(:first-child), .compare td:not(:first-child) { text-align: center; }
.compare tbody tr:hover { background: var(--bg-soft); }
.compare .yes { color: var(--secondary); font-weight: 700; }
.compare .no { color: #c0392b; font-weight: 700; }
.compare .hl { color: var(--primary); font-weight: 700; }

/* ---- Testimonials ---- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: transform .25s, box-shadow .25s; }
.testi-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 14px; }
.testi-card blockquote { font-size: 1rem; margin-bottom: 22px; color: var(--text); }
.testi-card figcaption { display: flex; align-items: center; gap: 12px; }
.testi-card figcaption img { border-radius: 50%; }
.testi-card figcaption strong { display: block; font-size: .95rem; }
.testi-card figcaption span { font-size: .82rem; color: var(--text-soft); }

/* ---- FAQ ---- */
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 22px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-ico { font-size: 1.4rem; color: var(--primary); transition: transform .3s; flex-shrink: 0; }
.faq-item.open .faq-ico { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 22px 18px; color: var(--text-soft); }

/* ---- CTA ---- */
.cta-section { background: var(--grad); color: #fff; text-align: center; }
.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,.9); margin-bottom: 28px; font-size: 1.1rem; }

/* ---- Footer ---- */
.footer { background: #0c1424; color: #c9d4e8; padding: 64px 0 24px; }
[data-theme="dark"] .footer { background: #070d18; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.3fr; gap: 36px; }
.brand.light { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: .92rem; color: #9aabc7; max-width: 320px; }
.socials { display: flex; gap: 12px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.07); border-radius: 10px; transition: background .2s, transform .2s; }
.socials a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-col a { display: block; color: #9aabc7; font-size: .9rem; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-contact input, .footer-contact textarea, .footer-news input {
  width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 11px 14px; color: #fff; margin-bottom: 10px; font-family: inherit; font-size: .9rem;
}
.footer-contact input::placeholder, .footer-contact textarea::placeholder, .footer-news input::placeholder { color: #7d8aa3; }
.footer-contact input:focus, .footer-contact textarea:focus, .footer-news input:focus { outline: none; border-color: var(--primary); }
.footer-news p { font-size: .88rem; color: #9aabc7; margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; margin-top: 40px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: #7d8aa3; flex-wrap: wrap; gap: 10px; }

/* ---- Floating + Back to top ---- */
.floating-upgrade { position: fixed; bottom: 24px; left: 24px; z-index: 900; background: var(--accent); color: #2a1c00; border: none; border-radius: 30px; padding: 13px 22px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-lg); animation: floaty 3s ease-in-out infinite; transition: transform .2s; }
.floating-upgrade:hover { transform: scale(1.05); }
.back-top { position: fixed; bottom: 24px; right: 24px; z-index: 900; width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 1.3rem; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s; }
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---- Modals ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(10,18,33,.7); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg-card); border-radius: 20px; padding: 36px 30px; max-width: 420px; width: 100%; position: relative; box-shadow: var(--shadow-lg); animation: modalin .3s ease; }
@keyframes modalin { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 8px; }
.modal-sub { color: var(--text-soft); font-size: .92rem; margin-bottom: 20px; }
.modal form { margin-top: 18px; }
.modal input { width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-family: inherit; font-size: .95rem; color: var(--text); }
.modal input:focus { outline: none; border-color: var(--primary); }
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 1.6rem; color: var(--text-soft); cursor: pointer; line-height: 1; }
.modal-switch { text-align: center; margin-top: 16px; font-size: .9rem; color: var(--text-soft); }
.modal-switch a { color: var(--primary); font-weight: 600; cursor: pointer; }
.lead-emoji { font-size: 2.4rem; display: block; margin-bottom: 8px; }

/* ---- Cookie banner ---- */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1500; background: var(--bg-card); border-top: 1px solid var(--border); padding: 16px 24px; display: none; align-items: center; justify-content: space-between; gap: 20px; box-shadow: 0 -8px 24px rgba(0,0,0,.1); flex-wrap: wrap; }
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: .9rem; color: var(--text-soft); }
.cookie-banner a { color: var(--primary); }
.cookie-actions { display: flex; gap: 10px; }

/* ---- Toast ---- */
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 3000; background: var(--text); color: var(--bg); padding: 13px 24px; border-radius: 12px; font-weight: 500; font-size: .92rem; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: all .3s; }
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---- Scroll Reveal ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .hero-grid, .demo-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: minmax(0, 520px); }
  .hero-art { order: -1; max-width: 480px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-card); flex-direction: column; gap: 0;
    padding: 12px 24px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md); transform: translateY(-120%); transition: transform .3s; z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-links a::after { display: none; }
  .hamburger { display: flex; }
  .nav-actions .btn-ghost, .nav-actions .btn-primary { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero-stats { gap: 24px; }
  .floating-upgrade { padding: 11px 16px; font-size: .9rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .pay-actions, .hero-cta { flex-direction: column; }
  .pay-actions .btn, .hero-cta .btn { width: 100%; }
}

/* ---- Accessibility ---- */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
