/* ═══════════════════════════════════════════════════════════════════
   QuickyDesk — Production Design System v3
   Final polish: consistent easing · fixed accent leaks · glow states
   improved dropzone · a11y focus rings · stagger animations · perf
═══════════════════════════════════════════════════════════════════ */

/* Fonts loaded via <link> in base.html */

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ═══════════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════════ */
:root {
  /* ── Brand palette ── */
  --navy:          #0f172a;
  --navy-80:       #1e293b;
  --indigo:        #6366f1;
  --indigo-dark:   #4f46e5;
  --indigo-soft:   #eef2ff;
  --green:         #22c55e;
  --green-soft:    #f0fdf4;

  /* ── Neutral scale ── */
  --white:         #ffffff;
  --gray-50:       #f8fafc;
  --gray-100:      #f1f5f9;
  --gray-200:      #e2e8f0;
  --gray-300:      #cbd5e1;
  --gray-400:      #94a3b8;
  --gray-500:      #64748b;
  --gray-600:      #475569;
  --gray-700:      #334155;
  --gray-800:      #1e293b;
  --gray-900:      #0f172a;

  /* ── Semantic ── */
  --bg:            var(--gray-50);
  --surface:       var(--white);
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);
  --text:          var(--gray-700);
  --text-muted:    var(--gray-500);
  --heading:       var(--navy);

  /* ── Nav CTA always indigo — never inherits tool accent ── */
  --nav-cta-bg:    var(--indigo);
  --nav-cta-hover: var(--indigo-dark);

  /* ── Tool accent (per-page override) ── */
  --tool-color:      var(--indigo);
  --tool-color-dark: var(--indigo-dark);
  --tool-color-soft: var(--indigo-soft);

  /* Semantic button aliases — tool pages override these */
  --accent:        var(--indigo);
  --accent-dark:   var(--indigo-dark);
  --accent-soft:   var(--indigo-soft);

  /* ── Layout ── */
  --container:     1200px;
  --radius-xs:     6px;
  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  /* ── Shadows ── */
  --shadow-xs:     0 1px 2px rgba(15,23,42,.05);
  --shadow-sm:     0 2px 8px rgba(15,23,42,.07);
  --shadow:        0 4px 16px rgba(15,23,42,.09);
  --shadow-md:     0 8px 28px rgba(15,23,42,.11);
  --shadow-lg:     0 20px 56px rgba(15,23,42,.15);
  --shadow-indigo: 0 8px 28px rgba(99,102,241,.28);
  --glow-tool:     0 0 0 3px rgba(99,102,241,.15), 0 4px 20px rgba(99,102,241,.12);

  /* ── Motion — clean easing, no overshoot ── */
  --ease:          cubic-bezier(.4,0,.2,1);       /* Material standard */
  --ease-out:      cubic-bezier(0,0,.2,1);         /* Decelerate */
  --ease-spring:   cubic-bezier(.34,1.56,.64,1);  /* Gentle spring — cards only */
  --dur-fast:      140ms;
  --dur:           200ms;
  --dur-slow:      320ms;
}

/* ═══════════════════════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════════════════════ */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a  { color: inherit; text-decoration: none; }
p  { color: var(--text-muted); line-height: 1.8; }
ul { list-style: none; }
img, svg { display: block; }

/* ── Typography scale ── */
h1, h2, h3, h4, h5 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.18;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -.025em; font-weight: 700; }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
h4 { font-size: .95rem; font-weight: 600; }

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Menlo', monospace;
  font-size: .82em;
  background: var(--gray-100);
  border: 1px solid var(--border);
  color: var(--indigo-dark);
  padding: .12em .45em;
  border-radius: var(--radius-xs);
}

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

/* Anchor offset for sticky nav */
[id] { scroll-margin-top: 88px; }

/* ═══════════════════════════════════════════════════════════════════
   FOCUS — accessible, minimal, on-brand
═══════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2.5px solid var(--indigo);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease-spring),
    box-shadow var(--dur) var(--ease);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97) !important; }

/* ── Primary: always indigo (never inherits tool accent) ── */
.btn-primary {
  background: var(--indigo);
  color: var(--white);
  border-color: var(--indigo);
  box-shadow: 0 1px 3px rgba(99,102,241,.25), 0 1px 2px rgba(15,23,42,.06);
}
.btn-primary:hover {
  background: var(--indigo-dark);
  border-color: var(--indigo-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-indigo);
}

/* ── Tool primary: uses tool accent (inside upload area only) ── */
.btn-tool-primary {
  background: var(--tool-color);
  color: var(--white);
  border-color: var(--tool-color);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.btn-tool-primary:hover {
  background: var(--tool-color-dark);
  border-color: var(--tool-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* ── Ghost ── */
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-soft);
  transform: translateY(-1px);
}

/* ── Green / download ── */
.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  box-shadow: 0 1px 3px rgba(34,197,94,.25);
}
.btn-green:hover {
  background: #16a34a;
  border-color: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34,197,94,.3);
}

/* ── Sizes ── */
.btn-sm  { padding: .5rem 1rem;   font-size: .82rem; border-radius: var(--radius-xs); }
.btn-lg  { padding: .85rem 2rem;  font-size: 1rem;   border-radius: var(--radius); }
.btn-xl  { padding: 1rem 2.5rem;  font-size: 1.05rem; border-radius: var(--radius); font-weight: 700; }

/* ── Link button ── */
.btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--tool-color, var(--indigo));
  font-weight: 600; font-size: inherit; padding: 0;
  text-decoration: underline dotted;
  font-family: inherit;
  transition: color var(--dur-fast);
}
.btn-link:hover { text-decoration: underline; color: var(--tool-color-dark, var(--indigo-dark)); }

/* ── Process button (upload tool) ── */
.btn-process { width: 100%; font-size: 1rem; padding: 1rem; border-radius: var(--radius); }

