/* ================================================================
   BATCHWORK — STYLE.CSS
   Dark industrial theme · Amber/gold accent · Mobile-first
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  --bg:          #0d0e11;
  --bg2:         #13151a;
  --bg3:         #1a1d24;
  --border:      #252830;
  --border-hi:   #323640;
  --text:        #e8eaf0;
  --text-muted:  #7a7f8e;
  --text-dim:    #4a4f5e;

  --gold:        #f5a623;
  --gold-dim:    #c87d10;
  --gold-glow:   rgba(245, 166, 35, 0.15);
  --gold-text:   #ffc155;

  --green:       #22c55e;
  --red:         #ef4444;
  --blue:        #3b82f6;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 0 24px rgba(245, 166, 35, 0.2);

  --nav-h:       64px;
  --container:   1200px;
  --font-mono:   'Space Mono', monospace;
  --font-sans:   'DM Sans', sans-serif;

  --transition:  0.2s ease;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-text); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
small { font-size: 0.8rem; color: var(--text-dim); }

/* ── Container ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }
@media (min-width: 1200px) { .container { padding: 0 40px; } }

/* ================================================================
   NAVIGATION
   ================================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(13, 14, 17, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo img {
  height: 36px;
  width: auto;
}
.nav__logo-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav__logo-text span { color: var(--gold); }

/* Desktop nav links */
.nav__links {
  display: none;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
@media (min-width: 768px) {
  .nav__links { display: flex; }
}
.nav__links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav__links a:hover, .nav__links a.active {
  color: var(--text);
  background: var(--bg3);
}

/* Nav actions */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav__badge {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 20px;
  padding: 4px 10px;
}
@media (min-width: 480px) { .nav__badge { display: flex; } }
.nav__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

/* Hamburger */
.nav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  transition: all var(--transition);
}
@media (min-width: 768px) { .nav__burger { display: none; } }
.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav__burger:hover { border-color: var(--gold); background: var(--bg2); }
.nav__burger:hover span { background: var(--gold); }

/* Burger open state */
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  padding: 24px 20px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 8px;
}
.nav__mobile.is-open { display: flex; }
.nav__mobile a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.nav__mobile a:hover, .nav__mobile a.active {
  color: var(--text);
  background: var(--bg3);
  border-color: var(--border);
}
.nav__mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.nav__mobile-cta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gold);
  color: #0d0e11;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-text);
  border-color: var(--gold-text);
  color: #0d0e11;
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-hi);
}
.btn-outline:hover {
  color: var(--text);
  border-color: var(--text-dim);
  background: var(--bg3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--bg3); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
  padding: 72px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(245,166,35,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero__sub {
  max-width: 540px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: center;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.hero__stat-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}
.hero__stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ================================================================
   SECTION HEADERS
   ================================================================ */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { max-width: 520px; margin: 0 auto; }

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

/* ================================================================
   TOOLS GRID
   ================================================================ */
.tools-section { padding: 72px 0; }

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 480px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-glow), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}
.tool-card:hover {
  border-color: rgba(245,166,35,0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--shadow-gold);
}
.tool-card:hover::after { opacity: 1; }
.tool-card:hover .tool-card__title { color: var(--gold-text); }

.tool-card__icon {
  width: 48px;
  height: 48px;
  background: var(--bg3);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.tool-card__title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  transition: color var(--transition);
}
.tool-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  position: relative;
  z-index: 1;
  flex: 1;
}
.tool-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}
.tool-card__tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}
.tool-card--pro .tool-card__icon { border-color: rgba(245,166,35,0.3); }
.tool-card__pro-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d0e11;
  background: var(--gold);
  border-radius: 4px;
  padding: 3px 7px;
  z-index: 2;
}

/* ================================================================
   TOOL PAGE (upload zone, result area)
   ================================================================ */
.tool-page { padding: 48px 0 80px; }
.tool-page__header { margin-bottom: 40px; }
.tool-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color var(--transition);
}
.tool-page__back:hover { color: var(--gold); }
.tool-page__title { margin-bottom: 10px; }
.tool-page__desc { font-size: 0.95rem; }

.tool-page__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) {
  .tool-page__layout {
    grid-template-columns: 1fr 360px;
    align-items: start;
  }
}

