/* ============================================================
   InvoiceGo marketing site — design tokens
   Colors mirror lib/core/theme/app_theme.dart (AppColors) so the
   website and the app read as the same product.
   ============================================================ */

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #3b9eff;
  --primary-light: #6bb5ff;
  --primary-dark: #1a7de0;
  --teal: #2ed9c3;
  --navy: #14295c;
  --brand-gradient: linear-gradient(135deg, var(--primary), var(--teal));
  --navy-gradient: linear-gradient(135deg, var(--navy), var(--primary-dark));

  --bg: #f6f9fe;
  --bg-top: #edf5ff;
  --bg-mid: #e8f2ff;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e3ebf5;

  --text: #1c1c1e;
  --text-secondary: #636366;
  --text-tertiary: #9a9aa0;
  --text-on-dark: #f4f8ff;
  --text-on-dark-secondary: #b9c6dd;

  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;

  --shadow-soft: 0 20px 60px -20px rgba(20, 41, 92, 0.18);
  --shadow-card: 0 1px 2px rgba(20, 41, 92, 0.06), 0 8px 24px -12px rgba(20, 41, 92, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1160px;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

section { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  padding: 7px 14px;
  border-radius: 100px;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; line-height: 1.6; color: var(--text-secondary); }

.h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); line-height: 1.03; letter-spacing: -0.03em; }
.h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; }
.h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 26px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--primary) 55%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-dark {
  background: var(--navy);
  color: #fff;
}
.btn-dark:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav-wrap {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}
.nav {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 16px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 4px 24px -8px rgba(20, 41, 92, 0.1);
  transition: box-shadow 0.3s ease, padding 0.3s ease;
}
.nav.is-scrolled { box-shadow: 0 10px 34px -10px rgba(20, 41, 92, 0.22); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.nav-brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; font-weight: 500; color: var(--text-secondary); }
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-menu-btn { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-flex; }
}
@media (max-width: 480px) {
  .nav-wrap { padding: 0 10px; top: 12px; }
  .nav { padding: 8px 8px 8px 12px; gap: 8px; }
  .nav-brand { font-size: 15px; gap: 8px; }
  .nav-brand img { width: 26px; height: 26px; }
  .nav-cta .btn-dark { display: none; }
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 84px;
  left: 16px;
  right: 16px;
  z-index: 99;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu a {
  padding: 13px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.mobile-menu a:hover { background: var(--bg-mid); }
@media (max-width: 860px) {
  .mobile-menu { display: flex; }
  .mobile-menu.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 168px 0 80px;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 18% 8%, color-mix(in srgb, var(--teal) 22%, transparent), transparent 70%),
    radial-gradient(55% 45% at 85% 15%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 55%, var(--bg) 100%);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.hero-tags { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-size: 13.5px; color: var(--text-tertiary); font-weight: 500; }
.hero-tags span { display: inline-flex; align-items: center; gap: 7px; }
.hero-tags .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  padding: 13px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
}
.badge-soon svg { width: 18px; height: 18px; }

/* ---------- Phone mockup ---------- */
.phone-stage {
  position: relative;
  margin-top: 56px;
  height: 640px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.phone {
  position: absolute;
  width: 280px;
  border-radius: 44px;
  padding: 12px;
  background: #101418;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(40px) scale(0.94);
  transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.phone.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.phone-screen { border-radius: 34px; overflow: hidden; background: #fff; }
.phone-screen img { width: 100%; display: block; }
.phone--center { z-index: 3; top: 0; }
.phone--left { z-index: 2; top: 46px; left: calc(50% - 330px); transform: translateY(40px) rotate(-9deg) scale(0.94); }
.phone--left.is-visible { transform: rotate(-9deg) scale(0.94) translateY(0); transition-delay: 0.1s; }
.phone--right { z-index: 2; top: 46px; right: calc(50% - 330px); transform: translateY(40px) rotate(9deg) scale(0.94); }
.phone--right.is-visible { transform: rotate(9deg) scale(0.94) translateY(0); transition-delay: 0.2s; }
@media (max-width: 900px) {
  .phone-stage { height: 480px; }
  .phone { width: 220px; }
  .phone--left { left: calc(50% - 200px); top: 70px; }
  .phone--right { right: calc(50% - 200px); top: 70px; }
}
@media (max-width: 620px) {
  .phone-stage { height: 420px; }
  .phone--left, .phone--right { display: none; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(.2,.8,.2,1), transform 0.6s cubic-bezier(.2,.8,.2,1); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* ---------- Section header ---------- */
.section { padding: 108px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.section-head.left { align-items: flex-start; text-align: left; margin-left: 0; }

/* ---------- Feature grid (tag pills, like dock.cool's widget grid) ---------- */
.tag-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.tag-pill:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--text); }
.tag-pill .ico { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }

/* ---------- Feature category cards ---------- */
.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .feature-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-cards { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -16px rgba(20,41,92,0.2); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-gradient);
  color: #fff; margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; }
.feature-card .tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.feature-card .tags span { font-size: 12px; color: var(--text-tertiary); background: color-mix(in srgb, var(--primary) 8%, transparent); padding: 4px 10px; border-radius: 100px; }

/* ---------- Screenshot showcase ---------- */
.showcase { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.showcase-frame {
  position: relative;
  width: 280px;
  border-radius: 44px;
  padding: 12px;
  background: #101418;
  box-shadow: var(--shadow-soft);
}
.showcase-frame .phone-screen { border-radius: 34px; overflow: hidden; }
.showcase-frame img { width: 100%; display: block; opacity: 0; transition: opacity 0.35s ease; }
.showcase-frame img.is-active { opacity: 1; position: relative; }
.showcase-frame img:not(.is-active) { position: absolute; top: 12px; left: 12px; width: calc(100% - 24px); }
.showcase-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.showcase-tab {
  padding: 10px 18px; border-radius: 100px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; transition: all 0.25s ease;
}
.showcase-tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.showcase-tab:hover:not(.is-active) { border-color: var(--primary); color: var(--text); }

/* ---------- Security / trust band ---------- */
.trust-band {
  background: var(--navy-gradient);
  border-radius: 36px;
  padding: 64px 40px;
  color: var(--text-on-dark);
  overflow: hidden;
  position: relative;
}
.trust-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 90% 0%, color-mix(in srgb, var(--teal) 35%, transparent), transparent 70%);
  pointer-events: none;
}
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 44px; position: relative; }
@media (max-width: 980px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item { display: flex; flex-direction: column; gap: 10px; }
.trust-item .ico { width: 34px; height: 34px; color: var(--teal); }
.trust-item h4 { color: #fff; font-size: 16px; }
.trust-item p { color: var(--text-on-dark-secondary); font-size: 13.5px; }
.trust-band .section-head p { color: var(--text-on-dark-secondary); }
.trust-band .section-head h2 { color: #fff; }
.trust-band .eyebrow { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: #fff; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--text); text-align: left;
}
.faq-q .chev { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.3s ease; color: var(--text-tertiary); }
.faq-item.is-open .faq-q .chev { transform: rotate(180deg); color: var(--primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a-inner { padding: 0 22px 20px; font-size: 14.5px; color: var(--text-secondary); }

/* ---------- Final CTA ---------- */
.cta-band { text-align: center; padding: 100px 0 60px; }
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 72px 32px;
  box-shadow: var(--shadow-card);
}

/* ---------- Footer ---------- */
footer { padding: 56px 0 40px; border-top: 1px solid var(--border); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.footer-brand img { width: 28px; height: 28px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h5 { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; font-size: 14.5px; color: var(--text-secondary); margin-bottom: 10px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--primary-dark); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-tertiary); padding-top: 28px; border-top: 1px solid var(--border); }

/* ---------- Legal pages ---------- */
.legal { padding: 150px 0 100px; }
.legal-header { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.legal-body { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.legal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; box-shadow: var(--shadow-card); }
.legal-card + .legal-card { margin-top: 0; }
.legal-section + .legal-section { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border); }
.legal-section h3 { font-size: 15.5px; margin-bottom: 10px; }
.legal-section p, .legal-section li { font-size: 14.5px; color: var(--text-secondary); }
.legal-section ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-updated { font-size: 13px; color: var(--text-tertiary); text-align: center; }

.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 48px; }
@media (max-width: 700px) { .support-grid { grid-template-columns: 1fr; } }
.support-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-card); }
.support-card .feature-icon { margin-bottom: 14px; }
.support-card h3 { margin-bottom: 8px; font-size: 17px; }
.support-card p { font-size: 14px; margin-bottom: 16px; }

/* ---------- Utility ---------- */
.stack { display: flex; flex-direction: column; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
