/* ==========================================================================
   AI ICON GENERATOR - GLOBAL DESIGN SYSTEM & FOUNDATION (main.css)
   ========================================================================== */

:root {
  /* Color Palette - Dark Mode Default */
  --bg-primary: #0B0F19;
  --bg-secondary: #111827;
  --bg-tertiary: #1E293B;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: #1E293B;
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-subtle: #1E293B;
  --border-medium: #334155;
  --border-accent: #6366F1;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0B0F19;

  /* Brand Accents */
  --brand-violet: #6366F1;
  --brand-cyan: #06B6D4;
  --brand-gradient: linear-gradient(135deg, #6366F1 0%, #06B6D4 100%);
  --brand-gradient-hover: linear-gradient(135deg, #4F46E5 0%, #0891B2 100%);
  --accent-purple: #A855F7;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-rose: #F43F5E;

  /* UI Tokens */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px -5px rgba(99, 102, 241, 0.3);

  /* Layout */
  --header-height: 68px;
  --max-width: 1280px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', ui-monospace, Monaco, Consolas, monospace;
}

[data-theme="light"] {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-accent: #6366F1;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;

  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 25px -5px rgba(99, 102, 241, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Ensure zero horizontal overflow */
html, body {
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header adjustments */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-link .logo-icon {
  width: 32px;
  height: 32px;
}

.brand-link .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Top-Right Proper Navigation Cluster */
.nav-right-cluster {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-link-studio {
  color: #818CF8 !important;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-link-studio:hover {
  background: rgba(99, 102, 241, 0.18) !important;
  color: #A5B4FC !important;
}

.nav-link-studio .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 8px #38BDF8;
}

/* Dropdown Menu */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 290px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  padding: 0.65rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 1100;
  animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-dropdown.active {
  display: flex;
}

.dropdown-link {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.dropdown-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateX(2px);
}

.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
}

.dropdown-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dropdown-text strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropdown-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Nav Actions on Right */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-cta {
  background: var(--brand-gradient);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px -3px rgba(99, 102, 241, 0.45);
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.mobile-menu-toggle:hover {
  border-color: var(--border-medium);
  background: var(--bg-secondary);
}

/* Mobile Slide-Out Drawer Fix (Fixed Overlay, Off-Canvas) */
.mobile-drawer-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease !important;
}

.mobile-drawer-overlay.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.mobile-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: 320px !important;
  max-width: 85vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: var(--bg-secondary) !important;
  border-left: 1px solid var(--border-medium) !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6) !important;
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 1.5rem !important;
  transform: translateX(100%) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow-y: auto !important;
}

.mobile-drawer.active {
  transform: translateX(0) !important;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.mobile-drawer-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.mobile-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-drawer-close:hover {
  color: var(--text-primary);
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.mobile-drawer-link:hover, .mobile-drawer-link.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.mobile-drawer-link-highlight {
  background: rgba(99, 102, 241, 0.12);
  color: #818CF8 !important;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1.25rem 0;
}

.mobile-drawer-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem;
}

.mobile-drawer-tools {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-tool-item {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.mobile-tool-item strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.mobile-tool-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  max-width: 320px;
  font-size: 0.9rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--brand-cyan);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Content & Editorial Styling */
.editorial-content {
  padding: 4.5rem 0;
}

.editorial-section {
  margin-bottom: 4rem;
}

.editorial-section h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.editorial-section h2::after {
  content: "";
  height: 2px;
  flex: 1;
  background: var(--border-subtle);
  margin-left: 1rem;
}

.step-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.step-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--brand-gradient);
  color: #FFF;
  font-weight: 700;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.step-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Comparison Table */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.comparison-table th, .comparison-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.faq-trigger .icon-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-trigger .icon-chevron {
  transform: rotate(180deg);
}

.faq-content {
  display: none;
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-content {
  display: block;
}

/* Toast System */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.875rem;
  animation: toastIn 0.2s ease forwards;
}

.toast.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.toast-info {
  border-left: 4px solid var(--brand-cyan);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Dedicated Homepage Showcase & Feature Styles */
.home-hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.home-hero-section::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 750px;
  height: 450px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.08) 45%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #818CF8;
  font-size: 0.825rem;
  font-weight: 600;
  width: fit-content;
}

.home-hero-copy h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.home-hero-copy p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
}

.hero-cta-cluster {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-cta-cluster .btn-cta {
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
}

.hero-cta-cluster .btn-secondary {
  padding: 0.8rem 1.4rem;
  font-size: 0.95rem;
}

.hero-trust-indicators {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item svg {
  color: var(--brand-cyan);
}

/* Interactive Hero Showcase Card */
.hero-showcase-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

.showcase-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.showcase-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.showcase-canvas-box {
  width: 100%;
  height: 240px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.showcase-canvas-box svg {
  width: 100%;
  height: 100%;
  max-width: 190px;
  max-height: 190px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-chips-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.showcase-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.showcase-chip:hover, .showcase-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: #818CF8;
  color: var(--text-primary);
}

.showcase-styles-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.showcase-style-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.showcase-style-btn:hover, .showcase-style-btn.active {
  border-color: var(--brand-cyan);
  color: var(--text-primary);
  background: rgba(6, 182, 212, 0.1);
}

.showcase-footer-action {
  padding-top: 0.5rem;
}

.showcase-footer-action .btn-cta {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
}

/* Tools Showcase Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-cyan);
  margin-top: 0.5rem;
}

.tool-card-link:hover {
  color: #38BDF8;
  text-decoration: underline;
}

/* Responsive Breakpoints for Mobile */
@media (max-width: 960px) {
  .desktop-nav {
    display: none !important;
  }
  
  /* Hide the CTA & secondary button in header on mobile to prevent navbar crowding */
  .nav-actions .btn-cta,
  .nav-actions .btn-secondary {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
  }

  .nav-right-cluster {
    gap: 0.65rem;
  }

  .home-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .home-hero-copy h1 {
    font-size: 1.85rem !important;
    line-height: 1.2 !important;
  }

  .hero-cta-cluster {
    flex-direction: column;
    align-items: stretch !important;
  }

  .hero-cta-cluster .btn-cta,
  .hero-cta-cluster .btn-secondary {
    width: 100% !important;
    text-align: center;
    justify-content: center;
  }

  .showcase-styles-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .showcase-styles-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

