/* ============================================================
   Seoly.io — Design System
   Clean / trustworthy SaaS. Light default + dark theme.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* brand — accent is tweakable */
  --accent: #2563EB;
  --accent-rgb: 37, 99, 235;
  --accent-2: #06B6D4;
  --accent-hover: #1d4ed8;
  --success: #10B981;

  /* light theme surfaces */
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --faint: #94A3B8;
  --line: #E7ECF3;
  --line-2: #EEF2F7;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-softer: #F1F5F9;
  --card: #FFFFFF;
  --card-2: #FFFFFF;
  --glass: rgba(255,255,255,0.72);
  --glass-line: rgba(15,23,42,0.08);

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 18px 40px -12px rgba(15,23,42,0.16), 0 6px 14px -8px rgba(15,23,42,0.10);
  --shadow-accent: 0 12px 30px -8px rgba(var(--accent-rgb),0.45);

  /* tweakable */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --density: 1;

  --maxw: 1200px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
  --ink: #F1F5F9;
  --ink-2: #CBD5E1;
  --muted: #94A3B8;
  --faint: #64748B;
  --line: rgba(255,255,255,0.10);
  --line-2: rgba(255,255,255,0.06);
  --bg: #0B1120;
  --bg-soft: #0E1626;
  --bg-softer: #131C2E;
  --card: #111A2B;
  --card-2: #0E1626;
  --glass: rgba(17,26,43,0.66);
  --glass-line: rgba(255,255,255,0.08);
  --accent-hover: #3b82f6;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 50px -16px rgba(0,0,0,0.6);
  --shadow-accent: 0 14px 34px -10px rgba(var(--accent-rgb),0.5);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(var(--accent-rgb), 0.18); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1320px; }
.section { padding: calc(96px * var(--density)) 0; }
.section-sm { padding: calc(64px * var(--density)) 0; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }

/* ---------- Type ---------- */
h1,h2,h3,h4,h5 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
.display { font-size: clamp(40px, 6vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.h-sec { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; letter-spacing: -0.03em; }
.h-card { font-size: 19px; font-weight: 700; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); line-height: 1.6; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent);
}
.text-muted { color: var(--muted); }
.text-grad {
  background: linear-gradient(105deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: calc(var(--radius) * 0.7);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap; border: 1px solid transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.btn-soft { background: rgba(var(--accent-rgb),0.10); color: var(--accent); }
.btn-soft:hover { background: rgba(var(--accent-rgb),0.16); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,0.16); }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 7px;
}
.badge-new { background: rgba(16,185,129,0.14); color: var(--success); }
.badge-hot { background: rgba(245,158,11,0.16); color: #D97706; }
.badge-ai  { background: rgba(var(--accent-rgb),0.12); color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass); backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--glass-line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-accent);
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand-dot { color: var(--accent); }
.brand-word { display: inline-flex; align-items: baseline; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
  position: relative; padding: 9px 14px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link svg { width: 15px; height: 15px; opacity: .6; }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  color: var(--ink-2); border: 1px solid var(--line); background: var(--card); transition: all .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }

/* mega menu */
.has-mega { position: relative; }
.mega {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: min(940px, 94vw); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px;
  opacity: 0; visibility: hidden; transition: opacity .22s, transform .22s; z-index: 120;
}
.has-mega:hover .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega::before { content:''; position:absolute; top:-14px; left:0; right:0; height:14px; }
.mega-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 18px; }
.mega-group { display: flex; flex-direction: column; gap: 2px; }
.mega-group h6 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); padding: 6px 8px 4px; }
.mega-link { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; transition: background .15s; }
.mega-link:hover { background: var(--bg-soft); }
.mega-dot { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.mega-dot svg { width: 15px; height: 15px; }
.mega-link-name { font-size: 13.5px; font-weight: 600; color: var(--ink-2); flex: 1; }
.mega-link:hover .mega-link-name { color: var(--accent); }
.mega-count { font-size: 11px; font-weight: 700; color: var(--faint); background: var(--bg-softer); padding: 1px 7px; border-radius: 99px; }
.mega-all { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding: 12px; border-radius: 12px; background: rgba(var(--accent-rgb),0.08); color: var(--accent); font-weight: 700; font-size: 14px; transition: background .18s; }
.mega-all:hover { background: rgba(var(--accent-rgb),0.14); }
.mega-all svg { width: 17px; height: 17px; }
@media (max-width: 1100px){ .mega-cols { grid-template-columns: repeat(3, 1fr); } }

/* mobile */
.menu-toggle { display: none; }
@media (max-width: 920px) {
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s, border-color .22s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(var(--accent-rgb),0.4); }

.tool-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; position: relative; }
.tool-card .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.tool-card h3 { font-size: 16.5px; font-weight: 700; }
.tool-card p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.tool-card .arrow { position: absolute; top: 22px; right: 22px; color: var(--faint); transition: transform .2s, color .2s; }
.tool-card:hover .arrow { color: var(--accent); transform: translate(3px,-3px); }
.tool-meta { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--faint); font-weight: 500; }

