@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #000000;
  --bg-alt: #0c0f16;
  --bg-elevated: #161c27;
  --text: #eef2f7;
  --muted: #8b96a8;
  --border: rgba(148, 180, 219, 0.13);
  --accent: #0b5fcc;
  --accent-2: #4f9dff;
  --success: #2ecc71;
  --danger: #e0524f;
  --radius: 12px;
  --radius-sm: 8px;
  --btn-radius: 8px;
  --ease: cubic-bezier(0.22, 0.75, 0.28, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  animation: pageFadeIn 0.5s var(--ease) both;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body {
    animation: none;
  }
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

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

/* ---------- Header / Nav (shared across all pages) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 6vw;
  max-width: 1360px;
  margin: 0 auto;
  position: relative;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.logo:hover .logo-mark {
  transform: rotate(-6deg) scale(1.06);
}

@keyframes pulseDot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 157, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(79, 157, 255, 0);
  }
}

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s var(--ease);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s var(--ease), opacity 0.25s ease;
  }

  .nav-links.open {
    max-height: 300px;
    opacity: 1;
  }

  .nav-links li {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 16px 6vw;
  }

  .nav-links a::after {
    display: none;
  }
}

/* ---------- Hero (homepage) ---------- */

.hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(125% 125% at 50% 0%, var(--bg) 60%, rgba(11, 95, 204, 0.16) 100%);
  background-size: 100% 130%;
  animation: heroDrift 22s ease-in-out infinite;
  padding: 110px 6vw 70px;
  text-align: center;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 6rem 5rem;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 60%, transparent 100%);
  pointer-events: none;
}

.hero-bottom-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero-cta {
  margin-top: 28px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-content > * {
  animation: fadeInUp 0.7s var(--ease) both;
}

.hero-content > *:nth-child(1) {
  animation-delay: 0.05s;
}

.hero-content > *:nth-child(2) {
  animation-delay: 0.15s;
}

.hero-content > *:nth-child(3) {
  animation-delay: 0.25s;
}

.hero-content > *:nth-child(4) {
  animation-delay: 0.35s;
}

.hero-content > *:nth-child(5) {
  animation-delay: 0.45s;
}

@keyframes heroDrift {
  0%,
  100% {
    background-position: 50% 0%;
  }
  50% {
    background-position: 50% 12%;
  }
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulseDot 2.6s ease-in-out infinite;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-content h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  color: var(--muted);
  font-size: 1.2rem;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-block;
  padding: 15px 34px;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  background-size: 160% 100%;
  background-position: 0% 0%;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-position 0.35s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(11, 95, 204, 0.45);
  background-position: 100% 0%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--btn-radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s var(--ease), background 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
  background: var(--bg-elevated);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* Search box on homepage */
.tool-search {
  max-width: 500px;
  margin: 0 auto 8px;
  position: relative;
}

.tool-search input {
  width: 100%;
  padding: 15px 22px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-search input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(79, 157, 255, 0.15);
}

/* Trust / stats bar */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.stats-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px 6vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item .stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-item .stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ---------- Sections ---------- */

.section {
  padding: 90px 6vw;
  max-width: 1360px;
  margin: 0 auto;
}

.section.alt {
  max-width: 100%;
  background: var(--bg-alt);
}

.section.alt > * {
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.section .lead {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.section p {
  color: var(--muted);
  max-width: 640px;
}

/* ---------- Scroll reveal ---------- */

.reveal.reveal-init {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.reveal-init.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Category filter pills ---------- */

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-pill {
  padding: 9px 20px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.filter-pill.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

/* ---------- Tool cards / grid ---------- */

.cards,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 16px;
}

.card,
.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

.card:hover,
.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(11, 95, 204, 0.22), rgba(79, 157, 255, 0.12));
  border: 1px solid var(--border);
  color: var(--accent-2);
  margin-bottom: 18px;
  transition: transform 0.35s var(--ease), background 0.3s ease, color 0.3s ease;
}

.icon-badge svg {
  width: 26px;
  height: 26px;
}

.tool-card:hover .icon-badge {
  transform: scale(1.08) rotate(-4deg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.tool-card h3,
.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  color: var(--text);
}

.tool-card p,
.card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.tool-card .badge {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#toolGrid .tool-card {
  padding: 0;
  background: transparent;
  border: none;
  perspective: 1400px;
}

.tool-card-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}

.tool-card:hover .tool-card-inner {
  transform: rotateY(180deg);
}

.tool-card-front,
.tool-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover .tool-card-front,
.tool-card:hover .tool-card-back {
  border-color: var(--accent-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.tool-card-front {
  position: relative;
}

.tool-card-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg-elevated), rgba(11, 95, 204, 0.22));
  overflow: hidden;
}

.tool-card-back .icon-badge {
  margin-bottom: 14px;
}

.tool-card-back p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.tool-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-2);
}

.tool-card-cta .arrow {
  transition: transform 0.25s var(--ease);
}

.tool-card:hover .tool-card-cta .arrow {
  transform: translateX(4px);
}

@media (hover: none) {
  .tool-card:hover .tool-card-inner {
    transform: none;
  }
}

@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tool-grid .tool-card-front,
  .tool-grid .tool-card-back {
    padding: 14px;
    border-radius: var(--radius-sm);
  }

  .tool-grid .tool-card:hover {
    transform: none;
  }

  .tool-grid .icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    margin-bottom: 8px;
  }

  .tool-grid .icon-badge svg {
    width: 17px;
    height: 17px;
  }

  .tool-grid .tool-card h3 {
    font-size: 0.82rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .tool-grid .tool-card p {
    font-size: 0.7rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .tool-grid .tool-card .badge {
    margin-top: 8px;
    font-size: 0.58rem;
  }
}

@media (max-width: 380px) {
  .tool-grid {
    gap: 8px;
  }

  .tool-grid .tool-card-front,
  .tool-grid .tool-card-back {
    padding: 11px;
  }
}

/* ---------- Tool page layout ---------- */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 28px 6vw 0;
  max-width: 900px;
  margin: 0 auto;
}

.breadcrumb.wide {
  max-width: 1360px;
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 6vw 110px;
}

.tool-header {
  margin-bottom: 36px;
}

.tool-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.tool-header p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 640px;
}

.tool-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  margin-bottom: 34px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(79, 157, 255, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 22px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.result-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 20px;
  transition: box-shadow 0.3s ease;
}

.result-box .result-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.result-box .result-value {
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.2s ease;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.result-grid .result-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.2s ease;
}

.result-grid .result-item .label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.result-grid .result-item .value {
  font-size: 1.15rem;
  font-weight: 700;
}

.info-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 34px;
  margin-top: 44px;
}

.info-box h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.info-box h3 {
  font-size: 1.05rem;
  margin: 18px 0 8px;
}

.info-box p {
  color: var(--muted);
  max-width: 100%;
  margin-bottom: 10px;
}

.info-box ul {
  color: var(--muted);
  padding-left: 20px;
  margin-bottom: 10px;
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  border-left: 3px solid var(--accent-2);
  padding: 10px 16px;
  margin-top: 20px;
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropzone:hover {
  border-color: var(--accent-2);
}

.dropzone.dragover {
  border-color: var(--accent-2);
  background: rgba(11, 95, 204, 0.1);
  transform: scale(1.01);
}

.file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-list .file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.file-item button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.file-item button:hover {
  color: var(--danger);
  transform: scale(1.15);
}

footer {
  text-align: center;
  padding: 36px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--muted);
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--text);
}

.footer-links {
  margin-top: 10px;
  font-size: 0.82rem;
  opacity: 0.85;
}
