/* ====================================================================
   HUZIHUB — CASE CONVERTER
   ==================================================================== */

:root {
  --ink: #15132b;
  --ink-soft: #4d4a6b;
  --ink-faint: #8985a8;

  --bg: #fcfbff;
  --bg-soft: #f4f2ff;

  --line: #e7e4f6;
  --line-soft: #f0eefb;

  --primary: #4f46e5;
  --primary-dark: #3b33c4;
  --primary-light: #eeebff;

  --accent: #7c3aed;

  --white: #ffffff;

  --cat-text: #4f46e5;
  --cat-calc: #9333ea;
  --cat-image: #ea580c;
  --cat-dev: #059669;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm:
    0 1px 2px rgba(21, 19, 43, 0.06), 0 1px 1px rgba(21, 19, 43, 0.04);
  --shadow-md: 0 8px 24px rgba(21, 19, 43, 0.08);
  --shadow-lg: 0 20px 50px rgba(79, 70, 229, 0.14);

  --nav-height: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Lexend", sans-serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

code,
.mono {
  font-family: "Fira Code", monospace;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 2000;
}
.skip-link:focus {
  left: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================== REVEAL ANIMATIONS ==================== */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}
[data-reveal].in-view {
  opacity: 1;
  animation-fill-mode: forwards;
}
[data-reveal="fade-up"] {
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
[data-reveal="fade-up"].in-view {
  transform: translateY(0);
}
[data-reveal="zoom-in"] {
  transform: scale(0.92);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
[data-reveal="zoom-in"].in-view {
  transform: scale(1);
}
[data-reveal="slide-left"] {
  transform: translateX(40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
[data-reveal="slide-left"].in-view {
  transform: translateX(0);
}
[data-reveal="slide-right"] {
  transform: translateX(-40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
[data-reveal="slide-right"].in-view {
  transform: translateX(0);
}

/* ==================== NAVBAR ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(252, 251, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-name {
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}

.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--primary);
  background: var(--primary-light);
}

.chevron {
  transition: transform 0.2s ease;
}
.has-dropdown:hover .chevron,
.has-dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: 460px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s;
  z-index: 1001;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.dropdown-header h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}
.dropdown-header p {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.dropdown-grid a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-radius: 8px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.dropdown-grid a:hover,
.dropdown-grid a:focus-visible {
  background: var(--primary-light);
  color: var(--primary);
}
.dropdown-grid a.active {
  color: var(--primary);
  font-weight: 600;
}
.dropdown-viewall {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.search-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.search-kbd {
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 992px) {
  .navbar-center {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

/* ==================== MOBILE DRAWER ==================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1900;
  overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateX(0);
}
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  min-width: 48px;
  min-height: 48px;
}
.mobile-accordion {
  padding: 10px;
}
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Lexend", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 16px 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line-soft);
}
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  display: flex;
  flex-direction: column;
}
.accordion-panel.open {
  max-height: 600px;
}
.accordion-panel a {
  padding: 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--ink-soft);
}
.mobile-plain-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 16px 12px;
  font-weight: 600;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 19, 43, 0.35);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s;
  z-index: 1800;
}
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}
body.no-scroll {
  overflow: hidden;
}

/* ==================== SEARCH OVERLAY ==================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 19, 43, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s;
  z-index: 2000;
}
.search-overlay.open {
  opacity: 1;
  visibility: visible;
}
.search-panel {
  width: min(600px, 90vw);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.search-input-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  background: none;
  color: var(--ink);
}
.search-input-row button {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ink-faint);
}
.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
}
.search-result-item:hover,
.search-result-item.active {
  background: var(--primary-light);
}
.search-result-item .srt-title {
  font-weight: 600;
  font-size: 0.92rem;
}
.search-result-item .srt-cat {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
  max-width: 1120px;
  margin: 20px auto 0;
  padding: 0 24px;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--line);
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb li[aria-current="page"] {
  color: var(--ink-soft);
  font-weight: 500;
}

/* ====================================================================
   PREMIUM HERO
   ==================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 100px;
  isolation: isolate;
}

/* ---- layered background ---- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-mesh {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(
      38% 42% at 12% 18%,
      rgba(79, 70, 229, 0.24),
      transparent 70%
    ),
    radial-gradient(
      32% 38% at 85% 12%,
      rgba(124, 58, 237, 0.2),
      transparent 70%
    ),
    radial-gradient(
      45% 50% at 60% 90%,
      rgba(79, 70, 229, 0.14),
      transparent 70%
    );
  animation: meshDrift 22s ease-in-out infinite alternate;
  filter: blur(4px);
}
@keyframes meshDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-2%, 2%) scale(1.05);
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(
    ellipse 65% 55% at 50% 20%,
    black 10%,
    transparent 75%
  );
  opacity: 0.8;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(79, 70, 229, 0.22),
    transparent
  );
  filter: blur(40px);
}

.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.5;
  filter: blur(0.5px);
  animation: particleFloat 9s ease-in-out infinite;
}
.particle::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  filter: blur(4px);
}
.p1 {
  top: 18%;
  left: 8%;
  animation-delay: 0s;
  background: var(--primary);
}
.p2 {
  top: 65%;
  left: 14%;
  animation-delay: 1.2s;
  background: var(--accent);
  width: 4px;
  height: 4px;
}
.p3 {
  top: 28%;
  left: 92%;
  animation-delay: 2.1s;
  background: var(--accent);
}
.p4 {
  top: 78%;
  left: 88%;
  animation-delay: 0.6s;
  background: var(--primary);
  width: 6px;
  height: 6px;
}
.p5 {
  top: 8%;
  left: 60%;
  animation-delay: 3s;
  background: var(--primary);
  width: 3px;
  height: 3px;
}
.p6 {
  top: 50%;
  left: 48%;
  animation-delay: 1.8s;
  background: var(--accent);
  width: 4px;
  height: 4px;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.35;
  }
  50% {
    transform: translate(14px, -24px);
    opacity: 0.8;
  }
}

/* ---- layout ---- */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-left {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.18);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-badge svg {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.2rem, 3.4vw + 1rem, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-highlight {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 0 30px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn-glow {
  position: relative;
}
.btn-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  z-index: -1;
  filter: blur(14px);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.btn-glow:hover::after {
  opacity: 0.85;
}

.btn-secondary-outline {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.btn-secondary-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--white);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 30px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-weight: 500;
}
.trust-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.hero-stats {
  display: flex;
  gap: 32px;
  padding: 22px 0;
  margin-bottom: 26px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat-value {
  font-family: "Lexend", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--ink);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feature-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

/* ---- 3D scene ---- */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1400px;
}

.scene {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 440px;
  transform-style: preserve-3d;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(79, 70, 229, 0.22);
  top: 50%;
  left: 50%;
}
.ring-1 {
  width: 380px;
  height: 380px;
  margin: -190px 0 0 -190px;
  animation: ringSpin 26s linear infinite;
}
.ring-2 {
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-color: rgba(124, 58, 237, 0.22);
  animation: ringSpin 20s linear infinite reverse;
}
@keyframes ringSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  background: radial-gradient(circle at 35% 30%, #fff, var(--primary) 60%);
  box-shadow: 0 0 40px rgba(79, 70, 229, 0.55);
  animation: orbFloat 7s ease-in-out infinite;
}
.orb-a {
  width: 26px;
  height: 26px;
  top: 12%;
  right: 18%;
  animation-delay: 0s;
}
.orb-b {
  width: 16px;
  height: 16px;
  bottom: 16%;
  left: 10%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 60%);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.55);
  animation-delay: 1.4s;
}
@keyframes orbFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

.glass-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  box-shadow:
    0 20px 45px rgba(21, 19, 43, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.15s ease-out;
  animation: cardFloat 6s ease-in-out infinite;
}
.glass-card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 66%
  );
  transform: translateX(-120%);
  animation: cardShine 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardShine {
  0%,
  60%,
  100% {
    transform: translateX(-120%);
  }
  80% {
    transform: translateX(120%);
  }
}
@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt, 0deg));
  }
  50% {
    transform: translateY(-14px) rotate(var(--tilt, 0deg));
  }
}

.card-main {
  width: 280px;
  padding: 20px;
  left: 50%;
  top: 50%;
  margin: -100px 0 0 -140px;
  z-index: 3;
  --tilt: -1.5deg;
}
.card-toolbar-preview {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.dot-case {
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-faint);
}
.dot-case.active {
  background: var(--primary);
  color: var(--white);
}
.card-line-lg {
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 8px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}
.card-line-sm {
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 14px;
}
.card-footer-preview {
  display: flex;
  gap: 14px;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.card-float {
  width: 130px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.mini-icon {
  font-family: "Fira Code", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 9px;
  border-radius: 8px;
}
.mini-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.card-float-1 {
  top: 6%;
  left: 0;
  --tilt: 3deg;
  animation-delay: 0.4s;
}
.card-float-2 {
  bottom: 10%;
  right: 2%;
  --tilt: -2.5deg;
  animation-delay: 1.1s;
}
.card-float-3 {
  top: 56%;
  left: -4%;
  --tilt: 2deg;
  animation-delay: 0.8s;
}

.shape {
  position: absolute;
  opacity: 0.6;
}
.shape-tri {
  width: 0;
  height: 0;
  top: 4%;
  right: 30%;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 20px solid var(--accent);
  animation: shapeSpin 12s linear infinite;
}
.shape-square {
  width: 18px;
  height: 18px;
  bottom: 4%;
  left: 34%;
  border: 2px solid var(--primary);
  border-radius: 5px;
  animation: shapeSpin 16s linear infinite reverse;
}
@keyframes shapeSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mesh,
  .particle,
  .ring-1,
  .ring-2,
  .orb,
  .glass-card,
  .glass-card-shine,
  .shape {
    animation: none !important;
  }
}

/* ==================== TOOL CARD ==================== */
.tool-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.tool-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  position: relative;
}
.tool-card-header h2 {
  font-size: 1.3rem;
}
.tool-card-header p {
  color: var(--ink-faint);
  margin: 0 0 20px;
  font-size: 0.92rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.case-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}
.case-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.case-btn:active {
  transform: scale(0.97);
}
.case-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.tool-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  line-height: 1.6;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.tool-textarea:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}
.stat-value {
  display: block;
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary);
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover {
  background: var(--bg-soft);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* ==================== CONTENT ==================== */
.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.content-article h2 {
  font-size: 1.4rem;
  margin-top: 2em;
}
.content-article p,
.content-article li {
  color: var(--ink-soft);
}
.content-article ul,
.content-article ol {
  padding-left: 1.3em;
}
.content-article li {
  margin-bottom: 0.4em;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--bg-soft);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  color: var(--ink);
}
.faq-list p {
  margin: 10px 0 0;
}