/* Upload zone */
.upload-zone {
  background: var(--bg2);
  border: 2px dashed var(--border-hi);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: var(--bg3);
}
.upload-zone.dragover { box-shadow: 0 0 0 4px var(--gold-glow); }
.upload-zone__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}
.upload-zone__title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.upload-zone__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.upload-zone__input { display: none; }
.upload-zone__limits {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 12px;
}
.upload-zone.has-file {
  border-style: solid;
  border-color: rgba(34,197,94,0.4);
  background: rgba(34,197,94,0.03);
}

/* Options panel */
.options-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.options-panel__title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Form elements */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7f8e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-select option { background: var(--bg3); color: var(--text); }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* Range slider */
.form-range {
  width: 100%;
  height: 4px;
  background: var(--border-hi);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}
.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg);
}
.form-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg);
}

/* Checkbox / Toggle */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}
.form-check-label { font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }

/* Progress / Result */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 16px 0;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.result-box {
  background: var(--bg2);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
}
.result-box__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.result-box__icon { font-size: 1.2rem; }
.result-box__title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.result-box__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Flash messages */
.flash-messages { padding: 0 0 16px; }
.flash {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 10px;
  border: 1px solid;
}
.flash-success { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.3); color: #86efac; }
.flash-error   { background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.flash-info    { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.3); color: #93c5fd; }
.flash-warning { background: rgba(245,166,35,0.08); border-color: rgba(245,166,35,0.3); color: var(--gold-text); }
.flash-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.flash-dismiss:hover { opacity: 1; }

/* ================================================================
   PRICING
   ================================================================ */
.pricing-section { padding: 80px 0; }

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}
.pricing-toggle__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.pricing-toggle__switch {
  position: relative;
  width: 48px;
  height: 26px;
}
.pricing-toggle__switch input { opacity: 0; width: 0; height: 0; }
.pricing-toggle__track {
  position: absolute;
  inset: 0;
  background: var(--border-hi);
  border-radius: 26px;
  cursor: pointer;
  transition: background var(--transition);
}
.pricing-toggle__track::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}
.pricing-toggle__switch input:checked + .pricing-toggle__track { background: var(--gold); }
.pricing-toggle__switch input:checked + .pricing-toggle__track::before {
  transform: translateX(22px);
  background: #0d0e11;
}
.pricing-toggle__save {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 20px;
  padding: 3px 10px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

.pricing-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  transition: all var(--transition);
}
.pricing-card--featured {
  border-color: rgba(245,166,35,0.5);
  background: linear-gradient(160deg, rgba(245,166,35,0.05), var(--bg2));
}
.pricing-card--featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: #0d0e11;
  background: var(--gold);
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 700;
}

.pricing-card__name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.pricing-card__price {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 6px;
}
.pricing-card__amount {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pricing-card__period {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-bottom: 4px;
}
.pricing-card__desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.pricing-card__feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pricing-card__feature-icon { flex-shrink: 0; color: var(--green); font-size: 0.9rem; margin-top: 1px; }
.pricing-card__feature--muted .pricing-card__feature-icon { color: var(--text-dim); }
.pricing-card__feature--muted { opacity: 0.5; }

/* ================================================================
   AUTH PAGES (login, signup)
   ================================================================ */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}
.auth-card__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  text-decoration: none;
}
.auth-card__logo img { height: 32px; }
.auth-card__logo-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.auth-card h2 { margin-bottom: 8px; font-size: 1.5rem; }
.auth-card > p { margin-bottom: 28px; font-size: 0.88rem; }

.auth-card__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
}
.auth-card__divider::before,
.auth-card__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-card__divider span { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }

.auth-card__footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.auth-card__footer a { color: var(--gold); }

/* OAuth button */
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  background: var(--bg3);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-oauth:hover { border-color: var(--gold); background: var(--bg2); color: var(--text); }
.btn-oauth img { width: 18px; height: 18px; }

/* ================================================================
   SEO / CONTENT PAGES
   ================================================================ */
.content-page { padding: 56px 0 80px; }
.content-page__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) {
  .content-page__layout {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}

.content-body { max-width: 720px; }
.content-body h1 { margin-bottom: 16px; }
.content-body h2 { font-size: 1.3rem; margin: 40px 0 14px; }
.content-body h3 { font-size: 1rem; margin: 28px 0 10px; }
.content-body p { margin-bottom: 16px; }
.content-body ul, .content-body ol { margin: 0 0 16px 20px; }
.content-body li { color: var(--text-muted); margin-bottom: 6px; }
.content-body strong { color: var(--text); }
.content-body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--gold-text);
}

