/* ===== Design tokens (matched to Regulancy app) ===== */
:root {
  --bg: 225 100% 98%;
  --fg: 206 12% 11%;
  --card: 0 0% 100%;
  --card-fg: 206 12% 11%;
  --muted: 223 70% 96%;
  --muted-fg: 218 13% 41%;
  --primary: 226 68% 54%;
  --primary-fg: 0 0% 100%;
  --primary-hover: 226 68% 48%;
  --border: 221 49% 92%;
  --input: 221 49% 90%;
  --ring: 226 68% 54%;
  --success: 128 84% 33%;
  --warning: 45 90% 57%;
  --destructive: 0 72% 45%;
  --brand-300: 226 58% 44%;
  --brand-400: 226 68% 54%;
  --brand-500: 227 71% 58%;
  --brand-600: 226 68% 54%;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --container: 72rem;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: 221 37% 9%;
  --fg: 220 52% 94%;
  --card: 221 31% 13%;
  --card-fg: 220 52% 94%;
  --muted: 220 30% 16%;
  --muted-fg: 219 22% 69%;
  --primary: 227 71% 58%;
  --primary-fg: 0 0% 100%;
  --primary-hover: 227 71% 64%;
  --border: 219 26% 22%;
  --input: 219 26% 22%;
  --ring: 227 71% 58%;
  --brand-300: 230 94% 82%;
  --brand-400: 227 77% 74%;
  --brand-500: 227 71% 58%;
  --brand-600: 226 68% 54%;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  overflow-x: hidden;
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: hsl(var(--bg));
  color: hsl(var(--fg));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .2s ease, color .2s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; margin: 0; color: hsl(var(--fg)); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: hsl(var(--bg) / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.625rem; }
.brand-logo { width: 32px; height: 32px; border-radius: 0.625rem; object-fit: contain; }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-links { display: none; gap: 1.5rem; margin-left: 2rem; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: hsl(var(--muted-fg)); transition: color .15s; }
.nav-links a:hover { color: hsl(var(--fg)); }
.nav-actions { display: none; align-items: center; gap: 0.5rem; margin-left: auto; }
.menu-btn { display: flex; }
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-actions { display: flex; }
  .menu-btn { display: none; }
}

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-fg));
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: hsl(var(--fg)); border-color: hsl(var(--primary)); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .icon { display: none; }
[data-theme="light"] .icon-btn .sun { display: block; }
[data-theme="dark"] .icon-btn .moon { display: block; }

.mobile-menu {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--bg));
}
.mobile-menu a { padding: 0.625rem 0.75rem; border-radius: var(--radius); font-weight: 500; }
.mobile-menu a:hover { background: hsl(var(--muted)); }
.mobile-menu .btn { margin-top: 0.5rem; justify-content: center; }
.mobile-menu[hidden] { display: none !important; }
.mobile-menu-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }

.lang-wrap { position: relative; display: inline-block; }
.lang-wrap .icon-btn { width: auto; padding: 0 0.6rem; gap: 0.35rem; font-size: 0.75rem; font-weight: 600; }
.lang-current { font-size: 0.75rem; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  min-width: 160px; background: hsl(var(--card));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 0.375rem; z-index: 60;
  display: flex; flex-direction: column; gap: 0.125rem;
}
.lang-menu[hidden] { display: none !important; }
.lang-menu button {
  text-align: left; padding: 0.5rem 0.75rem; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 500; color: hsl(var(--fg));
  min-height: 36px;
}
.lang-menu button:hover { background: hsl(var(--muted)); color: hsl(var(--primary)); }
.lang-menu-mobile { position: static; box-shadow: none; border: 1px solid hsl(var(--border)); }