.btn-process.loading { opacity: .85; pointer-events: none; }
.btn-process.loading .btn-label { opacity: 0; }
.btn-process .btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  position: absolute;
}
.btn-process.loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(226,232,240,.7);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav--scrolled {
  box-shadow: 0 1px 20px rgba(15,23,42,.09);
  background: rgba(255,255,255,.96);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: .5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--navy);
  letter-spacing: -.02em;
  flex-shrink: 0;
  transition: opacity var(--dur-fast);
}
.nav-logo:hover { opacity: .8; }

.logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--indigo) 0%, #818cf8 100%);
  color: var(--white);
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 1.05rem; font-weight: 800;
  box-shadow: 0 3px 10px rgba(99,102,241,.32);
  flex-shrink: 0;
  will-change: transform;
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin-left: auto;
}
.nav-links a {
  padding: .45rem .95rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-links a:hover    { color: var(--navy); background: var(--gray-100); }
.nav-links a.nav-active { color: var(--indigo); background: var(--indigo-soft); font-weight: 600; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: flex; align-items: center; gap: .3rem;
  padding: .45rem .95rem;
  border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .875rem; font-weight: 500;
  color: var(--gray-600);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  line-height: 1;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.nav-active { color: var(--navy); background: var(--gray-100); }

.nav-arrow {
  font-size: .62rem;
  color: var(--gray-400);
  transition: transform var(--dur) var(--ease);
  margin-top: 1px;
}
.nav-dropdown.open .nav-arrow { transform: rotate(180deg); color: var(--navy); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 215px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .45rem;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 500;
}
.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
  animation: menuDown var(--dur) var(--ease-out) both;
}
@keyframes menuDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .86rem; font-weight: 500;
  color: var(--gray-700);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-dropdown-menu a:hover { background: var(--indigo-soft); color: var(--indigo); }
.nav-dropdown-menu svg { opacity: .5; flex-shrink: 0; }
.nav-dropdown-menu a:hover svg { opacity: 1; }

/* Nav CTA — always indigo, never inherits tool accent */
.nav-cta {
  margin-left: .75rem;
  padding: .5rem 1.2rem;
  font-size: .85rem;
  background: var(--nav-cta-bg) !important;
  border-color: var(--nav-cta-bg) !important;
  color: var(--white) !important;
}
.nav-cta:hover {
  background: var(--nav-cta-hover) !important;
  border-color: var(--nav-cta-hover) !important;
  box-shadow: var(--shadow-indigo) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: .5rem; margin-left: auto;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast);
}
.nav-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile panel */
.nav-mobile {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15,23,42,.07);
}
.nav-mobile.open { display: block; }
.nav-mobile-section { padding: .8rem 1.5rem; }
.nav-mobile-section + .nav-mobile-section { border-top: 1px solid var(--gray-100); }
.nav-mobile-label {
  display: block; font-size: .67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--gray-400); margin-bottom: .55rem;
  font-family: 'Inter', sans-serif;
}
.nav-mobile a {
  display: block; padding: .62rem 0;
  font-size: .9rem; font-weight: 500;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: color var(--dur-fast), padding-left var(--dur-fast);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a.nav-active { color: var(--indigo); font-weight: 600; }
.nav-mobile a:hover { color: var(--indigo); padding-left: .35rem; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ═══════════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 6.5rem 0 5.5rem;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-bg-gradient {
  position: absolute; top: -35%; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 700px;
  background: radial-gradient(ellipse at center,
    rgba(99,102,241,.10) 0%, rgba(99,102,241,.04) 45%, transparent 70%);
}
.hero-bg-dot { position: absolute; border-radius: 50%; }
.hero-bg-dot--1 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(99,102,241,.12), transparent 70%);
  top: -60px; right: 8%;
  animation: float 9s ease-in-out infinite;
  will-change: transform;
}
.hero-bg-dot--2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(34,197,94,.1), transparent 70%);
  bottom: 15%; left: 4%;
  animation: float 11s ease-in-out infinite reverse;
  will-change: transform;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

.hero-inner { position: relative; text-align: center; max-width: 800px; margin: 0 auto; }

/* Badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--indigo-soft); color: var(--indigo-dark);
  border: 1px solid rgba(99,102,241,.18);
  padding: .38rem 1.05rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600;
  margin-bottom: 1.85rem; letter-spacing: .01em;
  animation: slideDown .5s var(--ease-out) .05s both;
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.22);
  flex-shrink: 0;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.22); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,.08); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-headline {
  margin-bottom: 1.35rem;
  animation: slideDown .55s var(--ease-out) .1s both;
}
.gradient-text {
  background: linear-gradient(130deg, var(--indigo) 0%, #8b5cf6 55%, #ec4899 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: 1.12rem; color: var(--gray-500);
  max-width: 540px; margin: 0 auto 2.75rem; line-height: 1.8;
  animation: slideDown .55s var(--ease-out) .15s both;
}
.hero-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 3.5rem;
  animation: slideDown .55s var(--ease-out) .2s both;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 2.5rem; flex-wrap: wrap;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  animation: slideDown .55s var(--ease-out) .28s both;
}
.stat { text-align: center; }
.stat strong {
  display: block; font-family: 'Poppins', sans-serif;
  font-size: 1.55rem; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: .3rem;
}
.stat span { font-size: .77rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .08em; }
.stat-divider { width: 1px; height: 30px; background: var(--border); }

/* ═══════════════════════════════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════════════════════════════ */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--indigo); margin-bottom: .8rem;
  font-family: 'Inter', sans-serif;
}
.section-header h2 { margin-bottom: .65rem; }
.section-header p  { font-size: 1.05rem; color: var(--gray-500); max-width: 520px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════════════════
   TOOLS GRID
═══════════════════════════════════════════════════════════════════ */
.tools-section {
  padding: 5.5rem 0;
  background: var(--gray-50);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }

.tool-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex; flex-direction: column; gap: .65rem;
  cursor: pointer; position: relative; overflow: hidden;
  transition:
    transform var(--dur) var(--ease-spring),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  text-decoration: none;
  will-change: transform, box-shadow;
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tool-color, var(--indigo));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease);
}
.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--tool-color, var(--indigo)) 35%, var(--border));
}
.tool-card:hover::before { transform: scaleX(1); }