.content-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }
.sidebar-widget {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-widget__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.sidebar-widget__list { display: flex; flex-direction: column; gap: 8px; }
.sidebar-widget__list a {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.sidebar-widget__list a:hover { color: var(--gold); background: var(--bg3); }

/* CTA box in content */
.content-cta {
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin: 40px 0;
}
.content-cta h3 { margin-bottom: 10px; font-size: 1.1rem; }
.content-cta p { font-size: 0.85rem; margin-bottom: 20px; }

/* ================================================================
   USAGE / QUOTA INDICATORS
   ================================================================ */
.quota-bar {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.quota-bar__info { flex: 1; }
.quota-bar__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.quota-bar__track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.quota-bar__fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.quota-bar__fill--warn { background: var(--red); }
.quota-bar__count {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

/* Pro badge inline */
.badge-pro {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d0e11;
  background: var(--gold);
  border-radius: 4px;
  padding: 2px 7px;
  vertical-align: middle;
}
.badge-free {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  vertical-align: middle;
}

/* ================================================================
   ACCOUNT / DASHBOARD
   ================================================================ */
.account-page { padding: 48px 0 80px; }
.account-page__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) {
  .account-page__layout {
    grid-template-columns: 240px 1fr;
    align-items: start;
  }
}

.account-nav {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: row;
  gap: 4px;
  overflow-x: auto;
}
@media (min-width: 900px) {
  .account-nav { flex-direction: column; position: sticky; top: calc(var(--nav-h) + 20px); }
}
.account-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition);
  text-decoration: none;
}
.account-nav a:hover, .account-nav a.active {
  color: var(--text);
  background: var(--bg3);
}
.account-nav a.active { color: var(--gold); }

.account-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.account-section__header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}
.account-section__header h3 { margin-bottom: 4px; font-size: 1rem; }
.account-section__header p { font-size: 0.82rem; }
.account-section__body { padding: 28px; }
.account-section + .account-section { margin-top: 16px; }

/* ================================================================
   TABLE
   ================================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 480px;
}
th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--bg3); }

/* ================================================================
   404 PAGE
   ================================================================ */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - 200px);
  text-align: center;
  padding: 60px 20px;
}
.page-404__code {
  font-family: var(--font-mono);
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 700;
  color: var(--border-hi);
  line-height: 1;
  margin-bottom: 24px;
  user-select: none;
}
.page-404__code span { color: var(--gold); }
.page-404 h2 { margin-bottom: 12px; }
.page-404 p { margin-bottom: 32px; }

/* ================================================================
   FEATURES GRID (homepage)
   ================================================================ */
