/* HopConvert Shared Styles
   Used by all converter pages for consistent design.
   Last updated: 2026 */

:root {
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;
  --blue-900: #1E3A8A;
  --ink-900: #0F172A;
  --ink-700: #334155;
  --ink-500: #64748B;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-50:  #F8FAFC;
  --white:   #FFFFFF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(37, 99, 235, 0.15), 0 4px 8px rgba(15, 23, 42, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink-900); }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code, pre { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.9em; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ink-200);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; color: var(--ink-900); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav > a, .nav > .nav-dropdown > .nav-trigger { color: var(--ink-700); font-weight: 500; font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; }
.nav > a:hover, .nav > .nav-dropdown > .nav-trigger:hover { color: var(--blue-600); background: var(--blue-50); text-decoration: none; }
.nav > a.nav-cta { background: var(--blue-600); color: var(--white) !important; padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.nav > a.nav-cta:hover { background: var(--blue-700); }

/* Mobile menu toggle (hamburger) */
.nav-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 8px;
  align-items: center; justify-content: center;
  color: var(--ink-700);
}
.nav-toggle:hover { background: var(--blue-50); color: var(--blue-600); }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--ink-200);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    display: none;
  }
  .nav.open { display: flex; }
  .nav > a, .nav > .nav-dropdown > .nav-trigger {
    width: 100%;
    text-align: left;
    padding: 12px 8px;
    justify-content: space-between;
  }
  .nav > a.nav-cta { margin-top: 8px; text-align: center; justify-content: center; }
  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin: 4px 0 8px;
    padding: 12px;
    box-shadow: none;
    border: 1px solid var(--ink-200);
  }
}

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-700); font-weight: 500; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav-trigger:hover { color: var(--blue-600); background: var(--blue-50); }
.nav-trigger svg.chev { width: 14px; height: 14px; transition: transform 0.2s; }
.nav-dropdown.open .nav-trigger svg.chev { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px;
  min-width: 480px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu { display: grid; }
.nav-dropdown-group h4 {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-500); margin: 0 0 10px;
}
.nav-dropdown-group a {
  display: block; padding: 8px 10px; border-radius: 6px;
  color: var(--ink-700); font-size: 0.9rem;
  margin: 0 -10px;
}
.nav-dropdown-group a:hover {
  background: var(--blue-50); color: var(--blue-700); text-decoration: none;
}
.nav-dropdown-group a.current {
  background: var(--blue-50); color: var(--blue-700); font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 40px;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; pointer-events: none;
}
.hero::before { width: 360px; height: 360px; background: var(--blue-200); top: -120px; right: -100px; }
.hero::after  { width: 280px; height: 280px; background: var(--blue-100); bottom: -80px; left: -60px; opacity: 0.7; }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-100); color: var(--blue-800);
  padding: 6px 12px; border-radius: 999px; font-size: 0.825rem; font-weight: 600;
  margin-bottom: 20px;
}
.eyebrow svg { width: 14px; height: 14px; }
.hero h1 { margin: 0 auto 16px; max-width: 800px; }
.hero h1 .accent { color: var(--blue-600); }
.hero p.lede {
  font-size: 1.125rem; color: var(--ink-700); max-width: 640px; margin: 0 auto 32px;
}

/* Converter card */
.converter {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}
.converter-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--ink-200);
  background: var(--ink-50);
}
.converter-bar-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-700); font-size: 0.9rem; }
.converter-bar-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.converter-bar-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-500); background: transparent; transition: all 0.15s;
}
.icon-btn:hover { background: var(--white); color: var(--blue-600); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 16px; height: 16px; }

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ink-200);
}
@media (max-width: 720px) { .input-row { grid-template-columns: 1fr; } }

