/* ==========================================================================
   TOOLBRIX BY ODITSON - ULTRA-FAST & DYNAMIC DESIGN SYSTEM
   Optimized for 60fps mobile transitions, zero font lag & clean SaaS aesthetic.
   ========================================================================== */

/* --- 1. DESIGN TOKENS & ROOT VARIABLES --- */
:root {
  /* Brand Core Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.08);
  --primary-glow: rgba(37, 99, 235, 0.25);
  --accent: #38bdf8;
  
  /* Status Colors */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #ef4444;
  --danger-hover: #dc2626;

  /* Premium Slate Palette */
  --bg-body: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #94a3b8;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Layered Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 28px -4px rgba(15, 23, 42, 0.08), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 24px 44px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.05);

  /* Micro-Transition Timing */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --trans-fast: 0.18s var(--ease-spring);
  --trans-base: 0.25s var(--ease-spring);
}

/* --- 2. FAST SYSTEM RESETS --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast), transform var(--trans-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
  border: 0;
  outline: none;
}

::selection {
  background: var(--primary-glow);
  color: var(--primary);
}

/* Sleek Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --- 3. GLASSMORPHIC TOPBAR & NAVBAR --- */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background var(--trans-fast);
}

.nav {
  max-width: 1200px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: clamp(22px, 2.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
}

.brand span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.menu a {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}

.menu a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* --- 4. HERO SECTION (AMBIENT GRADIENT LIGHT) --- */
.hero {
  position: relative;
  background: radial-gradient(100% 120% at 50% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(248, 250, 252, 0) 100%), var(--surface);
  border-bottom: 1px solid var(--border);
  padding: clamp(45px, 8vw, 75px) clamp(16px, 3vw, 24px) clamp(35px, 6vw, 55px);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 220px;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(255,255,255,0) 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -1.2px;
  color: var(--text-main);
  margin-bottom: 14px;
}

.hero p {
  max-width: 620px;
  margin: 0 auto clamp(20px, 3.5vw, 30px);
  color: var(--text-muted);
  font-size: clamp(15px, 2vw, 18px);
}

/* Modern Search Box */
.search-box {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: var(--surface);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: all var(--trans-fast);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-md);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
}

.search-box button {
  height: 46px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--text-main);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.search-box button:hover {
  background: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* --- 5. CONTAINERS & TYPOGRAPHY --- */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 45px) clamp(16px, 3vw, 24px);
}

.section-heading {
  text-align: center;
  margin-bottom: 35px;
}

.section-heading h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  color: var(--text-main);
}

.section-heading p {
  color: var(--text-muted);
  font-size: clamp(14px, 1.8vw, 16px);
}

/* --- 6. BUTTON SYSTEM --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  background: var(--text-main);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--trans-fast), background var(--trans-fast), box-shadow var(--trans-fast);
  box-shadow: var(--shadow-sm);
  will-change: transform;
}

.btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--primary-glow);
}

.btn:active {
  transform: scale(0.98);
}

.btn-light {
  background: var(--surface-alt);
  color: var(--text-main) !important;
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-light:hover {
  background: #e2e8f0;
  box-shadow: var(--shadow-sm);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

/* --- 7. TOOL CARDS & BENTO GRID --- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform var(--trans-base), box-shadow var(--trans-base), border-color var(--trans-base);
  will-change: transform;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0;
  transition: opacity var(--trans-fast);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-icon {
  font-size: 32px;
  margin-bottom: 14px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.tool-card h3 {
  font-size: 19px;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 8px;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
}

/* --- 8. SEO ARTICLE & CONTENT BOXES --- */
.content-box, .seo-section {
  max-width: 860px;
  margin: 0 auto 30px;
  padding: clamp(22px, 4vw, 38px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.content-box h1, .seo-section h1 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 18px;
  color: var(--text-main);
}

.content-box h2, .seo-section h2 {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 750;
  margin: 28px 0 12px;
  color: var(--text-main);
}

.content-box p, .seo-section p {
  color: #475569;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.content-box ol, .content-box ul,
.seo-section ol, .seo-section ul {
  margin: 12px 0 16px 24px;
  color: #475569;
}

.content-box li, .seo-section li {
  margin-bottom: 8px;
}

.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.faq-item p { margin: 0; color: var(--text-muted); }

/* --- 9. TABLES (DATA & COMPARISON) --- */
.limits-table, .formats-table, .data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.limits-table th, .formats-table th, .data-table th,
.limits-table td, .formats-table td, .data-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.limits-table th, .formats-table th, .data-table th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text-main);
}

.limits-table tr:last-child td,
.formats-table tr:last-child td,
.data-table tr:last-child td {
  border-bottom: 0;
}

/* --- 10. FORMS & INPUTS --- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text-main);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* --- 11. OBSIDIAN FOOTER --- */
.footer {
  margin-top: auto;
  background: #090d16;
  color: #94a3b8;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 60px) clamp(16px, 3vw, 24px) 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(24px, 4vw, 40px);
}

.footer h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  max-width: 440px;
}

.footer a {
  display: block;
  margin: 9px 0;
  color: #94a3b8;
  font-size: 14px;
}

.footer a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.copyright {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px clamp(16px, 3vw, 24px);
  border-top: 1px solid #172033;
  color: #475569;
  font-size: 13px;
  text-align: center;
}

/* --- 12. RESPONSIVE BREAKPOINTS --- */
@media (max-width: 850px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .nav {
    min-height: 60px;
  }

  .menu {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .menu a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .search-box {
    flex-direction: column;
    padding: 8px;
  }

  .search-box button {
    width: 100%;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .limits-table, .formats-table {
    display: block;
    overflow-x: auto;
  }
}