.features-section { padding: 72px 0; background: var(--bg2); }
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-item {
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.feature-item__icon {
  font-size: 1.75rem;
  margin-bottom: 16px;
  display: block;
}
.feature-item h4 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.feature-item p { font-size: 0.82rem; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: auto;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
@media (min-width: 640px) {
  .footer__inner { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer__brand { max-width: 260px; }
.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  text-decoration: none;
}
.footer__brand-logo img { height: 28px; }
.footer__brand-logo span {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.footer__brand p { font-size: 0.8rem; line-height: 1.6; }

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color var(--transition);
  text-decoration: none;
}
.footer__links a:hover { color: var(--gold); }

.footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer__bottom p {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.footer__bottom-links { display: flex; gap: 16px; }
.footer__bottom-links a {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color var(--transition);
}
.footer__bottom-links a:hover { color: var(--gold); }

/* ================================================================
   UTILITIES
   ================================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 32px 0; }

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ================================================================
   MOBILE NAV JS HOOK
   ================================================================ */
/* JS: add .is-open to .nav__mobile and .nav__burger when hamburger clicked */
/* JS: close on overlay click / ESC */

/* ================================================================
   SELECTION
   ================================================================ */
::selection { background: var(--gold-glow); color: var(--gold-text); }

/* ── Legacy class aliases ── */
.hero { padding: 64px 20px 48px; text-align: center; }
.hero-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); background: var(--gold-glow); border: 1px solid rgba(245,166,35,0.25); border-radius: 20px; padding: 5px 14px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 16px; }
.hero p { max-width: 560px; margin: 0 auto 40px; font-size: 1.05rem; color: var(--text-muted); }
.hero-stats { display: flex; gap: 40px; justify-content: center; border-top: 1px solid var(--border); padding-top: 40px; flex-wrap: wrap; }
.hero-stat-num { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--text); }
.hero-stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; max-width: 1200px; margin: 48px auto; padding: 0 24px 80px; }
.tool-card { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; text-decoration: none; transition: all var(--transition); position: relative; overflow: hidden; }
.tool-card:hover { border-color: rgba(245,166,35,0.4); transform: translateY(-2px); box-shadow: var(--shadow), var(--shadow-gold); }
.tool-icon { font-size: 2rem; margin-bottom: 16px; }
.tool-card h3 { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.tool-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; flex: 1; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tool-actions span { font-size: 0.72rem; font-family: var(--font-mono); color: var(--gold); background: var(--gold-glow); border: 1px solid rgba(245,166,35,0.2); border-radius: 4px; padding: 3px 8px; }

/* ================================================================
   HOMEPAGE OVERRIDES
   ================================================================ */

/* Hero two-column layout */
.hero {
  padding: 64px 0 0;
  text-align: left;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { display: none; }
  .hero { text-align: center; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
}

.hero-left { display: flex; flex-direction: column; gap: 0; }
.hero-tag {
  display: inline-flex;
  width: fit-content;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f5a623;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Space Mono', monospace;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: #e8eaf0;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.05rem;
  color: #7a7f8e;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 460px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}
.btn-primary-hero {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  background: #f5a623;
  color: #0d0e11;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-primary-hero:hover {
  background: #ffc155;
  color: #0d0e11;
  box-shadow: 0 0 24px rgba(245,166,35,0.3);
}

/* Stats row — inline with hero */
.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid #252830;
  flex-wrap: wrap;
}
.hero-stat-num {
  font-family: 'Space Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: #e8eaf0;
  display: block;
}
.hero-stat-label {
  font-size: 0.75rem;
  color: #4a4f5e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Demo card */
.hero-right { display: flex; align-items: center; justify-content: center; }
.hero-demo { width: 100%; max-width: 380px; }
.demo-card {
  background: #13151a;
  border: 1px solid #252830;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}
.demo-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid #252830;
  background: #0d0e11;
}
.demo-dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-dot.red    { background: #ef4444; }
.demo-dot.yellow { background: #f5a623; }
.demo-dot.green  { background: #22c55e; }
.demo-title {
  margin-left: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: #4a4f5e;
}
.demo-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.demo-file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a1d24;
  border: 1px solid #252830;
  border-radius: 8px;
  padding: 14px 16px;
}
.demo-file.done { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.04); }
.demo-icon { font-size: 1.4rem; flex-shrink: 0; }
.demo-file-info { display: flex; flex-direction: column; gap: 3px; }
.demo-filename { font-family: 'Space Mono', monospace; font-size: 0.8rem; color: #e8eaf0; }
.demo-filesize { font-size: 0.75rem; color: #4a4f5e; }
.demo-green { color: #22c55e !important; }
.demo-arrow { text-align: center; font-size: 1.2rem; color: #4a4f5e; }

/* Tools section */
.tools-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 80px;
}
.tools-section-header {
  margin-bottom: 40px;
}
.tools-section-label {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f5a623;
  margin-bottom: 10px;
}
.tools-section-header h2 {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #e8eaf0;
}

/* Tool grid — 3 cols max */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
@media (max-width: 700px) {
  .tools-grid { grid-template-columns: 1fr; }
}

/* Tool card — left border accent on hover */
.tool-card {
  display: flex;
  flex-direction: column;
  background: #13151a;
  border: 1px solid #252830;
  border-left: 3px solid #252830;
  border-radius: 12px;
  padding: 28px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.tool-card:hover {
  border-color: #252830;
  border-left-color: #f5a623;
  background: #1a1d24;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.tool-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}
.tool-card h3 {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e8eaf0;
  margin-bottom: 10px;
}
.tool-card p {
  font-size: 0.83rem;
  color: #7a7f8e;
  line-height: 1.55;
  flex: 1;
  margin: 0;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.tool-actions span {
  font-size: 0.7rem;
  font-family: 'Space Mono', monospace;
  color: #f5a623;
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.18);
  border-radius: 4px;
  padding: 3px 8px;
}
.nav__logo img { height: 80px; width: auto; }
.nav__badge--pro { background: rgba(245,166,35,0.2); border-color: rgba(245,166,35,0.5); color: #ffc155; }