/* ===== Contact form (matches app input styling) ===== */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: hsl(var(--muted-fg));
}
.field-input {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card)); color: hsl(var(--fg));
  padding: 0.625rem 0.875rem; font-size: 0.9rem; font-family: var(--font-body);
  outline: none; transition: border-color .15s, box-shadow .15s;
  min-height: 44px;
}
.field-input::placeholder { color: hsl(var(--muted-fg)); opacity: 0.6; }
.field-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
}
.field-textarea { min-height: 120px; resize: vertical; }
.form-status { font-size: 0.85rem; color: hsl(var(--muted-fg)); margin: 0; min-height: 1.2em; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: var(--radius-lg);
  font-size: 0.9rem; font-weight: 600;
  transition: transform .12s ease, background-color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap; min-height: 40px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
}
.btn:active { transform: translateY(0); }
.btn-primary {
  background: hsl(var(--primary)); color: hsl(var(--primary-fg));
  box-shadow: 0 4px 14px hsl(var(--primary) / 0.35);
}
.btn-primary:hover { background: hsl(var(--primary-hover)); box-shadow: 0 6px 18px hsl(var(--primary) / 0.45); }
.btn-ghost {
  background: hsl(var(--card)); color: hsl(var(--fg));
  border: 1px solid hsl(var(--border));
}
.btn-ghost:hover { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; min-height: 48px; border-radius: var(--radius-xl); }
.btn .arrow { width: 18px; height: 18px; }

/* ===== HERO ===== */
.hero { padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.hero-inner {
  display: grid; gap: 3rem; align-items: center;
}
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; gap: 2rem; }
  .hero { padding: 6rem 0 4rem; }
}
.hero-copy { max-width: 640px; }
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.875rem; border-radius: 9999px;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid hsl(var(--primary) / 0.2);
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
}
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  margin-top: 1.25rem; letter-spacing: -0.02em;
  background: linear-gradient(135deg, hsl(var(--fg)) 0%, hsl(var(--primary)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.br-md { display: none; }
@media (min-width: 768px) { .br-md { display: inline; } }
.hero-sub {
  margin-top: 1.25rem; font-size: 1.1rem; line-height: 1.7;
  color: hsl(var(--muted-fg)); max-width: 540px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 480px) {
  .hero-ctas .btn, .final-ctas .btn { width: 100%; }
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.5rem;
  padding-top: 1.5rem; border-top: 1px solid hsl(var(--border));
}
.hero-meta-item { display: flex; flex-direction: column; }
.hero-meta-item strong { font-family: var(--font-heading); font-size: 1rem; color: hsl(var(--fg)); }
.hero-meta-item span { font-size: 0.75rem; color: hsl(var(--muted-fg)); text-transform: uppercase; letter-spacing: 0.06em; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 360px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius-2xl); padding: 1.25rem;
  box-shadow: var(--shadow-lg);
}
.hc-header { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 1rem; }
.hc-dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--success)); }
.hc-title { font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; }
.hc-status {
  margin-left: auto; font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem;
  border-radius: 9999px; background: hsl(var(--success) / 0.12); color: hsl(var(--success));
}
.hc-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dashed hsl(var(--border)); font-size: 0.85rem; }
.hc-row:last-of-type { border-bottom: none; }
.hc-label { color: hsl(var(--muted-fg)); }
.hc-val { font-weight: 600; }
.hc-val.ok { color: hsl(var(--success)); }
.hc-bar { height: 6px; border-radius: 9999px; background: hsl(var(--muted)); margin-top: 0.75rem; overflow: hidden; }
.hc-bar-fill { height: 100%; width: 82%; border-radius: 9999px; background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--brand-500))); }
.hc-foot { margin-top: 0.75rem; font-size: 0.75rem; color: hsl(var(--muted-fg)); text-align: center; }

.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; z-index: 1;
}
.b1 { width: 280px; height: 280px; background: hsl(var(--primary) / 0.35); top: -40px; right: -60px; }
.b2 { width: 220px; height: 220px; background: hsl(var(--brand-500) / 0.3); bottom: -60px; left: -40px; }

/* ===== TRUST STRIP ===== */
.trust-strip { padding: 2rem 0; border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--muted) / 0.5); }
.trust-strip-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.trust-strip-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: hsl(var(--muted-fg)); font-weight: 600; }
.trust-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.5rem; }
.trust-logos span { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: hsl(var(--muted-fg)); opacity: 0.7; }

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; content-visibility: auto; contain-intrinsic-size: 1px 800px; }
.section-alt { background: hsl(var(--muted) / 0.4); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: hsl(var(--primary)); margin-bottom: 0.75rem;
}
.section-head h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.015em; }
.section-sub { margin-top: 0.75rem; color: hsl(var(--muted-fg)); font-size: 1.05rem; line-height: 1.6; }
.section-cta { text-align: center; margin-top: 2.5rem; }