.tool-card--merge    { --tool-color: #6366f1; --tool-color-soft: #eef2ff; }
.tool-card--split    { --tool-color: #f59e0b; --tool-color-soft: #fffbeb; }
.tool-card--compress { --tool-color: #22c55e; --tool-color-soft: #f0fdf4; }
.tool-card--convert  { --tool-color: #ec4899; --tool-color-soft: #fdf2f8; }
.tool-card--export   { --tool-color: #0ea5e9; --tool-color-soft: #f0f9ff; }

.tool-icon-wrap {
  width: 50px; height: 50px;
  background: var(--tool-color-soft, var(--indigo-soft));
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--tool-color, var(--indigo));
  transition: transform var(--dur) var(--ease-spring);
  flex-shrink: 0;
}
.tool-card:hover .tool-icon-wrap { transform: scale(1.1) rotate(-4deg); }
.tool-icon-wrap svg { width: 24px; height: 24px; }

.tool-card h3 { font-size: .98rem; font-weight: 700; color: var(--navy); margin-top: .1rem; line-height: 1.3; }
.tool-card p  { font-size: .84rem; color: var(--gray-500); line-height: 1.62; flex: 1; }
.tool-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .81rem; font-weight: 600;
  color: var(--tool-color, var(--indigo));
  font-family: 'Inter', sans-serif;
  margin-top: .2rem;
  transition: gap var(--dur-fast);
}
.tool-card:hover .tool-link { gap: .55rem; }

/* ═══════════════════════════════════════════════════════════════════
   HOW IT WORKS
═══════════════════════════════════════════════════════════════════ */
.how-section { padding: 5.5rem 0; background: var(--white); }
.steps-grid {
  display: flex; align-items: stretch; justify-content: center;
  gap: 1rem; flex-wrap: wrap;
}
.step {
  flex: 1; min-width: 200px; max-width: 260px;
  background: var(--gray-50); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  text-align: center; position: relative;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease-spring);
}
.step:hover { border-color: var(--indigo); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--indigo) 0%, #818cf8 100%);
  color: var(--white); border-radius: 50%;
  font-family: 'Poppins', sans-serif; font-size: .95rem; font-weight: 700;
  margin: 0 auto 1.15rem;
  box-shadow: 0 4px 12px rgba(99,102,241,.28);
}
.step h3 { font-size: .98rem; margin-bottom: .55rem; color: var(--navy); }
.step p  { font-size: .86rem; line-height: 1.68; }
.step-connector { width: 36px; display: flex; align-items: center; justify-content: center; color: var(--gray-300); font-size: 1.3rem; flex-shrink: 0; padding-top: .5rem; }
@media (max-width: 660px) { .step-connector { display: none; } }

/* ═══════════════════════════════════════════════════════════════════
   TRUST STRIP
═══════════════════════════════════════════════════════════════════ */
.trust-section {
  padding: 4.5rem 0; background: var(--navy); position: relative; overflow: hidden;
}
.trust-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 24px 24px;
}
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; position: relative; }
.trust-item { text-align: center; padding: 1.25rem 1rem; }
.trust-icon-wrap {
  width: 54px; height: 54px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  display: grid; place-items: center; font-size: 1.45rem;
  margin: 0 auto 1rem;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease-spring), border-color var(--dur);
}
.trust-item:hover .trust-icon-wrap { background: rgba(99,102,241,.25); border-color: rgba(99,102,241,.4); transform: translateY(-3px); }
.trust-item h4 { color: var(--white); font-size: .98rem; margin-bottom: .45rem; }
.trust-item p  { color: rgba(255,255,255,.48); font-size: .85rem; line-height: 1.68; }

/* ═══════════════════════════════════════════════════════════════════
   CTA BANNER
═══════════════════════════════════════════════════════════════════ */
.cta-banner {
  padding: 5.5rem 0;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  text-align: center; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 25% 50%, rgba(255,255,255,.07) 0%, transparent 55%);
}
.cta-inner { position: relative; max-width: 640px; margin: 0 auto; }
.cta-inner h2 { color: var(--white); margin-bottom: .8rem; }
.cta-inner p  { color: rgba(255,255,255,.72); font-size: 1.05rem; margin-bottom: 2.25rem; }
.cta-banner .btn-primary {
  background: var(--white) !important;
  color: var(--indigo-dark) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.cta-banner .btn-primary:hover { background: var(--gray-50) !important; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,.22); }
.cta-banner .btn-ghost { border-color: rgba(255,255,255,.38); color: var(--white); }
.cta-banner .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.65); color: var(--white); transform: translateY(-1px); }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════════ */
.footer { background: var(--navy); padding: 5rem 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-brand .nav-logo { color: var(--white); margin-bottom: 1rem; }
.footer-brand .nav-logo:hover { opacity: .75; }
.footer-brand > p {
  font-size: .875rem; color: rgba(255,255,255,.42);
  line-height: 1.78; max-width: 280px; margin-bottom: 1.35rem;
}
.footer-trust-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer-trust-badges span {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  color: rgba(255,255,255,.48); font-size: .74rem;
  padding: .3rem .75rem; border-radius: 999px; font-weight: 500;
}
.footer-links { display: flex; flex-direction: column; gap: 0; }
.footer-links h3 {
  color: rgba(255,255,255,.9); font-size: .7rem;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase; letter-spacing: .14em;
  font-weight: 700; margin-bottom: 1rem;
}
.footer-links a {
  color: rgba(255,255,255,.42); font-size: .86rem;
  padding: .32rem 0;
  transition: color var(--dur-fast), padding-left var(--dur-fast);
}
.footer-links a:hover { color: rgba(255,255,255,.85); padding-left: .3rem; }
.footer-bottom { padding: 1.5rem 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: .77rem; color: rgba(255,255,255,.25); margin: 0; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: .77rem; color: rgba(255,255,255,.32); transition: color var(--dur-fast); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.65); }
@media (max-width: 960px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1/-1; } .footer-brand > p { max-width: 100%; } }
@media (max-width: 520px)  { .footer-inner { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════════
   TOOL PAGE HERO
═══════════════════════════════════════════════════════════════════ */
.tool-hero {
  padding: 4rem 0 3.5rem; background: var(--white);
  border-bottom: 1px solid var(--border);
  text-align: center; position: relative; overflow: hidden;
}
.tool-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 65% 85% at 50% 0%,
    var(--tool-color-soft, var(--indigo-soft)) 0%, transparent 72%);
  opacity: .55;
}
.tool-hero-inner { position: relative; max-width: 680px; margin: 0 auto; }

