/* ════════════════════════════════════════════════════════
   DocSuite — main.css
   Global design system, layout, components
   ════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS */
:root {
  --bg:          #0c0e14;
  --bg-2:        #12151e;
  --bg-3:        #1a1e2a;
  --bg-card:     #161922;
  --border:      #252a38;
  --border-2:    #2e3448;

  --text:        #e8eaf2;
  --text-2:      #9aa0b8;
  --text-3:      #5f6580;

  --accent:      #c8ff00;      /* electric lime — brand accent */
  --accent-dark: #9dc800;
  --accent-glow: rgba(200, 255, 0, 0.12);

  --doc-color:   #4da6ff;      /* blue for doc tools */
  --design-color:#ff7a45;      /* orange for design tools */
  --dev-color:   #a78bfa;      /* purple for dev tools */

  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   18px;

  --font-head:   'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:   'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:   'IBM Plex Mono', monospace;

  --shadow-card: 0 2px 16px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 40px rgba(200,255,0,0.08);
}

/* ── RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── LAYOUT */
.container      { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ── HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 14, 20, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.5px;
  display: grid; place-items: center;
  border-radius: 8px;
}
.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
  color: var(--text);
}
.logo-by {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.main-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--text); background: var(--bg-3); }
.main-nav .nav-home {
  margin-left: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.search-toggle {
  padding: 8px;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.search-toggle:hover { color: var(--text); background: var(--bg-3); }

/* Search bar */
.search-bar {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  border-top: 1px solid transparent;
}
.search-bar.open {
  max-height: 72px;
  border-top-color: var(--border);
  background: var(--bg-2);
}
.search-bar .container { padding-top: 14px; padding-bottom: 14px; }
#toolSearch {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}
#toolSearch:focus { border-color: var(--accent); }
#toolSearch::placeholder { color: var(--text-3); }

/* ── HERO */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 64px;
  text-align: center;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  opacity: 0.3;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(200,255,0,0.3);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
  background: rgba(200,255,0,0.06);
}
.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-headline em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}
.stat strong {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat span {
  font-size: 0.78rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  font-family: var(--font-mono);
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ── ADS */
.ad-container {
  text-align: center;
}
.ad-top    { padding: 16px 0; border-bottom: 1px solid var(--border); }
.ad-infeed { padding: 32px 0; }
.ad-footer-banner { padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ad-sidebar { margin-bottom: 24px; }
.ad-sidebar--second { margin-top: 24px; }

.ad-placeholder {
  display: inline-block;
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: var(--bg-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}
.ad-placeholder--tall {
  max-width: 300px;
  height: 250px;
}

/* ── MAIN CONTENT LAYOUT */
.main-content { padding: 48px 0 64px; }
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* ── SIDEBAR */
.sidebar {
  position: sticky;
  top: 88px;
}
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-card h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.sidebar-card p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
}
.btn-outline {
  display: inline-block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent);
  border: 1px solid rgba(200,255,0,0.3);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.btn-outline:hover { background: var(--accent-glow); }

/* ── TOOL SECTIONS */
.tool-section { margin-bottom: 56px; }
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.section-icon.doc    { background: rgba(77,166,255,0.12); }
.section-icon.design { background: rgba(255,122,69,0.12); }
.section-icon.dev    { background: rgba(167,139,250,0.12); }

.section-header h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.section-header p {
  font-size: 0.875rem;
  color: var(--text-2);
}

/* ── TOOL GRID */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.tool-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}
.tool-card.hidden { display: none; }

.tool-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.tool-info h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.tool-info p {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 10px;
}
.tool-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

/* ── FOOTER */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  gap: 64px;
  padding: 48px 0 32px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
  max-width: 220px;
}
.footer-brand .logo-mark {
  width: 40px; height: 40px;
  flex-shrink: 0;
}
.footer-brand strong {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.footer-brand a { color: var(--accent); }
.footer-brand p {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 8px;
  line-height: 1.5;
}
.footer-nav { display: flex; gap: 48px; flex: 1; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 0.83rem;
  color: var(--text-2);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* ── RESPONSIVE */
@media (max-width: 1024px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .ad-sidebar--second { display: none; }
}
@media (max-width: 768px) {
  .tool-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 44px; }
  .main-nav .nav-home { display: none; }
  .footer-inner { flex-direction: column; gap: 32px; }
}
@media (max-width: 600px) {
  .hero-stats { gap: 8px; }
  .stat { padding: 0 20px; }
  .stat-divider { display: none; }
  .logo-by { display: none; }
}
