/**
 * Bytario consumer site — premium design system v2.
 *
 * Design language: Linear / Vercel / Resend aesthetic.
 *   - Animated aurora glows + perspective grid in hero
 *   - Specular border highlights on cards
 *   - Bento-grid "Why" section
 *   - Universal border-gray-200 (#e5e7eb) on all elements
 *   - Pure CSS — no JS animation libs
 */

:root {
  --bg: #07090c;
  --bg-elev: #0d1117;
  --bg-elev-2: #131a22;
  --bg-glow: rgba(79, 158, 255, 0.06);

  --fg: #f0f3f7;
  --fg-2: #c1c7d0;
  --muted: #9ca3af;
  --subtle: #424a53;

  --accent: #4f9eff;
  --accent-bright: #79b8ff;
  --accent-fg: #ffffff;
  --accent-glow: rgba(79, 158, 255, 0.4);

  /* border-gray-200 universally */
  --border: #e5e7eb;
  --border-strong: #e5e7eb;
  --success: #3fb950;
  --error: #f85149;

  --max-width: 1080px;
  --max-content: 720px;
  --radius: 10px;
  --radius-lg: 14px;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-elev: #f7f9fc;
    --bg-elev-2: #eff2f7;
    --bg-glow: rgba(10, 102, 194, 0.04);
    --fg: #0d1117;
    --fg-2: #1f262e;
    --muted: #57606a;
    --subtle: #afb8c1;
    --accent: #0a66c2;
    --accent-bright: #1f7ad9;
    --accent-fg: #ffffff;
    --accent-glow: rgba(10, 102, 194, 0.25);
    --border: #e5e7eb;
    --border-strong: #e5e7eb;
    --success: #1a7f37;
    --error: #cf222e;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════════════ */

nav.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 12, 0.75);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: light) {
  nav.top { background: rgba(255, 255, 255, 0.75); }
}

nav.top .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav.top .brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav.top .brand::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  box-shadow: 0 0 12px var(--accent-glow);
}

nav.top .links a {
  margin-left: 1.5rem;
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 500;
}
nav.top .links a:hover {
  color: var(--accent-bright);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════ */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 4rem;
  flex: 1;
  width: 100%;
}

main.tool {
  max-width: var(--max-content);
  padding: 3rem 1.5rem 4rem;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

main.tool h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  margin-bottom: 0.5rem;
}

main.tool > header {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

main.tool .form {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: var(--bg-elev);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 4rem 0 1.25rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--fg-2);
}

.tagline {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  margin-bottom: 2.5rem;
  max-width: 640px;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  color: var(--accent-bright);
  text-decoration: underline;
}

.gradient-text {
  background: linear-gradient(135deg, var(--fg) 0%, var(--accent-bright) 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.6rem;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  text-decoration: none;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

button:hover, .button:hover {
  background: #ffffff;
  color: #07090c;
  border-color: #ffffff;
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(255, 255, 255, 0.2);
  filter: none;
}

button:active, .button:active { transform: translateY(0); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.button.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: none;
}
.button.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: none;
}

.cta-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 2rem 0 4rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

input[type='text'], input[type='number'], input[type='url'],
input[type='color'], select, textarea {
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  font-size: 0.98rem;
  font-family: inherit;
  width: 100%;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type='text']:focus, input[type='number']:focus, input[type='url']:focus,
input[type='color']:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: vertical;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.field { margin-bottom: 1.25rem; }

/* ═══════════════════════════════════════════════════════════════════════
   PRIVACY CALLOUT
   ═══════════════════════════════════════════════════════════════════════ */

.privacy-note {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.08), rgba(63, 185, 80, 0.02));
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  color: var(--fg-2);
}