.tool-hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--tool-color-soft, var(--indigo-soft));
  color: var(--tool-color, var(--indigo));
  border: 1px solid rgba(99,102,241,.15);
  padding: .35rem 1rem; border-radius: 999px;
  font-size: .79rem; font-weight: 700; font-family: 'Inter', sans-serif;
  margin-bottom: 1.3rem; letter-spacing: .03em;
}
.tool-hero h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-bottom: .8rem; }
.tool-hero-inner > p { font-size: 1.05rem; color: var(--gray-500); line-height: 1.75; }

.tool-hero-badges {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem;
}
.tool-hero-badge-pill {
  display: flex; align-items: center; gap: .35rem;
  background: var(--white); border: 1px solid var(--border);
  padding: .28rem .85rem; border-radius: 999px;
  font-size: .77rem; font-weight: 600; color: var(--gray-600);
  box-shadow: var(--shadow-xs);
}

/* ═══════════════════════════════════════════════════════════════════
   UPLOAD AREA
═══════════════════════════════════════════════════════════════════ */
.upload-section { padding: 3rem 0 5rem; }
.upload-container { max-width: 740px; display: flex; flex-direction: column; gap: 1.2rem; }

/* Drop zone — stronger visibility, glow on hover */
.dropzone {
  background: var(--white);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center; cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease-spring);
  position: relative; min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
.dropzone:hover {
  border-color: var(--tool-color, var(--indigo));
  border-style: solid;
  background: var(--tool-color-soft, var(--indigo-soft));
  box-shadow: var(--glow-tool);
  transform: translateY(-2px);
}
.dropzone.drag-over {
  border-color: var(--tool-color, var(--indigo));
  border-style: solid;
  background: var(--tool-color-soft, var(--indigo-soft));
  box-shadow: var(--glow-tool);
  transform: scale(1.008);
}
.dropzone:focus-visible {
  outline: 3px solid var(--tool-color, var(--indigo));
  outline-offset: 3px;
}
.dropzone-content { display: flex; flex-direction: column; align-items: center; gap: 0; }

.drop-icon-wrap {
  width: 70px; height: 70px;
  background: var(--tool-color-soft, var(--indigo-soft));
  border: 2px solid rgba(99,102,241,.12);
  border-radius: 50%; display: grid; place-items: center;
  margin-bottom: 1.25rem;
  transition: transform var(--dur) var(--ease-spring), border-color var(--dur);
}
.dropzone:hover .drop-icon-wrap {
  transform: scale(1.12) rotate(-5deg);
  border-color: rgba(99,102,241,.25);
}
.drop-icon-wrap svg { width: 30px; height: 30px; color: var(--tool-color, var(--indigo)); }

.drop-title { font-family: 'Poppins', sans-serif; font-size: 1.08rem; font-weight: 600; color: var(--navy); margin-bottom: .4rem; }
.drop-sub   { font-size: .88rem; color: var(--gray-500); margin-bottom: .5rem; }
.drop-hint  { font-size: .77rem; color: var(--gray-400); }

/* File list */
.file-list { text-align: left; width: 100%; padding: .35rem 0; }
.file-list-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .35rem .25rem .8rem;
  font-size: .8rem; font-weight: 600; color: var(--gray-500);
}
.file-list-add {
  background: none; border: 1.5px solid var(--border);
  padding: .3rem .85rem; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .77rem; color: var(--gray-500);
  transition: border-color var(--dur-fast), color var(--dur-fast);
  font-family: 'Inter', sans-serif;
}
.file-list-add:hover { border-color: var(--tool-color, var(--indigo)); color: var(--tool-color, var(--indigo)); }

.file-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1rem;
  background: var(--gray-50); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: .45rem;
  font-size: .87rem; color: var(--gray-700);
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.file-item:hover { border-color: var(--tool-color, var(--indigo)); background: var(--white); transform: translateX(2px); }
.file-item-icon  { font-size: 1.1rem; flex-shrink: 0; }
.file-item-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-item-size  { font-size: .77rem; color: var(--gray-400); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.file-item-del {
  background: none; border: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gray-400);
  font-size: .82rem; flex-shrink: 0;
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.file-item-del:hover { background: #fee2e2; color: #ef4444; transform: scale(1.15); }

/* Options box */
.options-box {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.4rem 1.75rem;
}
.options-label { display: block; font-weight: 600; color: var(--navy); margin-bottom: .5rem; font-size: .9rem; }
.options-hint  { font-size: .76rem; font-weight: 400; color: var(--gray-400); margin-left: .5rem; }
.options-help  { font-size: .79rem; color: var(--gray-400); margin-top: .4rem; line-height: 1.58; }
.options-input {
  width: 100%; padding: .72rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: .9rem;
  color: var(--gray-700); background: var(--gray-50); outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur), box-shadow var(--dur);
}
.options-input:focus {
  border-color: var(--tool-color, var(--indigo));
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

/* Mode toggle */
.mode-toggle { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .8rem; }
.mode-btn {
  flex: 1; min-width: 160px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); cursor: pointer;
  padding: 1rem 1.25rem;
  font-family: 'Poppins', sans-serif; font-size: .88rem; font-weight: 600;
  color: var(--gray-600);
  transition: all var(--dur) var(--ease);
  display: flex; flex-direction: column; align-items: center; gap: .28rem;
}
.mode-btn.active {
  border-color: var(--tool-color, var(--indigo));
  color: var(--tool-color, var(--indigo));
  background: var(--tool-color-soft, var(--indigo-soft));
  box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}
.mode-btn:not(.active):hover { border-color: var(--gray-300); background: var(--gray-50); transform: translateY(-1px); }
.mode-btn-sub { font-family: 'Inter', sans-serif; font-size: .74rem; font-weight: 400; color: var(--gray-400); }
.mode-btn.active .mode-btn-sub { color: var(--tool-color, var(--indigo)); opacity: .75; }

/* Progress */
.progress-wrap {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem 2rem; text-align: center;
}
.progress-bar { height: 5px; background: var(--gray-100); border-radius: 999px; overflow: hidden; margin-bottom: .85rem; }
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--tool-color, var(--indigo)), #a5b4fc);
  border-radius: 999px;
  transition: width .38s var(--ease-out);
  will-change: width;
}
.progress-label {
  font-size: .87rem; font-weight: 500; color: var(--gray-500);
  display: flex; align-items: center; justify-content: center; gap: .55rem;
}
.progress-spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--tool-color, var(--indigo));
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
  display: inline-block;
}