/* ===== GRID ===== */
.grid { display: grid; gap: 1.25rem; }
.features-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.testimonials-grid { grid-template-columns: 1fr; }
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== CARD ===== */
.card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: hsl(var(--primary) / 0.3); }
}

.feature-card { display: flex; flex-direction: column; gap: 0.75rem; }
.feat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
}
.feat-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { color: hsl(var(--muted-fg)); font-size: 0.9rem; line-height: 1.6; }

.trust-card { text-align: center; }
.trust-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.trust-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.trust-card p { color: hsl(var(--muted-fg)); font-size: 0.85rem; line-height: 1.6; }

.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.badge-pill {
  padding: 0.375rem 0.875rem; border-radius: 9999px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  font-size: 0.8rem; font-weight: 600; color: hsl(var(--muted-fg));
}

/* ===== STEPS ===== */
.steps { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; max-width: 900px; margin: 0 auto; }
@media (min-width: 768px) { .steps { flex-direction: row; align-items: center; } }
.step { flex: 1; text-align: center; padding: 1.5rem; }
.step-num {
  font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--brand-500)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1; margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { color: hsl(var(--muted-fg)); font-size: 0.9rem; }
.step-connector { display: none; }
@media (min-width: 768px) {
  .step-connector { display: block; flex: 0 0 40px; height: 2px; background: linear-gradient(90deg, hsl(var(--primary) / 0.3), hsl(var(--primary) / 0.3)); position: relative; }
  .step-connector::after { content: ""; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--primary)); }
}

/* ===== METRICS ===== */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; text-align: center; }
@media (min-width: 768px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric-num { font-family: var(--font-heading); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; color: hsl(var(--primary)); }
.metric-label { font-size: 0.85rem; color: hsl(var(--muted-fg)); margin-top: 0.25rem; }

/* ===== TESTIMONIALS ===== */
.testimonial { display: flex; flex-direction: column; gap: 1rem; }
.testimonial blockquote { font-size: 0.95rem; line-height: 1.6; color: hsl(var(--fg)); flex: 1; }
.testimonial figcaption { display: flex; align-items: center; gap: 0.75rem; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--brand-500)));
  color: white; font-weight: 700; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.testimonial figcaption div { display: flex; flex-direction: column; }
.testimonial figcaption strong { font-size: 0.9rem; }
.testimonial figcaption span { font-size: 0.75rem; color: hsl(var(--muted-fg)); }

/* ===== FINAL CTA ===== */
.final-cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--brand-500)) 100%);
  color: white; text-align: center;
}
.final-cta h2 { color: white; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.final-cta p { color: rgba(255,255,255,0.85); margin-top: 0.75rem; font-size: 1.05rem; }
.final-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }
.final-cta .btn-primary { background: white; color: hsl(var(--primary)); box-shadow: none; }
.final-cta .btn-primary:hover { background: rgba(255,255,255,0.9); }
.final-cta .btn-ghost { background: transparent; color: white; border-color: rgba(255,255,255,0.5); }
.final-cta .btn-ghost:hover { border-color: white; color: white; background: rgba(255,255,255,0.1); }

/* ===== FOOTER ===== */
.footer { padding: 3rem 0 1.5rem; border-top: 1px solid hsl(var(--border)); background: hsl(var(--card)); }
.footer-inner { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1.5fr 2fr; } }
.footer-brand .brand { margin-bottom: 0.75rem; }
.footer-tag { color: hsl(var(--muted-fg)); font-size: 0.85rem; margin-top: 0.5rem; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-links h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: hsl(var(--muted-fg)); margin-bottom: 0.75rem; }
.footer-links a { display: block; font-size: 0.9rem; color: hsl(var(--fg)); padding: 0.25rem 0; opacity: 0.8; transition: opacity .15s, color .15s; }
.footer-links a:hover { opacity: 1; color: hsl(var(--primary)); }
.footer-bottom {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1.5rem; border-top: 1px solid hsl(var(--border));
  font-size: 0.8rem; color: hsl(var(--muted-fg));
}

/* ===== RESPONSIVE TOUCH ===== */
@media (max-width: 768px) {
  button, a, [role="button"] { min-height: 48px; min-width: 48px; }
  .btn { min-height: 48px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
}
button, a, [role="button"], input, select, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-copy, .hero-visual { animation: fadeUp .6s ease-out both; }
.hero-visual { animation-delay: .15s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
