/* Tool Centre - Production Stylesheet
   Modern SaaS design: gradients, glassmorphism, dark/light mode */

:root {
  --primary: #4F46E5;
  --secondary: #7C3AED;
  --accent: #06B6D4;
  --bg: #0F172A;
  --bg-2: #111c34;
  --surface: rgba(255,255,255,0.06);
  --surface-2: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.12);
  --text: #F8FAFC;
  --muted: #94A3B8;
  --success: #10B981;
  --danger: #EF4444;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --container: 1200px;
  --grad: linear-gradient(135deg, var(--primary), var(--secondary) 50%, var(--accent));
}

[data-theme="light"] {
  --bg: #F7F8FC;
  --bg-2: #ffffff;
  --surface: rgba(15,23,42,0.04);
  --surface-2: rgba(15,23,42,0.06);
  --border: rgba(15,23,42,0.10);
  --text: #0F172A;
  --muted: #475569;
  --shadow: 0 10px 30px rgba(15,23,42,.08);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--muted); }
ul { color: var(--muted); }

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

/* Navbar */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: var(--container); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 1.15rem; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center; color: #fff; font-weight: 800;
  box-shadow: var(--shadow);
}
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer; transition: .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg-2); padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%); transition: transform .25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--border); width: 100%; }
  .menu-toggle { display: grid; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  font-weight: 600; font-size: .95rem; cursor: pointer; border: 0;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
  text-decoration: none;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(79,70,229,.35); }
.btn-primary:hover { transform: translateY(-2px); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn-block { width: 100%; justify-content: center; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 60px;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 80%;
  background:
    radial-gradient(600px 300px at 20% 20%, rgba(79,70,229,.35), transparent 60%),
    radial-gradient(500px 280px at 80% 10%, rgba(124,58,237,.30), transparent 60%),
    radial-gradient(500px 280px at 60% 60%, rgba(6,182,212,.25), transparent 60%);
  filter: blur(20px); z-index: -1;
  animation: floaty 12s ease-in-out infinite alternate;
}
@keyframes floaty { to { transform: translate3d(0,-20px,0) scale(1.05); } }

.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: .8rem; margin-bottom: 16px;
}
.hero h1 span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.trust { display: flex; gap: 18px; margin-top: 26px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }

.hero-visual {
  position: relative; aspect-ratio: 1/1; max-width: 460px; margin: 0 auto;
}
.orb {
  position: absolute; inset: 10%; border-radius: 50%;
  background: var(--grad); filter: blur(2px);
  box-shadow: 0 30px 80px rgba(124,58,237,.45);
  animation: orb 8s ease-in-out infinite alternate;
}
@keyframes orb { to { transform: scale(1.05) rotate(15deg); } }
.float-icon {
  position: absolute; width: 60px; height: 60px; border-radius: 14px;
  background: var(--surface-2); backdrop-filter: blur(10px);
  border: 1px solid var(--border); display: grid; place-items: center;
  box-shadow: var(--shadow); font-size: 24px;
  animation: bob 4s ease-in-out infinite alternate;
}
.float-icon:nth-child(2) { top: 5%; left: 0; }
.float-icon:nth-child(3) { top: 20%; right: -10px; animation-delay: -1s; }
.float-icon:nth-child(4) { bottom: 15%; left: -10px; animation-delay: -2s; }
.float-icon:nth-child(5) { bottom: 0; right: 10%; animation-delay: -3s; }
@keyframes bob { to { transform: translateY(-14px); } }

/* Search */
.search-wrap {
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px; border-radius: 14px; display: flex; gap: 8px;
  max-width: 540px; margin-top: 24px; backdrop-filter: blur(10px);
}
.search-wrap input {
  flex: 1; background: transparent; border: 0; padding: 12px 14px;
  color: var(--text); font-size: 1rem; outline: none;
}
.search-results {
  max-width: 540px; margin-top: 8px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 12px;
  max-height: 320px; overflow: auto; display: none;
}
.search-results.show { display: block; }
.search-results a { display: block; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:last-child { border: 0; }
.search-results a:hover { background: var(--surface); text-decoration: none; }

/* Sections */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { font-size: 1.05rem; }

/* Category filter chips */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.chip {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: .9rem; transition: .2s;
}
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* Tool grid */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
  text-decoration: none; color: var(--text);
  backdrop-filter: blur(10px);
}
.tool-card:hover {
  transform: translateY(-4px); background: var(--surface-2);
  box-shadow: var(--shadow); text-decoration: none;
}
.tool-card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--grad);
  display: grid; place-items: center; font-size: 22px; color: #fff; margin-bottom: 14px;
}
.tool-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.tool-card p { font-size: .9rem; margin: 0; }
.tool-card .tag { margin-top: 14px; font-size: .75rem; color: var(--muted); }