/* Result + Error */
.result-box, .error-box {
  border-radius: var(--radius-lg); padding: 2.5rem 2rem;
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 1rem;
  animation: fadeUp .3s var(--ease-out) both;
}
.result-box { background: var(--green-soft); border: 1.5px solid rgba(34,197,94,.28); }
.error-box  { background: #fef2f2; border: 1.5px solid rgba(239,68,68,.22); }
.result-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; }
.success-icon { background: var(--green); color: var(--white); box-shadow: 0 6px 18px rgba(34,197,94,.3); }
.error-icon   { background: #ef4444; color: var(--white); box-shadow: 0 6px 18px rgba(239,68,68,.28); }
.result-msg   { color: #166534; font-weight: 600; font-size: .98rem; max-width: 420px; }
.error-msg    { color: #991b1b; font-weight: 600; font-size: .98rem; max-width: 420px; }

/* Tool steps */
.tool-steps-section { padding: 4rem 0 3rem; background: var(--gray-50); border-top: 1px solid var(--border); }
.tool-steps-title   { text-align: center; margin-bottom: 2.5rem; font-size: 1.45rem; letter-spacing: -.02em; }
.tool-steps-grid    { display: flex; align-items: flex-start; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.tool-step {
  flex: 1; min-width: 185px; max-width: 245px;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.4rem 1.35rem;
  display: flex; gap: .9rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease-spring);
}
.tool-step:hover { border-color: var(--tool-color, var(--indigo)); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.tool-step-num {
  width: 30px; height: 30px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--tool-color, var(--indigo)), color-mix(in srgb, var(--tool-color, var(--indigo)) 60%, white));
  color: var(--white); border-radius: 50%;
  display: grid; place-items: center;
  font-size: .82rem; font-weight: 700; font-family: 'Poppins', sans-serif;
}
.tool-step-body strong { display: block; font-size: .9rem; color: var(--navy); margin-bottom: .3rem; font-weight: 600; }
.tool-step-body p      { font-size: .81rem; line-height: 1.62; margin: 0; }
.tool-step-arrow { font-size: 1.2rem; color: var(--gray-300); padding-top: 1.3rem; flex-shrink: 0; }
@media (max-width: 640px) { .tool-step-arrow { display: none; } }

/* Info cards */
.info-section { padding: 3rem 0 5rem; background: var(--gray-50); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.info-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-spring), box-shadow var(--dur);
}
.info-card:hover { border-color: var(--tool-color, var(--indigo)); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.info-card-icon { font-size: 1.5rem; margin-bottom: .65rem; }
.info-card h4   { font-size: .93rem; margin-bottom: .38rem; color: var(--navy); }
.info-card p    { font-size: .83rem; line-height: 1.66; }

/* Related tools */
.related-tools-section { padding: 3.5rem 0 5rem; background: var(--white); border-top: 1px solid var(--border); }
.related-tools-section h2 { text-align: center; margin-bottom: 1.75rem; font-size: 1.45rem; }
.related-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; max-width: 860px; margin: 0 auto; }
.related-tool-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.05rem 1.2rem;
  background: var(--gray-50); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-spring), box-shadow var(--dur);
}
.related-tool-card:hover { border-color: var(--indigo); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.related-tool-icon   { font-size: 1.45rem; flex-shrink: 0; }
.related-tool-card strong { display: block; font-size: .88rem; color: var(--navy); margin-bottom: .12rem; }
.related-tool-card p { font-size: .78rem; color: var(--gray-500); margin: 0; }

/* ═══════════════════════════════════════════════════════════════════
   STATIC PAGES
═══════════════════════════════════════════════════════════════════ */
.page-hero { padding: 5rem 0 4rem; background: var(--white); border-bottom: 1px solid var(--border); text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 75% at 50% 0%, var(--indigo-soft) 0%, transparent 70%); opacity: .45; }
.page-hero-inner { position: relative; max-width: 680px; margin: 0 auto; }
.page-hero-badge { display: inline-block; background: var(--indigo-soft); color: var(--indigo-dark); padding: .35rem 1rem; border-radius: 999px; font-size: .79rem; font-weight: 700; font-family: 'Inter', sans-serif; margin-bottom: .9rem; letter-spacing: .04em; }
.page-hero h1 { margin-bottom: .8rem; }
.page-hero-inner > p { font-size: 1.05rem; color: var(--gray-500); line-height: 1.75; }

.page-body    { padding: 5rem 0 7rem; }
.page-content { max-width: 840px; margin: 0 auto; }

.content-prose { max-width: 720px; }
.content-prose h2 { font-size: 1.45rem; margin: 3rem 0 .85rem; }
.content-prose h2:first-child { margin-top: 0; }
.content-prose h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; }
.content-prose p  { line-height: 1.82; margin-bottom: 1.05rem; }
.content-prose a  { color: var(--indigo); text-decoration: underline dotted; transition: color var(--dur-fast); }
.content-prose a:hover { color: var(--indigo-dark); text-decoration: underline; }
.content-prose ul, .content-prose ol { margin: .5rem 0 1.5rem 1.5rem; }
.content-prose li { margin-bottom: .42rem; line-height: 1.77; }