/* ==================== RELATED TOOLS ==================== */
.related-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.related-section h2 {
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.related-icon {
  color: var(--primary);
  margin-bottom: 4px;
}
.related-title {
  font-family: "Lexend", sans-serif;
  font-weight: 600;
}
.related-desc {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ==================== CTA ==================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 0 24px 60px;
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-inner h2 {
  color: var(--white);
  font-size: 1.6rem;
}
.cta-inner p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 22px;
}
.cta-inner .btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: none;
}
.cta-inner .btn-primary:hover {
  background: var(--bg-soft);
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 24px 24px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand p {
  margin-top: 10px;
  font-size: 0.9rem;
}
.footer-brand .brand-name {
  color: var(--white);
}
.footer-col h3 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: var(--white);
}
.footer-bottom {
  max-width: 1120px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}
.social-icons {
  display: flex;
  gap: 12px;
}
.social-icons a {
  color: rgba(255, 255, 255, 0.7);
}
.social-icons a:hover {
  color: var(--white);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 64px;
    text-align: center;
  }
  .hero-left {
    max-width: 640px;
    margin: 0 auto;
  }
  .hero-ctas,
  .hero-trust {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-pills {
    justify-content: center;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 48px 16px 70px;
  }
  .tool-card {
    padding: 20px;
  }
  .scene {
    height: 360px;
  }
  .card-main {
    width: 230px;
    margin: -90px 0 0 -115px;
    padding: 16px;
  }
  .card-float {
    width: 108px;
    padding: 10px;
  }
  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
  }
}