.upload-zone {
  background: var(--white);
  padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; cursor: pointer; min-height: 220px;
  transition: background 0.15s;
}
.upload-zone:hover, .upload-zone.dragover { background: var(--blue-50); }
.upload-zone svg { width: 36px; height: 36px; color: var(--blue-500); margin-bottom: 12px; }
.upload-zone strong { color: var(--ink-900); font-weight: 600; }
.upload-zone small { color: var(--ink-500); font-size: 0.825rem; margin-top: 4px; display: block; }
.upload-zone .upload-input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.paste-zone {
  background: var(--white);
  padding: 16px;
  display: flex; flex-direction: column; min-height: 220px;
}
.paste-zone textarea {
  flex: 1; min-height: 180px; resize: vertical;
  border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  color: var(--ink-900); background: var(--ink-50);
  transition: border-color 0.15s, background 0.15s;
}
.paste-zone textarea:focus { outline: none; border-color: var(--blue-500); background: var(--white); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.paste-zone .paste-hint { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 0.8rem; color: var(--ink-500); }
.paste-zone .paste-hint button { color: var(--blue-600); font-weight: 600; }
.paste-zone .paste-hint button:hover { text-decoration: underline; }

.converter-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--ink-50); border-top: 1px solid var(--ink-200);
  flex-wrap: wrap; gap: 8px;
}
.converter-foot .meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--ink-500); flex-wrap: wrap; }
.converter-foot .meta strong { color: var(--ink-900); font-weight: 600; }
.converter-foot .actions { display: flex; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem;
  transition: all 0.15s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover { background: var(--blue-700); text-decoration: none; }
.btn-secondary { background: var(--white); color: var(--ink-700); border: 1px solid var(--ink-200); }
.btn-secondary:hover { background: var(--ink-50); text-decoration: none; }

.results {
  border-top: 1px solid var(--ink-200);
  background: var(--white);
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.results.visible { max-height: 600px; overflow: auto; }
.results table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; }
.results th { background: var(--blue-50); color: var(--blue-800); text-align: left; padding: 10px 12px; font-weight: 600; position: sticky; top: 0; border-bottom: 1px solid var(--blue-100); white-space: nowrap; }
.results td { padding: 8px 12px; border-bottom: 1px solid var(--ink-100); color: var(--ink-900); white-space: nowrap; }
.results tr:nth-child(even) td { background: var(--ink-50); }
.results tr:hover td { background: var(--blue-50); }
.results pre {
  margin: 0; padding: 16px; background: var(--ink-50); color: var(--ink-900);
  font-size: 0.8rem; line-height: 1.55; white-space: pre-wrap; word-break: break-all;
  max-height: 400px; overflow: auto;
}
.results-empty {
  padding: 32px; text-align: center; color: var(--ink-500); font-size: 0.9rem;
}

.error-msg {
  display: none; padding: 12px 16px; background: #FEF2F2; color: #991B1B;
  border-top: 1px solid #FECACA; font-size: 0.875rem; font-family: 'JetBrains Mono', monospace;
}
.error-msg.visible { display: block; }

/* Settings modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  display: none; align-items: center; justify-content: center; z-index: 300;
  padding: 20px;
}
.modal-backdrop.visible { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ink-200); }
.modal-header h3 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--ink-200); display: flex; justify-content: flex-end; gap: 8px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-700); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.field select, .field input[type=text] {
  width: 100%; padding: 8px 12px; border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink-900); font-size: 0.9rem; font-family: inherit;
}
.field select:focus, .field input[type=text]:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.field-check { display: flex; align-items: center; gap: 8px; }
.field-check input { width: 16px; height: 16px; accent-color: var(--blue-600); }
.field-check label { margin: 0; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-700); font-size: 0.9rem; }

/* Trust strip */
.trust {
  display: flex; justify-content: center; align-items: center; gap: 32px;
  flex-wrap: wrap; padding: 32px 0;
  color: var(--ink-500); font-size: 0.85rem;
  border-top: 1px solid var(--ink-200);
  border-bottom: 1px solid var(--ink-200);
  background: var(--ink-50);
}
.trust-item { display: flex; align-items: center; gap: 6px; }
.trust-item svg { width: 16px; height: 16px; color: var(--blue-500); }

/* Sections */
section { padding: 64px 0; scroll-margin-top: 80px; }
section h2 { margin-bottom: 12px; }
section .lede { color: var(--ink-700); font-size: 1.05rem; max-width: 640px; margin: 0 0 40px; }
.section-eyebrow {
  display: inline-block; color: var(--blue-600); font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}

/* Content sections: maximize text density for AdSense */
.content-block { max-width: 760px; margin: 0 auto; }
.content-block p { font-size: 1rem; line-height: 1.7; color: var(--ink-700); margin-bottom: 1.1em; }
.content-block p strong { color: var(--ink-900); }
.content-block h2 { font-size: 1.875rem; margin-top: 0.4em; }
.content-block h3 { font-size: 1.35rem; margin-top: 1.4em; color: var(--ink-900); }
.content-block ul, .content-block ol { padding-left: 1.4em; color: var(--ink-700); line-height: 1.7; }
.content-block li { margin-bottom: 0.5em; }

/* Steps */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; counter-reset: step;
}
.step {
  background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 24px; position: relative; transition: all 0.2s;
}
.step:hover { border-color: var(--blue-200); box-shadow: var(--shadow); transform: translateY(-2px); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 24px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-600); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow-sm);
}
.step h3 { margin: 8px 0 8px; font-size: 1.05rem; }
.step p { color: var(--ink-500); font-size: 0.9rem; margin: 0; line-height: 1.55; }