.about-principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 1.2rem; margin: 2rem 0 2.5rem; }
.principle-card {
  background: var(--gray-50); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem 1.5rem; text-align: center;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-spring), box-shadow var(--dur);
}
.principle-card:hover { border-color: var(--indigo); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.principle-icon { font-size: 1.85rem; margin-bottom: .75rem; }
.principle-card h3 { font-size: .98rem; margin-bottom: .42rem; }
.principle-card p  { font-size: .85rem; }

.contact-layout { display: grid; grid-template-columns: 1fr 1.8fr; gap: 3.5rem; align-items: start; }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; gap: 2rem; } }
.contact-info h2 { font-size: 1.45rem; margin-bottom: 1rem; }
.contact-info > p { margin-bottom: 1.5rem; }
.contact-detail { display: flex; gap: 1rem; margin-bottom: 1.2rem; align-items: flex-start; }
.contact-detail-icon { width: 40px; height: 40px; background: var(--indigo-soft); border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 1.05rem; flex-shrink: 0; }
.contact-detail-text strong { display: block; font-size: .87rem; color: var(--navy); margin-bottom: .22rem; font-weight: 600; }
.contact-detail-text span   { font-size: .83rem; color: var(--gray-500); line-height: 1.5; }

.contact-form-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; box-shadow: var(--shadow-sm); }
.contact-form-card h2 { font-size: 1.35rem; margin-bottom: 1.75rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: .38rem; margin-bottom: 1.05rem; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea {
  padding: .72rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: .9rem; color: var(--gray-700);
  background: var(--gray-50); outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur), box-shadow var(--dur);
  width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--indigo); background: var(--white);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.form-group textarea { resize: vertical; min-height: 120px; line-height: 1.65; }