.privacy-note strong {
  color: var(--success);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
   DROP ZONE
   ═══════════════════════════════════════════════════════════════════════ */

.bytario-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: 3rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bytario-drop-zone:hover, .bytario-drop-zone:focus {
  border-color: var(--accent);
  background: var(--bg-elev-2);
  outline: none;
}

.bytario-drop-zone.is-dragover {
  border-color: var(--accent);
  background: rgba(79, 158, 255, 0.06);
  transform: scale(1.01);
}

.bytario-drop-zone.is-busy { cursor: progress; opacity: 0.6; }

.bytario-drop-zone__label {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO — aurora blobs + perspective line grid + floating particles
   ═══════════════════════════════════════════════════════════════════════ */

.hero {
  text-align: center;
  padding: 7rem 2rem 3.5rem;
  position: relative;
  /* full-bleed: break out of the max-width container */
  margin: -4rem calc(-50vw + 50%) 0;
  width: 100vw;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

/* ── Layer 1: Aurora blobs ── */
.hero::before {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle 400px at 30% 30%, rgba(79, 158, 255, 0.25), transparent 60%),
    radial-gradient(circle 350px at 70% 50%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(circle 300px at 50% 80%, rgba(14, 165, 233, 0.15), transparent 60%),
    radial-gradient(circle 250px at 80% 20%, rgba(79, 158, 255, 0.12), transparent 60%);
  animation: aurora 16s ease-in-out infinite alternate;
  filter: blur(60px);
  z-index: 0;
}

/* ── Layer 2: Perspective line grid ── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  /* horizontal + vertical lines forming a grid */
  background-image:
    linear-gradient(rgba(79, 158, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 158, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  /* perspective warp — gives depth */
  transform: perspective(500px) rotateX(35deg) scale(2.5);
  transform-origin: center top;
  /* fade out at edges */
  mask-image:
    linear-gradient(to bottom, transparent 5%, black 30%, black 50%, transparent 95%),
    linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 5%, black 30%, black 50%, transparent 95%),
    linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  animation: grid-scroll 20s linear infinite;
  z-index: 0;
}

@keyframes aurora {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%  { transform: translate(30px, -20px) rotate(2deg) scale(1.05); }
  66%  { transform: translate(-20px, 15px) rotate(-1deg) scale(0.98); }
  100% { transform: translate(10px, -10px) rotate(1deg) scale(1.02); }
}

@keyframes grid-scroll {
  from { background-position: 0 0; }
  to   { background-position: 0 48px; }
}

@media (prefers-color-scheme: light) {
  .hero::before {
    background:
      radial-gradient(circle 400px at 30% 30%, rgba(10, 102, 194, 0.12), transparent 60%),
      radial-gradient(circle 350px at 70% 50%, rgba(139, 92, 246, 0.08), transparent 60%),
      radial-gradient(circle 300px at 50% 80%, rgba(14, 165, 233, 0.08), transparent 60%);
  }
  .hero::after {
    background-image:
      linear-gradient(rgba(10, 102, 194, 0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(10, 102, 194, 0.06) 1px, transparent 1px);
  }
}

/* Content sits above the layers */
.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 auto 1.25rem;
  max-width: 18ch;
}

.hero .tagline {
  margin: 0 auto 2.5rem;
  text-align: center;
  max-width: 38rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(13, 17, 23, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
@media (prefers-color-scheme: light) {
  .hero-eyebrow { background: rgba(255, 255, 255, 0.5); }
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px var(--success); }
  50%      { box-shadow: 0 0 12px var(--success), 0 0 24px rgba(63, 185, 80, 0.3); }
}

/* ═══════════════════════════════════════════════════════════════════════
   STAT CARDS — below hero, above bento
   ═══════════════════════════════════════════════════════════════════════ */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 3rem 0 0;
}

.stat-card {
  text-align: center;
  padding: 1.75rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

/* Subtle top-edge glow */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .stat-cards { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════
   SECTION EYEBROWS — gradient accent line instead of plain divider
   ═══════════════════════════════════════════════════════════════════════ */

.tool-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  position: relative;
}

/* Gradient accent line above each section */
.tool-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--border) 15%,
    var(--accent) 50%,
    var(--border) 85%,
    transparent 100%
  );
}

.tool-section:first-of-type::before {
  display: none;
}

.tool-section .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffffff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Category-colored dot before each section label */
.tool-section .eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tool-section:nth-of-type(1) .eyebrow::before { background: #60a5fa; box-shadow: 0 0 8px rgba(96,165,250,0.5); }
.tool-section:nth-of-type(2) .eyebrow::before { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,0.5); }
.tool-section:nth-of-type(3) .eyebrow::before { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,0.5); }
.tool-section:nth-of-type(4) .eyebrow::before { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,0.5); }
.tool-section:nth-of-type(5) .eyebrow::before { background: #a78bfa; box-shadow: 0 0 8px rgba(167,139,250,0.5); }
.tool-section:nth-of-type(6) .eyebrow::before { background: #fb923c; box-shadow: 0 0 8px rgba(251,146,60,0.5); }

.tool-section .eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent 80%);
}

/* ═══════════════════════════════════════════════════════════════════════
   TOOL CARDS — specular border highlight + inner glow
   ═══════════════════════════════════════════════════════════════════════ */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  color: var(--fg);
  text-decoration: none;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Specular highlight — bright line that sweeps across the top border on hover */
.tool-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

/* Inner ambient glow */
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% -20%, rgba(79, 158, 255, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  border-radius: inherit;
}

.tool-card:hover {
  border-color: rgba(79, 158, 255, 0.4);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow:
    0 4px 16px -4px rgba(79, 158, 255, 0.15),
    0 12px 32px -8px rgba(0, 0, 0, 0.3);
}

.tool-card:hover::before { left: 100%; }
.tool-card:hover::after { opacity: 1; }

.tool-card strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 1;
}

.tool-card span {
  display: block;
  font-size: 0.82rem;
  color: #9ca3af;
  position: relative;
  z-index: 1;
}

