﻿/* Shared: base, themes, header/nav, footer, buttons */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] .logo-img {
  background: #fff;
  border-radius: 10px;
}

.nav-glass {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
}

.grad-text {
  background: linear-gradient(130deg, var(--g1) 0%, var(--g2) 55%, #38d0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--glow);
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--glow);
}

.footer-wrap {
  border-top: 1px solid var(--border2);
  background: var(--bg2);
}

/* Theme Button */
.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.theme-btn:hover {
  color: var(--acc);
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--glow);
}

.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

/* Scroll progress bar */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 60;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  transform-origin: left;
  transform: scaleX(0);
}

.nav-glass {
  transition: box-shadow 0.3s;
}

.nav-glass.scrolled {
  box-shadow: 0 6px 24px rgba(11, 27, 77, 0.12);
}

/* Flowing gradient text */
.grad-text {
  background-size: 220% auto;
  animation: flow 5s linear infinite;
}

@keyframes flow {
  to {
    background-position: 220% center;
  }
}

/* Button shine */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: shine 3.5s ease-in-out infinite;
}

@keyframes shine {

  0%,
  60% {
    left: -60%;
  }

  100% {
    left: 140%;
  }
}

.btn-primary:active {
  transform: scale(0.96);
}

/* Logo wiggle */
.logo-img {
  transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}

a:hover>.logo-img {
  transform: scale(1.08) rotate(-4deg);
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--acc);
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Theme tokens */
/* Home page: hero, search, categories, tool cards, features, FAQ, SEO text */
/* LIGHT */
[data-theme="light"] {
  --bg: #f0f6ff;
  --bg2: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-border: rgba(29,111,232, 0.15);
  --text: #0b1b4d;
  --text2: #2f4a8a;
  --text3: #6580b5;
  --border: rgba(29,111,232, 0.18);
  --border2: rgba(29,111,232, 0.1);
  --card-bg: #ffffff;
  --pill-bg: rgba(29,111,232, 0.07);
  --pill-bdr: rgba(29,111,232, 0.18);
  --search-bg: rgba(255, 255, 255, 0.95);
  --stat-bg: rgba(255, 255, 255, 0.75);
  --section2: #f7faff;
  --shadow: 0 2px 16px rgba(29,111,232, 0.09);
  --shadow-h: 0 14px 38px rgba(29,111,232, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
  --g1: #1d6fe8;
  --g2: #00b4f0;
  --acc: #1558c0;
  --glow: rgba(29,111,232, 0.22);
}

/* DARK */
[data-theme="dark"] {
  --bg: #050d24;
  --bg2: #071230;
  --nav-bg: rgba(5,13,36, 0.88);
  --nav-border: rgba(59,139,255, 0.12);
  --text: #eef4ff;
  --text2: #c3d7ff;
  --text3: #7fb2ff;
  --border: rgba(59,139,255, 0.18);
  --border2: rgba(255, 255, 255, 0.07);
  --card-bg: rgba(255, 255, 255, 0.035);
  --pill-bg: rgba(59,139,255, 0.08);
  --pill-bdr: rgba(59,139,255, 0.2);
  --search-bg: rgba(255, 255, 255, 0.05);
  --stat-bg: rgba(255, 255, 255, 0.04);
  --section2: rgba(0,200,255, 0.025);
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  --shadow-h: 0 16px 44px rgba(0, 0, 0, 0.55), 0 0 26px rgba(59,139,255, 0.13);
  --g1: #3b8bff;
  --g2: #00c8ff;
  --acc: #38d0ff;
  --glow: rgba(59,139,255, 0.18);
}

/* Hero background (home + inner pages) */
.hero-bg {
  background:
    radial-gradient(ellipse 72% 55% at 50% -5%, var(--glow) 0%, transparent 65%),
    radial-gradient(ellipse 38% 30% at 85% 85%, rgba(0,200,255, 0.07) 0%, transparent 60%),
    var(--bg);
}

/* Hero: drifting gradient blobs */
.hero-bg {
  position: relative;
  overflow: hidden;
}

.hero-bg>div {
  position: relative;
  z-index: 1;
}

/* Layout pieces that replace the template's inline styles and Tailwind CDN utilities */
/* Light/dark tokens live in home.css; this file only consumes them. */
/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-header__brand img {
  height: 56px;
  width: 56px;
  object-fit: contain;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: none;
  gap: 24px;
  font-size: 0.87rem;
}

.nav-links a,
.mobile-nav a {
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.mobile-nav a:hover {
  color: var(--acc);
}

.header-cta {
  display: none;
  padding: 8px 20px;
  font-size: 0.87rem;
  text-decoration: none;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 20px 16px;
  border-top: 1px solid var(--nav-border);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 10px 0;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .menu-btn,
  .mobile-nav {
    display: none;
  }
}

@media (min-width: 640px) {
  .header-cta {
    display: inline-block;
  }
}

/* Footer */
.footer-about {
  grid-column: span 2;
}

.footer-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
}

.footer-list a {
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-list a:hover {
  color: var(--acc);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

/* Page loader: shown until the window has loaded (see main.js) */
body.is-loading {
  overflow: hidden;
}

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 45% at 50% 40%, var(--glow) 0%, transparent 70%),
    var(--bg);
  transition: opacity 0.45s ease, visibility 0.45s;
}

#page-loader.hide {
  opacity: 0;
  visibility: hidden;
}

.pl-box {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pl-box img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  animation: plpulse 1.6s ease-in-out infinite;
}

[data-theme="dark"] .pl-box img {
  background: #fff;
  border-radius: 14px;
}

.pl-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 20%, var(--g1), var(--g2));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: plspin 1.8s linear infinite;
}

@keyframes plspin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes plpulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.9);
  }
}

/* Footer social icons */
.social-links {
  list-style: none;
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.social-links a:hover {
  color: var(--acc);
  border-color: var(--acc);
  transform: translateY(-2px);
}

/* Social icon with no profile URL yet: visible but not clickable */
.social-links .is-inactive {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text3);
  opacity: 0.55;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
}