.form-submit { margin-top: .75rem; }
.form-submit .btn { width: 100%; padding: .9rem; font-size: .95rem; }
.input-error { border-color: #ef4444 !important; background: #fef2f2 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.1) !important; }
.field-error { color: #ef4444; font-size: .77rem; margin-top: .25rem; display: flex; align-items: center; gap: .3rem; }
.field-error::before { content: '⚠'; font-size: .8rem; }
.form-success { background: var(--green-soft); border: 1.5px solid rgba(34,197,94,.28); border-radius: var(--radius-lg); padding: 2.5rem 2rem; text-align: center; }
.form-success-icon { font-size: 2.5rem; margin-bottom: .85rem; }
.form-success h3   { color: #166534; margin-bottom: .5rem; }
.form-success p    { color: #15803d; font-size: .9rem; }

.legal-section { padding: 4rem 0 7rem; }
.legal-toc { background: var(--gray-50); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 3rem; }
.legal-toc h3 { font-size: .93rem; margin-bottom: .85rem; }
.legal-toc ol { margin-left: 1.25rem; }
.legal-toc li { margin-bottom: .38rem; }
.legal-toc a  { color: var(--indigo); font-size: .86rem; transition: color var(--dur-fast); }
.legal-toc a:hover { color: var(--indigo-dark); }
.legal-content section { margin-bottom: 3rem; }
.legal-content h2 { font-size: 1.28rem; padding-bottom: .6rem; border-bottom: 2px solid var(--indigo-soft); margin-bottom: 1.1rem; }
.legal-highlight { background: var(--indigo-soft); border-left: 4px solid var(--indigo); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1.1rem 1.5rem; margin: 1.5rem 0; font-size: .9rem; line-height: 1.77; color: var(--gray-700); }

/* ═══════════════════════════════════════════════════════════════════
   BLOG
═══════════════════════════════════════════════════════════════════ */
.blog-hero { padding: 5rem 0 3.5rem; background: var(--white); border-bottom: 1px solid var(--border); text-align: center; }
.blog-hero h1 { margin-bottom: .75rem; }
.blog-hero p  { font-size: 1.05rem; color: var(--gray-500); }
.blog-section { padding: 4.5rem 0 7rem; }
.blog-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.blog-card {
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.85rem; display: flex; flex-direction: column; gap: .6rem;
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease), border-color var(--dur);
  text-decoration: none;
  will-change: transform;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--indigo); }
.blog-card-meta { display: flex; align-items: center; gap: .7rem; font-size: .76rem; color: var(--gray-400); flex-wrap: wrap; }
.blog-card-cat  { background: var(--indigo-soft); color: var(--indigo-dark); padding: .18rem .68rem; border-radius: 999px; font-weight: 700; font-size: .71rem; letter-spacing: .04em; }
.blog-card h2   { font-size: 1.02rem; line-height: 1.38; color: var(--navy); }
.blog-card p    { font-size: .84rem; line-height: 1.72; flex: 1; }
.blog-card-link { font-size: .82rem; font-weight: 600; color: var(--indigo); display: inline-flex; align-items: center; gap: .32rem; transition: gap var(--dur-fast); }
.blog-card:hover .blog-card-link { gap: .55rem; }

.blog-post-hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 4.5rem 0 3.5rem; }
.blog-post-hero-inner { max-width: 780px; margin: 0 auto; }
.blog-post-meta { display: flex; align-items: center; gap: .75rem; font-size: .79rem; color: var(--gray-400); margin-bottom: 1.3rem; flex-wrap: wrap; }
.blog-post-cat  { background: var(--indigo-soft); color: var(--indigo-dark); padding: .22rem .75rem; border-radius: 999px; font-weight: 700; font-size: .72rem; }
.blog-post-hero h1 { font-size: clamp(1.75rem, 4vw, 2.55rem); margin-bottom: .9rem; }
.blog-excerpt   { font-size: 1.07rem; line-height: 1.77; color: var(--gray-500); }

.blog-post-body { padding: 4rem 0 6rem; }
.blog-post-inner { max-width: 780px; margin: 0 auto; }
.blog-content h2 { font-size: 1.42rem; margin: 2.75rem 0 .85rem; letter-spacing: -.02em; }
.blog-content h3 { font-size: 1.08rem; margin: 2rem 0 .6rem; }
.blog-content p  { line-height: 1.88; margin-bottom: 1.15rem; }
.blog-content ul, .blog-content ol { margin: .6rem 0 1.5rem 1.5rem; }
.blog-content li { margin-bottom: .5rem; line-height: 1.77; }
.blog-content a  { color: var(--indigo); text-decoration: underline dotted; transition: color var(--dur-fast); }
.blog-content a:hover { color: var(--indigo-dark); text-decoration: underline; }
.blog-content strong { color: var(--gray-700); font-weight: 600; }
.blog-cta-box { background: linear-gradient(135deg, var(--indigo-soft) 0%, #fdf2f8 100%); border: 1.5px solid rgba(99,102,241,.18); border-radius: var(--radius-lg); padding: 2.25rem 2rem; margin: 3rem 0; text-align: center; }
.blog-cta-box h3 { margin-bottom: .6rem; }
.blog-cta-box p  { margin-bottom: 1.1rem; font-size: .92rem; }
.blog-related { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.blog-related h2 { font-size: 1.35rem; margin-bottom: 1.5rem; }
.blog-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.blog-related-card {
  background: var(--gray-50); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.35rem; text-decoration: none; display: block;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-spring), box-shadow var(--dur);
}
.blog-related-card:hover { border-color: var(--indigo); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.blog-related-card .blog-card-cat { display: inline-block; margin-bottom: .6rem; }
.blog-related-card h3 { font-size: .9rem; line-height: 1.38; color: var(--navy); margin-bottom: .4rem; }
.blog-related-card span { font-size: .79rem; color: var(--indigo); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   SEO CONTENT
═══════════════════════════════════════════════════════════════════ */
.seo-content-section { padding: 6rem 0; background: var(--white); border-top: 1px solid var(--border); }
.seo-content-inner   { max-width: 980px; margin: 0 auto; }
.seo-article h2 { font-size: 1.55rem; margin: 3rem 0 1rem; letter-spacing: -.02em; }
.seo-article h2:first-child { margin-top: 0; }
.seo-article p  { line-height: 1.82; margin-bottom: 1rem; }
.seo-article a  { color: var(--indigo); text-decoration: underline dotted; }
.seo-article a:hover { color: var(--indigo-dark); text-decoration: underline; }
.seo-list       { margin: .75rem 0 1.75rem 1.5rem; }
.seo-list li    { margin-bottom: .55rem; line-height: 1.77; }
.seo-list strong { color: var(--gray-700); }
.seo-grid-3     { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin: 1.75rem 0 3rem; }
.seo-card       { background: var(--gray-50); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.65rem; transition: border-color var(--dur), transform var(--dur) var(--ease-spring); }
.seo-card:hover { border-color: var(--indigo); transform: translateY(-2px); }
.seo-card h3    { font-size: .98rem; margin-bottom: .55rem; }
.seo-card p     { font-size: .86rem; line-height: 1.72; }
.seo-card a     { color: var(--indigo); }

.faq-section    { margin-top: 5rem; padding-top: 3.5rem; border-top: 1px solid var(--border); }
.faq-section h2 { margin-bottom: .65rem; }
.faq-intro      { margin-bottom: 2.5rem; }
.faq-list       { display: flex; flex-direction: column; gap: .7rem; }
.faq-item       { background: var(--gray-50); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: border-color var(--dur), box-shadow var(--dur); }
.faq-item[open] { border-color: var(--indigo); background: var(--white); box-shadow: var(--shadow-xs); }
.faq-item summary {
  padding: 1.15rem 1.5rem; font-weight: 600; color: var(--navy);
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: .93rem; font-family: 'Inter', sans-serif; user-select: none;
  transition: color var(--dur-fast);
}
.faq-item[open] summary { color: var(--indigo); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; font-weight: 300; color: var(--indigo); flex-shrink: 0; transition: transform var(--dur) var(--ease-spring); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.5rem 1.2rem; font-size: .89rem; line-height: 1.8; margin: 0; }
.faq-item a { color: var(--indigo); }

/* ═══════════════════════════════════════════════════════════════════
   ERROR PAGE
═══════════════════════════════════════════════════════════════════ */
.error-page { min-height: 65vh; display: flex; align-items: center; }

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS & SCROLL EFFECTS
═══════════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.observe-fade {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.observe-fade.in-view { opacity: 1; transform: none; }

/* Stagger — tools */
.tools-grid > .observe-fade:nth-child(1) { transition-delay: .03s; }
.tools-grid > .observe-fade:nth-child(2) { transition-delay: .09s; }
.tools-grid > .observe-fade:nth-child(3) { transition-delay: .15s; }
.tools-grid > .observe-fade:nth-child(4) { transition-delay: .21s; }
.tools-grid > .observe-fade:nth-child(5) { transition-delay: .27s; }

/* Stagger — trust */
.trust-grid > .observe-fade:nth-child(1) { transition-delay: .04s; }
.trust-grid > .observe-fade:nth-child(2) { transition-delay: .12s; }
.trust-grid > .observe-fade:nth-child(3) { transition-delay: .20s; }
.trust-grid > .observe-fade:nth-child(4) { transition-delay: .28s; }

/* Stagger — blog cards */
.blog-grid > .observe-fade:nth-child(1) { transition-delay: .04s; }
.blog-grid > .observe-fade:nth-child(2) { transition-delay: .10s; }
.blog-grid > .observe-fade:nth-child(3) { transition-delay: .16s; }
.blog-grid > .observe-fade:nth-child(4) { transition-delay: .22s; }
.blog-grid > .observe-fade:nth-child(5) { transition-delay: .28s; }

/* Stagger — steps */
.steps-grid > .observe-fade:nth-child(odd)  { transition-delay: .05s; }
.steps-grid > .observe-fade:nth-child(3)    { transition-delay: .15s; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  .hero { padding: 5rem 0 4.5rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; }
  .stat-divider { display: none; }
  .hero-stats { gap: 1.5rem; padding-top: 2rem; }

  .tool-hero { padding: 2.75rem 0 2.5rem; }
  .upload-section { padding: 2rem 0 4rem; }
  .dropzone { padding: 2.5rem 1.25rem; min-height: 180px; }
  .mode-toggle { flex-direction: column; }
  .mode-btn { min-width: unset; }

  .blog-grid { grid-template-columns: 1fr; }
  .blog-post-hero { padding: 3rem 0 2.5rem; }
  .blog-post-body { padding: 2.5rem 0 4rem; }
  .blog-post-inner { padding: 0 .25rem; }

  .contact-form-card { padding: 1.75rem; }
  .page-body { padding: 3.5rem 0 5rem; }
  .legal-section { padding: 3rem 0 5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.45rem; }
  .section-header { margin-bottom: 2.25rem; }
  .tools-section, .how-section { padding: 4rem 0; }
  .trust-section, .cta-banner  { padding: 3.5rem 0; }
  .seo-content-section         { padding: 4rem 0; }

  .container { padding: 0 1.1rem; }

  .tool-hero-badges { display: none; }   /* reduce clutter on tiny screens */
}

/* ── Touch device tap highlight ── */
@media (hover: none) {
  .tool-card:hover, .blog-card:hover,
  .step:hover, .info-card:hover,
  .principle-card:hover, .related-tool-card:hover {
    transform: none;
    box-shadow: none;
  }
  .tool-card:active  { transform: scale(.98); }
  .blog-card:active  { transform: scale(.98); }
}

/* ── Print ── */
@media print {
  .nav, .footer, .cta-banner, .hero-bg { display: none !important; }
  body { background: white; color: black; }
}

/* ═══════════════════════════════════════════════════════════════════
   FINAL POLISH ADDITIONS
   Reduced-motion · progress-spinner layout · ad slot · skip link
═══════════════════════════════════════════════════════════════════ */

/* ── Respect prefers-reduced-motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .observe-fade { opacity: 1; transform: none; }
  .hero-bg-dot  { animation: none; }
  .hero-badge-dot { animation: none; }
  .btn:hover    { transform: none !important; }
  .tool-card:hover,
  .blog-card:hover,
  .step:hover { transform: none; }
}

/* ── Progress label with inline spinner ──────────────────────── */
.progress-label {
  font-size: .87rem;
  font-weight: 500;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  line-height: 1.4;
}
/* The .progress-spinner span injected via template */
.progress-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--tool-color, var(--indigo));
  border-radius: 50%;
  animation: spin .75s linear infinite;
  flex-shrink: 0;
}

/* ── Skip to content (accessibility) ────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--navy);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* ── AdSense ad unit slot ─────────────────────────────────────── */
.ad-unit-block { margin: 2.5rem 0; min-height: 90px; text-align: center; }

/* ── Selection colour ─────────────────────────────────────────── */
::selection { background: rgba(99,102,241,.18); color: var(--navy); }

/* ── Scrollbar (Webkit) ───────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Smooth page transitions via View Transitions API ─────────── */
@supports (view-transition-name: root) {
  html { view-transition-name: root; }
  ::view-transition-old(root) { animation: fadeOut .18s var(--ease-out) both; }
  ::view-transition-new(root) { animation: fadeIn  .22s var(--ease-out) both; }
}
@keyframes fadeOut { to   { opacity: 0; } }
@keyframes fadeIn  { from { opacity: 0; } }

/* ── FAQ item smooth open/close height ───────────────────────── */
.faq-item p {
  animation: faqReveal .22s var(--ease-out) both;
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Blog card image placeholder (future proofing) ───────────── */
.blog-card-img {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--indigo-soft) 0%, var(--gray-100) 100%);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--gray-300);
}

/* ── Tool card: correct colour-mix fallback for older browsers ── */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .tool-card:hover { border-color: var(--tool-color, var(--indigo)); }
}

/* ── Consistent link underline in prose ──────────────────────── */
.content-prose a,
.legal-content a,
.blog-content a,
.seo-article a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ── Table of contents hover state ───────────────────────────── */
.legal-toc a:hover { padding-left: .3rem; transition: padding-left var(--dur-fast); }

/* ── Contact page: info sidebar spacing fix ──────────────────── */
.contact-info { padding-right: 1rem; }
@media (max-width: 760px) { .contact-info { padding-right: 0; } }

/* ── Tool hero: better vertical rhythm on small screens ──────── */
@media (max-width: 480px) {
  .tool-hero-inner > p { font-size: .97rem; }
  .tool-hero h1 { font-size: 1.75rem; }
  .upload-container { gap: 1rem; }
  .options-box { padding: 1.1rem 1.25rem; }
  .dropzone { border-radius: var(--radius-lg); padding: 2.25rem 1rem; }
}

/* ── Prevent text overflow on file names ─────────────────────── */
.file-item-name {
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* ── Hero: ensure gradient text renders in Firefox ───────────── */
@-moz-document url-prefix() {
  .gradient-text {
    background: none;
    -moz-text-fill-color: var(--indigo);
    color: var(--indigo);
  }
}

/* ── Nav dropdown: ensure correct z-index in all contexts ────── */
.nav { isolation: isolate; }

/* ── Improve tap target sizes on mobile ──────────────────────── */
@media (max-width: 900px) {
  .nav-mobile a { min-height: 44px; display: flex; align-items: center; }
  .btn-sm { min-height: 40px; }
  .file-item-del { min-width: 36px; min-height: 36px; width: 36px; height: 36px; }
  .faq-item summary { min-height: 48px; }
}

/* ── Error page: visual hierarchy fix ───────────────────────── */
.error-page .container > div { font-feature-settings: "tnum"; }

/* ── Footer: ensure brand logo visible on dark bg ─────────────── */
.footer .logo-mark { box-shadow: 0 3px 10px rgba(0,0,0,.3); }