/* category card */
.cat-card { padding: 26px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; position: relative; }
.cat-card .ico { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; }
.cat-card h3 { font-size: 19px; }
.cat-card .count { font-size: 13px; font-weight: 600; color: var(--accent); }
.cat-glow { position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%; opacity: .12; filter: blur(8px); }

/* icon tint helpers */
.ic-blue { background: rgba(37,99,235,0.12); color: #2563EB; }
.ic-cyan { background: rgba(6,182,212,0.13); color: #0891B2; }
.ic-green { background: rgba(16,185,129,0.13); color: #059669; }
.ic-violet{ background: rgba(124,58,237,0.13); color: #7C3AED; }
.ic-amber { background: rgba(245,158,11,0.15); color: #D97706; }
.ic-rose  { background: rgba(244,63,94,0.12); color: #E11D48; }
.ic-indigo{ background: rgba(79,70,229,0.13); color: #4F46E5; }
.ic-teal  { background: rgba(20,184,166,0.13); color: #0D9488; }
[data-theme="dark"] .ic-blue{background:rgba(59,130,246,.18);color:#60A5FA}
[data-theme="dark"] .ic-cyan{background:rgba(6,182,212,.2);color:#22D3EE}
[data-theme="dark"] .ic-green{background:rgba(16,185,129,.2);color:#34D399}
[data-theme="dark"] .ic-violet{background:rgba(124,58,237,.22);color:#A78BFA}
[data-theme="dark"] .ic-amber{background:rgba(245,158,11,.2);color:#FBBF24}
[data-theme="dark"] .ic-rose{background:rgba(244,63,94,.2);color:#FB7185}
[data-theme="dark"] .ic-indigo{background:rgba(79,70,229,.24);color:#818CF8}
[data-theme="dark"] .ic-teal{background:rgba(20,184,166,.2);color:#2DD4BF}

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 980px){ .g-4{grid-template-columns:repeat(2,1fr)} .g-3{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 620px){ .g-4,.g-3,.g-2{grid-template-columns:1fr} }

/* ---------- Stats ---------- */
.stat-num { font-size: clamp(34px,4vw,52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat-label { font-size: 14px; color: var(--muted); font-weight: 500; margin-top: 8px; }

/* ---------- Testimonials ---------- */
.quote-card { padding: 28px; display: flex; flex-direction: column; gap: 18px; height: 100%; }
.quote-card p { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.quote-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px; flex: none; }
.stars { display: flex; gap: 2px; color: #F59E0B; }
.stars svg { width: 16px; height: 16px; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: rgba(var(--accent-rgb),0.4); box-shadow: var(--shadow-md); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; font-weight: 600; font-size: 16.5px; cursor: pointer; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q .chev { transition: transform .25s; color: var(--muted); flex: none; }
.faq-item[open] .faq-q .chev { transform: rotate(180deg); color: var(--accent); }
.faq-a { padding: 0 24px 22px; color: var(--muted); font-size: 15px; line-height: 1.65; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
@media (max-width: 900px){ .footer-grid{ grid-template-columns: 1fr 1fr; gap: 32px } }
.footer-col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); margin-bottom: 16px; font-weight: 700; }
.footer-col a { display: block; padding: 6px 0; color: var(--ink-2); font-size: 14.5px; transition: color .18s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.soc { display: flex; gap: 10px; }
.soc a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); transition: all .2s; }
.soc a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Misc ---------- */
.glow-bg { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; }
.reveal { opacity: 0; transform: translateY(20px); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal{ opacity:1; transform:none; transition:none } }
.divider { height: 1px; background: var(--line); border: 0; }

/* breadcrumb */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.crumb a:hover { color: var(--accent); }
.crumb svg { width: 14px; height: 14px; opacity: .5; }
.crumb .here { color: var(--ink); font-weight: 600; }

/* inputs */
.field {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink); font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.12); background: var(--card); }
textarea.field { resize: vertical; line-height: 1.6; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; display: block; }

/* mobile nav */
.mobile-nav { display: none; flex-direction: column; padding: 8px 24px 18px; gap: 2px; border-top: 1px solid var(--line); background: var(--card); }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 8px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.mobile-nav a:hover { background: var(--bg-soft); color: var(--accent); }
.mobile-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px 0; margin: 4px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.mobile-cats a { padding: 9px 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
@media (min-width: 921px){ .mobile-nav{ display:none !important } }

/* search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,0.4); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding: 12vh 20px 0; }
.search-overlay.open { display: flex; }
.search-box { width: min(640px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.search-input-row svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search-input-row input { flex: 1; border: none; background: none; outline: none; font-size: 18px; color: var(--ink); }
.search-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--ink-2); }
.search-results a:hover, .search-results a.active { background: var(--bg-soft); color: var(--accent); }
.search-results .sr-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.search-results .sr-cat { margin-left: auto; font-size: 12px; color: var(--faint); }
.search-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 14px; }

/* scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }
