:root {
  --navy: #0f1f4b;
  --heading: #0f1f4b;
  --text: #1b2437;
  --muted: #5b6579;
  --link: #2563eb;
  --accent: #4f46e5;
  --tint: #eef0ff;
  --bg: #fafaf8;
  --bg-2: #f1f4f3;
  --bg-alt: rgba(255, 255, 255, .55);
  --surface: #ffffff;
  --header-bg: rgba(255, 255, 255, .8);
  --border: #e3e6ee;
  --border-strong: #c5cbdb;
  --primary: #0f1f4b;
  --primary-hover: #1a2f6e;
  --on-primary: #ffffff;
  --contact-bg: #0f1f4b;
  --vec-opacity: .15;
  --v1: #7fbdb3; --v2: #deb985; --v3: #9dbbd9;
  --ok-bg: #ecfdf3; --ok-text: #067647; --ok-border: #c6f0d8;
  --new-bg: #eef0ff; --new-text: #3730a3; --new-border: #d5d9ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 31, 75, .05), 0 4px 14px rgba(15, 31, 75, .05);
  --shadow-hover: 0 2px 4px rgba(15, 31, 75, .06), 0 12px 28px rgba(15, 31, 75, .10);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --heading: #f1f4ff;
  --text: #e3e7f5;
  --muted: #9aa4c0;
  --link: #8fa8ff;
  --accent: #98a0ff;
  --tint: #222a52;
  --bg: #0b0f14;
  --bg-2: #0e1a1c;
  --bg-alt: rgba(20, 27, 52, .55);
  --surface: #141b34;
  --header-bg: rgba(10, 14, 29, .8);
  --border: #26304f;
  --border-strong: #3a4670;
  --primary: #4f46e5;
  --primary-hover: #6366f1;
  --contact-bg: #19214a;
  --vec-opacity: .12;
  --v1: #5fb3a8; --v2: #c9a06a; --v3: #6f95bd;
  --ok-bg: #0f2b22; --ok-text: #6ee7a8; --ok-border: #1c4a38;
  --new-bg: #232a5a; --new-text: #b4baff; --new-border: #353e80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%) fixed; color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--heading); line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); font-weight: 400; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Animated vector background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.vec { width: 100%; height: 100%; display: block; }
.wave, .ring { stroke-width: 1.5; opacity: var(--vec-opacity); }
.w1 { stroke: var(--v1); animation: flow 38s linear infinite; }
.w2 { stroke: var(--v2); animation: flow 52s linear infinite reverse; }
.w3 { stroke: var(--v3); animation: flow 66s linear infinite; }
.r1 { stroke: var(--v1); animation: float 22s ease-in-out infinite alternate; }
.r2 { stroke: var(--v2); animation: float 28s ease-in-out infinite alternate-reverse; }
.r3 { stroke: var(--v3); animation: float 18s ease-in-out infinite alternate; }
@keyframes flow { to { transform: translateX(-720px); } }
@keyframes float { to { transform: translate(40px, -50px); } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--heading); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--primary); color: #fff; border-radius: 8px; font-size: .95rem; }
.nav-menu { display: flex; gap: 6px; order: 2; margin-left: auto; }
.theme-toggle { order: 3; margin-left: 8px; display: grid; place-items: center; width: 38px; height: 38px; background: none; border: 1px solid var(--border); border-radius: 10px; color: var(--heading); cursor: pointer; }
.theme-toggle:hover { background: var(--tint); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
.nav-menu a { padding: 8px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; transition: color .15s, background .15s; }
.nav-menu a:hover { color: var(--heading); background: var(--bg-alt); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; padding: 8px; color: var(--heading); background: none; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--heading); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero-inner { max-width: 760px; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 700; }
.lead { margin: 22px auto 0; max-width: 620px; color: var(--muted); font-size: 1.125rem; }
.cta-row { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); backdrop-filter: blur(6px); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.section-head p { margin-top: 12px; color: var(--muted); }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card { grid-column: span 2; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; transition: box-shadow .2s, border-color .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.card.wide, .card-idea { grid-column: span 4; }
.card { min-width: 0; }
.card-top { display: flex; align-items: center; gap: 12px; }
.app-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--tint); color: var(--accent); flex: none; }
.card-title { flex: 1; min-width: 0; }
.card-title h3 { font-size: 1.15rem; }
.card-title .cat { font-size: .82rem; color: var(--muted); }
.badge { font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-border); white-space: nowrap; }
.badge-new { background: var(--new-bg); color: var(--new-text); border-color: var(--new-border); }
.badge-soon { background: var(--bg-alt); color: var(--muted); border-color: var(--border); }
.card-desc { margin: 16px 0; color: var(--muted); font-size: .95rem; }
.preview { flex: 1 1 auto; display: flex; margin-top: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #f6f7fb; position: relative; }
.preview svg { display: block; width: 100%; height: auto; }
.preview img { display: block; width: 100%; height: auto; object-fit: cover; object-position: top; }
.preview-tag { position: absolute; right: 8px; top: 8px; font-size: .65rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }
.launch { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; color: var(--heading); text-decoration: none; align-self: flex-start; padding: 4px 0; }
.launch:hover { color: var(--accent); }
.launch svg { transition: transform .15s; }
.launch:hover svg { transform: translate(2px, -2px); }

/* Suggest card */
.card-idea { align-items: center; justify-content: center; text-align: center; background: transparent; border: 2px dashed var(--border-strong); box-shadow: none; min-height: 280px; gap: 6px; }
.card-idea:hover { border-color: var(--accent); background: var(--bg-alt); box-shadow: none; }
.plus { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--accent); margin-bottom: 10px; }
.card-idea h3 { font-size: 1.2rem; }
.card-idea p { color: var(--muted); font-size: .95rem; max-width: 300px; margin-bottom: 14px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.feature-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--tint); color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .94rem; }

