:root {
  --primary: #2557f5;
  --primary-light: #5b7cfa;
  --primary-dark: #173eb8;
  --primary-wash: rgba(37, 87, 245, .09);
  --accent: #ff6b5e;
  --accent-wash: rgba(255, 107, 94, .12);
  --mint: #22c99a;
  --mint-wash: rgba(34, 201, 154, .12);
  --bg-app: #fbfaf7;
  --bg-surface: #fff;
  --bg-surface-glass: rgba(255, 255, 255, .86);
  --text-main: #0b1221;
  --text-muted: #4e5d74;
  --text-faint: #77849a;
  --border-light: rgba(11, 18, 33, .08);
  --border-strong: rgba(11, 18, 33, .15);
  --shadow-lg: 0 18px 50px rgba(11, 18, 33, .10);
  --shadow-xl: 0 28px 80px rgba(11, 18, 33, .14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

[data-theme="dark"] {
  --bg-app: #070b14;
  --bg-surface: #101725;
  --bg-surface-glass: rgba(16, 23, 37, .88);
  --text-main: #f5f7fb;
  --text-muted: #a9b4c8;
  --text-faint: #7c899f;
  --border-light: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
}

html { scroll-padding-top: 96px; }
body { background: var(--bg-app); font-size: 16px; }
body::before {
  position: fixed;
  height: 780px;
  background:
    linear-gradient(115deg, rgba(37, 87, 245, .10), transparent 46%),
    radial-gradient(circle at 78% 14%, rgba(255, 107, 94, .13), transparent 24%),
    radial-gradient(circle at 65% 42%, rgba(34, 201, 154, .10), transparent 26%);
}

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 999;
  padding: 12px 16px; border-radius: 10px; background: var(--text-main); color: var(--bg-surface);
}
.skip-link:focus { top: 12px; }

header {
  top: 12px; width: min(1180px, calc(100% - 32px)); margin: 0 auto;
  border: 1px solid var(--border-light); border-radius: 18px;
  box-shadow: 0 10px 35px rgba(11, 18, 33, .07);
}
.nav-inner { max-width: none; padding: 9px 12px 9px 16px; }
.brand { letter-spacing: -.035em; }
.logo-icon { background: var(--text-main); transform: none; border-radius: 11px; box-shadow: none; }
.brand span { color: var(--primary); }
.nav-links { gap: 26px; }
.nav-links a { font-size: 14px; color: var(--text-muted); }
.nav-links a:hover { color: var(--text-main); }
.btn { min-height: 46px; padding: 11px 20px; border-radius: 12px; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
.btn-primary { background: var(--primary); box-shadow: 0 8px 22px rgba(37, 87, 245, .24); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(37, 87, 245, .30); }
.btn-outline { background: var(--bg-surface); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--text-main); border-color: var(--text-main); color: var(--bg-surface); transform: translateY(-2px); }
.btn-coral { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(255, 107, 94, .22); }
.btn-coral:hover { transform: translateY(-2px); background: #e64d43; }

.hero {
  min-height: calc(100svh - 24px); max-width: 1180px; padding: 162px 24px 96px;
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(480px, 1.08fr);
  grid-template-areas: "badge console" "title console" "copy console" "cta console" "proof console";
  gap: 0 70px; text-align: left; align-items: center;
}
.hero .badge { grid-area: badge; justify-self: start; margin-bottom: 22px; animation: none; background: var(--mint-wash); color: #087759; border-color: rgba(34, 201, 154, .25); letter-spacing: .01em; }
[data-theme="dark"] .hero .badge { color: #78e8c8; }
.hero-title { grid-area: title; font-size: clamp(48px, 5.3vw, 74px); line-height: 1.02; margin-bottom: 24px; letter-spacing: -.055em; }
.hero-title span:last-child { background: none; -webkit-text-fill-color: var(--primary); color: var(--primary); }
.hero-subtitle { grid-area: copy; max-width: 580px; margin: 0 0 30px; font-size: 18px; line-height: 1.65; text-wrap: pretty; }
.hero-cta { grid-area: cta; justify-content: flex-start; margin: 0 0 30px; }
.hero-proof { grid-area: proof; display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 13px; font-weight: 650; }
.avatar-stack { display: flex; }
.avatar-stack span { width: 30px; height: 30px; margin-left: -7px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--bg-app); color: #fff; font-size: 10px; font-weight: 800; }
.avatar-stack span:first-child { margin-left: 0; background: var(--primary); }
.avatar-stack span:nth-child(2) { background: var(--accent); }
.avatar-stack span:nth-child(3) { background: var(--mint); }
.avatar-stack span:nth-child(4) { background: var(--text-main); }

.console-widget { grid-area: console; width: 100%; border-radius: 24px; transform: rotate(1deg); border: 1px solid rgba(37, 87, 245, .16); box-shadow: 0 30px 90px rgba(37, 87, 245, .16), 0 12px 30px rgba(11, 18, 33, .10); }
.console-widget:hover { transform: rotate(0deg) translateY(-5px); }
.console-widget::before { content: "LIVE TOOL"; position: absolute; top: -15px; right: 22px; z-index: 2; padding: 7px 11px; border-radius: 8px; background: var(--accent); color: #fff; font: 800 11px/1 var(--font-sans); letter-spacing: .08em; }
.console-header { background: var(--text-main); color: #fff; border: 0; }
.console-header span { color: rgba(255,255,255,.64); }
.console-body { padding: 22px; }
.search-bar { min-height: 54px; background: var(--bg-surface); border-radius: 12px; }
.search-bar button { min-height: 40px; background: var(--primary); }
.quota-meter { border: 0; background: linear-gradient(90deg, var(--primary-wash), var(--mint-wash)); }
.guest-nudge { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.guest-nudge a { color: var(--primary); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.trust-strip { border-block: 1px solid var(--border-light); background: var(--bg-surface); }
.trust-inner { min-height: 96px; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); align-items: center; gap: 28px; }
.trust-title { font-weight: 800; letter-spacing: -.02em; }
.trust-stat { display: flex; align-items: baseline; gap: 8px; }
.trust-stat b { font: 800 24px/1 var(--font-mono); color: var(--primary); }
.trust-stat span { color: var(--text-muted); font-size: 13px; }

.quick-tools { padding: 105px 0 36px; }
.section-kicker { display: block; margin-bottom: 12px; color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.quick-head { display: grid; grid-template-columns: 1fr .72fr; align-items: end; gap: 64px; margin-bottom: 36px; }
.quick-head h2, .section-header h2 { font-size: clamp(34px, 4vw, 54px); line-height: 1.08; letter-spacing: -.045em; }
.quick-head p { color: var(--text-muted); font-size: 17px; }
.tool-launcher { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--border-light); border-radius: 20px; overflow: hidden; background: var(--bg-surface); }
.tool-launch { min-height: 118px; padding: 20px; border: 0; border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); background: transparent; color: var(--text-main); text-align: left; cursor: pointer; font-family: inherit; transition: background .18s ease, color .18s ease, transform .18s ease; }
.tool-launch:nth-child(5n) { border-right: 0; }
.tool-launch:nth-child(n+6) { border-bottom: 0; }
.tool-launch:hover { position: relative; z-index: 1; background: var(--primary); color: #fff; transform: translateY(-3px); }
.tool-launch b { display: block; margin: 14px 0 4px; font-size: 15px; }
.tool-launch span { color: var(--text-faint); font-size: 12px; }
.tool-launch:hover span { color: rgba(255,255,255,.7); }
.tool-launch .free-dot { display: inline-flex; width: auto; padding: 3px 6px; border-radius: 6px; background: var(--mint-wash); color: #087759; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.tool-launch:hover .free-dot { background: rgba(255,255,255,.18); color: #fff; }

.modules { padding: 78px 0 110px; }
.section-header { text-align: left; max-width: 760px; margin: 0 0 42px; }
.section-header p { max-width: 650px; margin: 0; font-size: 17px; }
.grid-3 { grid-template-columns: repeat(12, 1fr); gap: 16px; }
.module-card { grid-column: span 4; min-height: 300px; padding: 28px; border-radius: 16px; box-shadow: none; }
.module-card:nth-child(1), .module-card:nth-child(4) { grid-column: span 5; }
.module-card:nth-child(2), .module-card:nth-child(5) { grid-column: span 3; }
.module-card::before { display: none; }
.module-card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(11,18,33,.09); border-color: rgba(37,87,245,.28); }
.module-icon { width: 42px; height: 42px; margin-bottom: 42px; border-radius: 10px; }
.module-icon svg { width: 21px; height: 21px; }
.module-card h3 { font-size: 22px; }
.module-card p { font-size: 14px; }
.tool-chip { border-radius: 7px; padding: 5px 9px; font-size: 11px; }

.journey { padding: 108px 0; background: var(--text-main); color: #fff; }
.journey .section-kicker { color: #78e8c8; }
.journey-head { display: grid; grid-template-columns: 1fr .65fr; gap: 70px; align-items: end; margin-bottom: 54px; }
.journey h2 { max-width: 720px; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.06; letter-spacing: -.045em; }
.journey-head p { color: rgba(255,255,255,.62); font-size: 17px; }
.journey-steps { display: grid; grid-template-columns: repeat(4, 1fr); }
.journey-step { min-height: 260px; padding: 28px; border-top: 1px solid rgba(255,255,255,.16); border-right: 1px solid rgba(255,255,255,.12); }
.journey-step:last-child { border-right: 0; }
.journey-step .num { font: 700 12px/1 var(--font-mono); color: #78e8c8; }
.journey-step h3 { margin: 56px 0 12px; font-size: 22px; }
.journey-step p { color: rgba(255,255,255,.58); font-size: 14px; }
.journey-step a { display: inline-block; margin-top: 18px; color: #fff; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

.dashboard-preview { padding: 110px 0; background: var(--bg-surface); }
.dash-container { border-radius: 18px; padding: 18px; }
.stats-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.stat-card { border-radius: 12px; box-shadow: none; }
.stat-label { font-size: 11px; }
.stat-value { font-size: 30px; }

.pricing { padding: 110px 24px; }
.billing-toggle { display: inline-flex; padding: 4px; margin: 0 0 28px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-surface); }
.billing-toggle button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-muted); font: 750 13px var(--font-sans); cursor: pointer; }
.billing-toggle button.on { background: var(--text-main); color: var(--bg-surface); }
.billing-toggle em { margin-left: 5px; color: var(--mint); font-style: normal; }
.pricing-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: stretch; }
.price-card { padding: 26px 22px; border-radius: 16px; box-shadow: none; }
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.price-card.popular { border: 1px solid var(--primary); box-shadow: inset 0 4px 0 var(--primary); }
.popular-badge { position: static; transform: none; align-self: flex-start; margin-bottom: 16px; border-radius: 7px; box-shadow: none; }
.plan-name { color: var(--text-main); font-size: 17px; }
.plan-price { font-size: 38px; }
.plan-desc { min-height: 66px; font-size: 13px; }
.plan-features li { font-size: 13px; gap: 8px; }
.plan-features li svg { width: 17px; height: 17px; }
.plan-ladder-note { margin-top: 22px; color: var(--text-muted); font-size: 13px; text-align: center; }

.final-cta { padding: 0 24px 110px; }
.final-cta-inner { position: relative; overflow: hidden; padding: 64px; border-radius: 24px; background: var(--primary); color: #fff; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
.final-cta-inner::after { content: ""; position: absolute; width: 280px; height: 280px; right: 20%; top: -170px; border: 60px solid rgba(255,255,255,.10); border-radius: 50%; }
.final-cta h2 { max-width: 700px; font-size: clamp(32px, 4vw, 50px); line-height: 1.08; letter-spacing: -.04em; }
.final-cta p { margin-top: 12px; color: rgba(255,255,255,.74); }
.final-cta .btn { position: relative; z-index: 1; background: #fff; color: var(--primary-dark); }

footer { padding: 42px 0; }
.footer-links a:visited { color: var(--text-faint); }

.tool-toast { position: fixed; right: 20px; bottom: 20px; z-index: 250; max-width: 360px; padding: 16px 18px; border: 1px solid var(--border-light); border-radius: 14px; background: var(--bg-surface); color: var(--text-main); box-shadow: var(--shadow-xl); transform: translateY(140%); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.tool-toast.show { transform: none; opacity: 1; }
.tool-toast b { display: block; margin-bottom: 3px; }
.tool-toast span { color: var(--text-muted); font-size: 13px; }

@media (max-width: 1040px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr 1fr; gap: 0 34px; }
  .tool-launcher { grid-template-columns: repeat(4, 1fr); }
  .tool-launch:nth-child(5n) { border-right: 1px solid var(--border-light); }
  .tool-launch:nth-child(4n) { border-right: 0; }
  .tool-launch:nth-child(n+6) { border-bottom: 1px solid var(--border-light); }
  .tool-launch:nth-child(n+9) { border-bottom: 0; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  header { top: 8px; width: calc(100% - 16px); }
  .nav-inner { padding: 7px 8px 7px 12px; }
  .nav-actions .lang-switch, .nav-actions .theme-toggle, .nav-login { display: none; }
  .nav-actions .btn-primary { min-height: 42px; padding: 8px 12px; font-size: 12px; }
  .hero { min-height: auto; padding: 118px 20px 70px; display: flex; flex-direction: column; align-items: stretch; text-align: left; }
  .hero .badge { order: 0; align-self: flex-start; }
  .hero-title { order: 1; font-size: clamp(42px, 13vw, 60px); }
  .hero-subtitle { order: 2; }
  .hero-cta { order: 3; flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { max-width: none; width: 100%; }
  .hero-proof { order: 4; margin: 2px 0 48px; }
  .console-widget { order: 5; transform: none; }
  .console-header span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .console-body { padding: 14px; }
  .result-row { grid-template-columns: 1fr auto; padding: 11px 12px; }
  .result-row .v { grid-column: 1 / -1; font-size: 13px; word-break: break-word; }
  .quota-meter { align-items: flex-start; flex-wrap: wrap; }
  .qm-bar { order: 4; flex-basis: 100%; }
  .trust-inner { min-height: 0; padding-block: 28px; grid-template-columns: 1fr 1fr; }
  .trust-title { grid-column: 1 / -1; }
  .quick-tools { padding-top: 74px; }
  .quick-head, .journey-head { grid-template-columns: 1fr; gap: 18px; }
  .tool-launcher { grid-template-columns: repeat(2, 1fr); }
  .tool-launch:nth-child(n) { border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
  .tool-launch:nth-child(2n) { border-right: 0; }
  .tool-launch:nth-child(n+9) { border-bottom: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .module-card:nth-child(n) { grid-column: auto; min-height: 0; }
  .module-icon { margin-bottom: 28px; }
  .journey-steps { grid-template-columns: 1fr 1fr; }
  .journey-step:nth-child(2) { border-right: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .plan-desc { min-height: 0; }
  .final-cta-inner { padding: 38px 26px; grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .container { padding-inline: 18px; }
  .brand { font-size: 16px; }
  .brand .logo-icon { width: 32px; height: 32px; }
  .hero { padding-inline: 18px; }
  .hero-title { font-size: 42px; }
  .hero-subtitle { font-size: 16px; }
  .hero-proof { align-items: flex-start; }
  .console-widget::before { display: none; }
  .search-bar { align-items: center; padding-left: 10px; }
  .search-bar input { min-width: 0; font-size: 13px; }
  .search-bar button { padding-inline: 13px; }
  .trust-inner { grid-template-columns: 1fr; }
  .trust-title { grid-column: auto; }
  .tool-launch { min-height: 106px; padding: 15px; }
  .journey-steps { grid-template-columns: 1fr; }
  .journey-step { min-height: 0; border-right: 0; padding: 28px 8px; }
  .journey-step h3 { margin-top: 30px; }
  .stats-grid { grid-template-columns: 1fr; }
  .dashboard-preview { display: none; }
  .pricing { padding-inline: 18px; }
  .final-cta { padding-inline: 18px; }
  .footer-content { align-items: flex-start; }
}

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