/* Critical shell styles for home and hub pages */
:root {
  --header-height: 76px;
  --header-main-h: 76px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  min-height: var(--header-main-h);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

[data-theme="dark"] .site-header::before {
  background: rgba(13, 10, 22, 0.92);
}

.header-shell,
.header-inner,
.footer-inner,
.footer-bottom {
  position: relative;
  z-index: 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-main-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
}

.logo:hover {
  color: var(--text);
}

.logo-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 6px 16px var(--primary-glow);
}

.logo-stack {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  line-height: 1.15;
}

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

.logo-tag {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  background: rgba(248, 247, 255, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .main-nav {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  box-shadow: none;
}

.main-nav > a,
.nav-mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.main-nav > a.is-active,
.nav-mega-trigger.is-active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.12);
}

.nav-item--mega {
  position: relative;
}

.nav-mega-panel {
  display: none;
}
.nav-item--mega.is-open .nav-mega-panel,
.nav-item--mega:hover .nav-mega-panel {
  display: block;
}
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  visibility: hidden;
}
.nav-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 20, 0.45);
  opacity: 0;
}
.nav-drawer.is-open .nav-drawer-backdrop {
  opacity: 1;
}
.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -12px 0 48px rgba(15, 23, 42, 0.18);
}
.nav-drawer.is-open .nav-drawer-panel {
  transform: translateX(0);
}
.nav-drawer-head,
.nav-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
}
.nav-drawer-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
  cursor: pointer;
}
.nav-drawer-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  padding: 0.85rem 1.15rem;
}
.nav-drawer-primary a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.4rem;
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text) !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1.15rem 1rem;
}
.nav-drawer-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.nav-drawer-cat,
.nav-drawer-tool {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text) !important;
  text-decoration: none;
}
.nav-drawer-cat {
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-weight: 800;
}
.nav-drawer-tool {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  color: var(--text-muted) !important;
  font-size: 0.84rem;
  font-weight: 600;
}
.nav-drawer-group {
  margin-bottom: 1.1rem;
}
body.nav-drawer-open {
  overflow: hidden;
}
[data-theme="dark"] .nav-drawer-panel {
  background: #13101f;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.825rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-primary,
.btn-glow {
  background: var(--gradient-brand);
  color: #fff !important;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
}

.header-cta-desktop {
  display: inline-flex !important;
}

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

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.tool-category-block {
  margin-top: 1.75rem;
}

.tool-category-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tool-category-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.hint {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.tool-card {
  position: relative;
  display: flex;
  gap: 1.25rem;
  overflow: hidden;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-brand);
}

.tool-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  font-size: 1.85rem;
}

.tool-card-body {
  flex: 1;
  min-width: 0;
}

.tool-card-category {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.tool-card-title {
  margin: 0.35rem 0;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tool-card-desc {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.credit-badge {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-free {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.site-footer {
  position: relative;
  overflow: hidden;
  background: #0c0a1d;
  color: rgba(255, 255, 255, 0.72);
}

.footer-cta-band,
.footer-inner {
  position: relative;
  z-index: 1;
}

.footer-cta-band {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-cta-inner,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-cta-inner {
  padding: 1.1rem 0;
}

.footer-cta-inner h3,
.footer-col h4,
.footer-brand .logo-text {
  color: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 2rem;
  padding: 1.5rem 0 0;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a,
.footer-plain,
.footer-copy,
.footer-tagline {
  color: rgba(255, 255, 255, 0.68);
}

.footer-brand > p {
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8) !important;
}

.footer-bottom {
  grid-column: 1 / -1;
  padding: 1.25rem 0 1.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .main-nav,
  .header-cta-desktop {
    display: none !important;
  }

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

  .header-inner {
    min-height: 56px;
  }

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

  .tool-category-head,
  .footer-cta-inner,
  .footer-bottom,
  .footer-inner {
    display: block;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }
}

.ot-crumb-wrap {
  min-height: 48px;
  display: block;
}

.tool-workspace {
  padding: 0 0 2rem;
}

.tool-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) 1fr;
  gap: 1rem;
}

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tool-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.tool-panel-body {
  padding: 1.25rem;
}

.upload-zone {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-alt);
  text-align: center;
}

.form-control,
select.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
  color: var(--text);
}

.img-tool-top,
.doc-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.lede,
.text-muted {
  color: var(--text-muted);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.link-btn {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.hidden {
  display: none !important;
}

.tool-seo {
  padding: 2.75rem 0 4.5rem;
  border-top: 1px solid var(--border);
}
.tool-seo-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.tool-seo-block + .tool-seo-block {
  margin-top: 2rem;
}
.tool-seo-block h2 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 750;
}
.tool-seo-block p,
.tool-seo-block li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}
.tool-seo-more {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.tool-seo-card {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.tool-seo:empty {
  min-height: 28rem;
}

@media (max-width: 900px) {
  .tool-workspace-grid,
  .img-tool-top,
  .doc-hero {
    display: block;
  }
  .tool-seo-more {
    grid-template-columns: 1fr;
  }
}