/* Contact */
.contact-card { text-align: center; max-width: 720px; margin: 0 auto; padding: 48px 28px; background: var(--contact-bg); border-radius: 16px; color: #fff; }
.contact-card h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.contact-card p { margin: 12px 0 26px; color: #c9d1ea; }
.contact-card .btn-primary { background: #fff; color: #0f1f4b; }
.contact-card .btn-primary:hover { background: #eef0ff; }
.contact-card .form-error { color: #ffd7d7; margin: 16px 0 0; }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .88rem; text-align: center; }
.noscript { text-align: center; }

/* Modal */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 31, 75, .45); }
.modal-panel { position: relative; width: min(480px, 100%); max-height: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: 0 24px 60px rgba(15,31,75,.3); }
.modal-panel h2 { font-size: 1.4rem; padding-right: 32px; }
.modal-sub { color: var(--muted); font-size: .9rem; margin: 6px 0 20px; }
.modal-close { position: absolute; right: 14px; top: 14px; background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.modal-close:hover { background: var(--tint); color: var(--heading); }
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
.req { color: #c0262d; }
input, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text); }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
[aria-invalid="true"] { border-color: #c0262d; }
.form-error { color: #b42318; font-size: .88rem; margin-top: 8px; }
#idea-form .btn { margin-top: 18px; }
body.modal-open { overflow: hidden; }

/* Responsive */
@media (max-width: 960px) {
  .card, .card.wide { grid-column: span 3; }
  .card.wide, .card-idea { grid-column: span 6; }
}
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 48px; }
  .nav-toggle { display: inline-flex; order: 4; margin-left: 8px; }
  .theme-toggle { margin-left: auto; }
  .nav-menu { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 20px 14px; }
  .nav-menu.open { display: flex; }
  .bento, .features { grid-template-columns: minmax(0, 1fr); }
  .card, .card.wide, .card-idea { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .wave, .ring { animation: none !important; }
}

:root[data-theme="dark"] .form-error { color: #ff9a92; }
:root[data-theme="dark"] .req { color: #ff9a92; }
.card-idea:target { border-color: var(--accent); background: var(--bg-alt); }
.card-idea { scroll-margin-top: 96px; }
.card-idea:focus { outline: none; }

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--heading); }
.prose { max-width: 720px; padding: 64px 0 80px; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 6px; }
.prose h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose p { margin-top: 10px; }
.prose ul { margin: 10px 0 0; padding-left: 22px; }
.prose li { margin-top: 8px; }