/* Feature grid */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.feature {
  padding: 20px; border: 1px solid var(--ink-200); border-radius: var(--radius);
  background: var(--white); transition: all 0.2s;
}
.feature:hover { border-color: var(--blue-200); box-shadow: var(--shadow); }
.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--blue-50); color: var(--blue-600);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1rem; margin: 0 0 6px; }
.feature p { color: var(--ink-500); font-size: 0.875rem; margin: 0; line-height: 1.55; }

/* Comparison */
.compare {
  border: 1px solid var(--ink-200); border-radius: var(--radius); overflow: hidden;
  background: var(--white);
}
.compare table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--ink-100); }
.compare thead th { background: var(--ink-50); color: var(--ink-700); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; color: var(--ink-900); width: 30%; }
.compare .yes { color: var(--success); font-weight: 600; }
.compare .no { color: var(--ink-500); }

/* Use cases */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.case {
  padding: 20px; background: linear-gradient(135deg, var(--blue-50), var(--white));
  border: 1px solid var(--blue-100); border-radius: var(--radius);
}
.case h3 { font-size: 1rem; color: var(--blue-800); margin: 0 0 6px; }
.case p { color: var(--ink-700); font-size: 0.875rem; margin: 0; line-height: 1.55; }

/* Guide TOC (table of contents for the guide section) */
.guide-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px;
  padding: 16px; background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius);
}
.guide-toc strong { width: 100%; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); margin-bottom: 4px; }
.guide-toc a {
  display: inline-block; padding: 6px 12px; background: var(--white);
  border: 1px solid var(--blue-200); border-radius: 999px; font-size: 0.85rem;
  color: var(--blue-700); font-weight: 500;
}
.guide-toc a:hover { background: var(--blue-600); color: var(--white); border-color: var(--blue-600); text-decoration: none; }

/* Ad slots */
.ad-slot {
  margin: 28px auto;
  max-width: 100%;
  text-align: center;
  min-height: 100px;
  display: block;
}
.ad-slot ins.adsbygoogle { display: block; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius);
  overflow: hidden; transition: all 0.15s;
}
.faq details[open] { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 600; color: var(--ink-900); font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; border-right: 2px solid var(--blue-600);
  border-bottom: 2px solid var(--blue-600); transform: rotate(45deg);
  transition: transform 0.2s; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { background: var(--ink-50); }
.faq .answer { padding: 0 22px 18px; color: var(--ink-700); line-height: 1.65; font-size: 0.95rem; }

/* CTA */
.cta-band {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: var(--white); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; margin: 24px 0;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: var(--blue-100); margin-bottom: 20px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { background: var(--white); color: var(--blue-700); }
.cta-band .btn-primary:hover { background: var(--blue-50); }
.cta-band .btn-secondary { background: transparent; color: var(--white); border-color: var(--blue-400); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* Footer */
.site-footer {
  background: var(--ink-900); color: var(--ink-300);
  padding: 48px 0 24px; margin-top: 64px;
}
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--ink-300); font-size: 0.9rem; }
.footer-col a:hover { color: var(--blue-400); text-decoration: none; }
.footer-brand p { color: var(--ink-300); font-size: 0.875rem; margin-top: 12px; line-height: 1.55; max-width: 320px; }
.footer-bottom { border-top: 1px solid #1E293B; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--ink-500); }

/* Responsive */
@media (max-width: 720px) {
  section { padding: 48px 0; }
  .hero { padding: 40px 0 24px; }
  .converter-foot { flex-direction: column; align-items: stretch; }
  .converter-foot .actions { width: 100%; }
  .converter-foot .actions .btn { flex: 1; justify-content: center; }
  .nav-dropdown-menu { min-width: 320px; grid-template-columns: 1fr; }
}

/* Skip link */
.skip-link {
  position: absolute; top: -40px; left: 0; background: var(--blue-600); color: var(--white);
  padding: 8px 16px; z-index: 1000;
}
.skip-link:focus { top: 0; }