/* Features / Why us */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature {
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; margin-bottom: 14px; font-size: 22px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat .num { font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: .9rem; }

/* Testimonials */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.testimonial { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; }
.who small { color: var(--muted); display: block; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px; cursor: pointer;
}
.faq details[open] { background: var(--surface-2); }
.faq summary { font-weight: 600; list-style: none; outline: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 10px; }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.blog-card h3 a { color: var(--text); }
.blog-card .meta { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }

/* CTA Banner */
.cta-banner {
  border-radius: var(--radius);
  padding: 40px; text-align: center;
  background: var(--grad); color: #fff;
  box-shadow: var(--shadow);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,.9); }

/* Footer */
footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 40px; padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 30px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
footer h4 { margin-bottom: 14px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 8px; }
footer ul li a { color: var(--muted); }
footer ul li a:hover { color: var(--accent); }
.socials { display: flex; gap: 10px; margin-top: 12px; }
.socials a { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.newsletter { display: flex; gap: 8px; margin-top: 12px; }
.newsletter input { flex: 1; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); outline: none; }
.copyright { text-align: center; color: var(--muted); margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .9rem; }

/* Tool Page */
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 20px 0; }
.breadcrumb a { color: var(--muted); }
.tool-shell { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
@media (max-width: 900px) { .tool-shell { grid-template-columns: 1fr; } }
.tool-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; backdrop-filter: blur(10px);
}
.tool-panel label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: .9rem; }
.tool-panel input[type="text"],
.tool-panel input[type="number"],
.tool-panel input[type="email"],
.tool-panel input[type="url"],
.tool-panel input[type="date"],
.tool-panel select,
.tool-panel textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font: inherit; outline: none; transition: border-color .15s;
}
.tool-panel input:focus, .tool-panel textarea:focus, .tool-panel select:focus { border-color: var(--primary); }
.tool-panel textarea { min-height: 160px; resize: vertical; font-family: inherit; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .row { grid-template-columns: 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.output {
  margin-top: 18px; padding: 16px; border-radius: 10px;
  background: var(--bg-2); border: 1px dashed var(--border);
  min-height: 64px; white-space: pre-wrap; word-break: break-word; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .9rem;
}
.output.ok { border-color: var(--success); }
.output.err { border-color: var(--danger); color: var(--danger); }
.aside .panel { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.aside h4 { margin-bottom: 10px; }
.aside ul { list-style: none; padding: 0; margin: 0; }
.aside ul li { margin: 6px 0; }
.aside ul li a { color: var(--text); }
.prose h2 { margin-top: 30px; }
.prose h3 { margin-top: 22px; }
.prose ul { padding-left: 18px; color: var(--muted); }

/* Drop zone */
.drop {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 30px; text-align: center; cursor: pointer;
  transition: .2s; background: var(--bg-2);
}
.drop.drag { border-color: var(--accent); background: var(--surface-2); }
.drop p { margin: 6px 0 0; }
.preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.preview img { max-width: 140px; border-radius: 10px; border: 1px solid var(--border); }

/* Notifications */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; transition: .25s; z-index: 200; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Scroll top */
.scroll-top {
  position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px;
  border-radius: 50%; background: var(--grad); color: #fff; border: 0;
  cursor: pointer; box-shadow: var(--shadow); display: none;
  font-size: 20px; align-items: center; justify-content: center;
  z-index: 90;
}
.scroll-top.show { display: flex; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Utility */
.center { text-align: center; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.hidden { display: none !important; }