/* Category accent — colored left border per tool family */
.tool-section:nth-of-type(1) .tool-card { border-left: 3px solid #60a5fa; }  /* Image — blue */
.tool-section:nth-of-type(2) .tool-card { border-left: 3px solid #f87171; }  /* PDF — red */
.tool-section:nth-of-type(3) .tool-card { border-left: 3px solid #34d399; }  /* QR/Barcode — green */
.tool-section:nth-of-type(4) .tool-card { border-left: 3px solid #fbbf24; }  /* Data — amber */
.tool-section:nth-of-type(5) .tool-card { border-left: 3px solid #a78bfa; }  /* File/Text — purple */
.tool-section:nth-of-type(6) .tool-card { border-left: 3px solid #fb923c; }  /* Color — orange */

/* ═══════════════════════════════════════════════════════════════════════
   RESULT BLOCK
   ═══════════════════════════════════════════════════════════════════════ */

.result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.result.is-error { border-color: var(--error); color: var(--error); }

.result img, .result svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  background: #ffffff;
  border-radius: var(--radius);
  padding: 1rem;
}

.result pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg);
  padding: 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--fg-2);
  margin: 0;
}

/* ─── Metadata table (image-read-metadata) ────────────────────────── */
.meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.meta-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.meta-table tr:last-child td { border-bottom: none; }
.meta-label {
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  width: 140px;
}
.meta-table td:last-child {
  color: var(--fg-2);
  word-break: break-word;
}
.meta-empty {
  color: var(--fg-2);
  font-style: italic;
  padding: 1rem 0;
}
.raw-toggle {
  margin-top: 0.75rem;
}
.raw-toggle summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.85rem;
  padding: 0.35rem 0;
  user-select: none;
}
.raw-toggle summary:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════
   "WHY" SECTION — bento feature grid
   ═══════════════════════════════════════════════════════════════════════ */

.why-section {
  margin-top: 5rem;
  padding-top: 3rem;
  position: relative;
}

/* Gradient divider above the section */
.why-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--accent) 30%,
    var(--accent-bright) 50%,
    var(--accent) 70%,
    transparent
  );
}

.why-section h2 {
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 2rem;
}

.why-section > p {
  text-align: center;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.bento-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.bento-card:hover {
  border-color: rgba(79, 158, 255, 0.3);
  box-shadow: 0 4px 20px -6px rgba(79, 158, 255, 0.12);
}

/* Accent glow on the wide cards */
.bento-card.wide {
  grid-column: span 2;
}

.bento-card.full {
  grid-column: span 3;
}

.bento-card .bento-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 158, 255, 0.15), rgba(139, 92, 246, 0.1));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-bright);
}

.bento-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.bento-card p {
  color: #d1d5db;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════
   LONG-FORM (tool pages — how-it-works / FAQ)
   ═══════════════════════════════════════════════════════════════════════ */

.how-it-works, .faq {
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  background: var(--bg-elev);
}

.how-it-works p, .faq p {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 60ch;
}

.faq h3 {
  margin-top: 1.75rem;
  font-size: 1rem;
  color: var(--fg);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.faq h3:first-of-type { border-top: none; padding-top: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}

footer nav { margin-bottom: 0.75rem; }
footer nav a { margin: 0 0.65rem; color: var(--fg); font-weight: 500; }
footer nav a:hover { color: var(--accent-bright); }

main.tool footer {
  border-top: none;
  padding: 1.5rem 0 0;
  text-align: left;
  margin-top: 3rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  main { padding: 2.5rem 1.25rem; }
  main.tool { padding: 2rem 1.25rem 2.5rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.wide, .bento-card.full { grid-column: span 1; }
  .hero { padding: 3rem 1.25rem 2rem; }
  nav.top .links a { margin-left: 1rem; font-size: 0.85rem; }
}

@media (max-width: 900px) and (min-width: 641px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card.full { grid-column: span 2; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PROSE (legal pages)
   ═══════════════════════════════════════════════════════════════════════ */

main.prose {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  color: var(--fg-2);
  font-size: 0.95rem;
  line-height: 1.7;
}
main.prose h1 { font-size: 2rem; margin-bottom: 0.5rem; }
main.prose h2 {
  font-size: 1.2rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--fg);
}
main.prose p, main.prose ul { margin: 0.75rem 0; }
main.prose ul { padding-left: 1.25rem; }
main.prose li { margin: 0.35rem 0; }
main.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
main.prose em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   PROGRESS STEPPER — step-by-step status during tool processing
   ═══════════════════════════════════════════════════════════════════════ */

.bytario-progress {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bytario-progress__step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--subtle);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.bytario-progress__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--subtle);
  background: transparent;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.bytario-progress__step.is-active {
  color: var(--accent-bright);
}

.bytario-progress__step.is-active .bytario-progress__dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: progress-pulse 1.2s ease-in-out infinite;
}

.bytario-progress__step.is-done {
  color: var(--success);
}

.bytario-progress__step.is-done .bytario-progress__dot {
  border-color: var(--success);
  background: var(--success);
  box-shadow: none;
  animation: none;
}

@keyframes progress-pulse {
  0%, 100% { box-shadow: 0 0 4px var(--accent-glow); }
  50%      { box-shadow: 0 0 12px var(--accent-glow), 0 0 20px rgba(79, 158, 255, 0.15); }
}

/* Button processing state */
button.is-processing {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

button.is-processing::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
