﻿/* ---------- Tokens ---------- */
:root {
  --brand-blue: #123AF8;
  --brand-blue-hover: #0E2DC9;
  --brand-blue-tint: #E8EEFE;
  --brand-dark: #0E161E;
  --brand-light: #ECF1F9;
  --brand-white: #FFFFFF;
  --brand-mint: #C4FFC4;
  --brand-forest: #0D2810;
  --brand-green: #2ACC99;
  --brand-pink: #DD004F;
  --brand-navy: #131054;

  --warn: #F59E0B;

  --neutral-300: #D6DEE8;
  --neutral-500: #6B7785;
  --neutral-700: #2F3A48;

  --font-sans: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-input: 8px;
  --radius-card: 12px;

  --t-fast: 150ms ease-in-out;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--brand-dark);
  background: var(--brand-white);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

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

/* ---------- Layout primitives ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
section.section {
  padding: 96px 0;
}
@media (max-width: 768px) {
  section.section { padding: 64px 0; }
}

/* Reusable eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0 0 16px;
}

h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; color: var(--brand-dark); margin: 0; }
h1 { font-size: 52px; line-height: 1.1; }
h2 { font-size: 36px; line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.3; }
@media (max-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
}

p { margin: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand-white);
  border-bottom: 1px solid var(--neutral-300);
}
.nav--open { border-bottom-color: transparent; }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 72px;
}
.nav__logo {
  display: flex;
  align-items: center;
}
.nav__logo:hover { text-decoration: none; }
.nav__logo img {
  display: block;
  height: 28px;
  width: auto;
}
@media (max-width: 768px) {
  .nav__logo img { height: 24px; }
}
.nav__items {
  display: flex;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav__items a {
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
  transition: color var(--t-fast);
}
.nav__items a:hover { color: var(--brand-blue); text-decoration: none; }
.nav__actions { display: flex; align-items: center; gap: 20px; }
.nav__signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
}
.nav__hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-input);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--brand-dark);
}
@media (max-width: 960px) {
  .nav__items, .nav__signin { display: none; }
  .nav__hamburger { display: inline-flex; }
}
.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: 72px;
  background: rgba(14, 22, 30, 0.4);
  z-index: 49;
}
.nav--open .nav__overlay { display: block; }
.nav__mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 51;
  background: var(--brand-white);
  border-bottom: 1px solid var(--neutral-300);
  box-shadow: 0 12px 32px rgba(14, 22, 30, 0.1);
  padding: 24px;
}
.nav--open .nav__mobile { display: block; }
.nav__mobile-items {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav__mobile-items a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--neutral-700);
}
.nav__mobile-items a:hover { color: var(--brand-blue); text-decoration: none; }
.nav__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-300);
}
.nav__mobile-actions .btn { justify-content: center; }
@media (min-width: 961px) {
  .nav__overlay, .nav__mobile { display: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--radius-input);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
  text-decoration: none;
}
.btn--primary {
  background: var(--brand-blue);
  color: var(--brand-white);
}
.btn--primary:hover { background: var(--brand-blue-hover); text-decoration: none; }
.btn--primary:disabled {
  background: var(--neutral-300);
  color: var(--neutral-500);
  cursor: not-allowed;
}
.btn--invert {
  background: var(--brand-white);
  color: var(--brand-blue);
}
.btn--invert:hover { background: var(--brand-light); text-decoration: none; }
.btn--ghost {
  background: transparent;
  color: var(--brand-white);
  border-color: var(--brand-white);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.btn--text {
  background: transparent;
  color: var(--neutral-500);
  padding: 8px 0;
  font-weight: 500;
  border: none;
}
.btn--text:hover { color: var(--brand-dark); text-decoration: underline; }

.btn .icon { width: 18px; height: 18px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 24px;
}
.breadcrumb a { color: var(--neutral-500); }
.breadcrumb a:hover { color: var(--brand-blue); }
.breadcrumb__sep { margin: 0 8px; color: var(--neutral-300); }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 96px;
}
.hero__inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.hero__sub {
  font-size: 18px;
  color: var(--neutral-700);
  max-width: 640px;
  margin: 16px auto 0;
}
.hero__tool { margin-top: 48px; text-align: left; }
@media (max-width: 768px) {
  .hero { padding: 32px 0 64px; }
  .hero__tool { margin-top: 32px; }
}

/* ---------- Tool ---------- */
.tool {
  min-height: 320px;
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed var(--neutral-300);
  background: var(--brand-light);
  border-radius: var(--radius-card);
  padding: 56px 32px;
  text-align: center;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--brand-blue);
  border-style: solid;
  box-shadow: 0 4px 16px rgba(18, 58, 248, 0.08);
}
.dropzone--drag {
  border-color: var(--brand-blue);
  border-style: solid;
  background: var(--brand-blue-tint);
  box-shadow: 0 4px 16px rgba(18, 58, 248, 0.12);
}
.dropzone__icon { color: var(--brand-blue); width: 48px; height: 48px; }
.dropzone__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 0;
}
.dropzone__sub {
  font-size: 14px;
  color: var(--neutral-500);
  margin: 0;
}
.dropzone__error {
  margin-top: 16px;
  font-size: 14px;
  color: var(--brand-pink);
  font-weight: 500;
}
.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 16px;
  justify-content: center;
}
.privacy-note .icon { width: 16px; height: 16px; color: var(--brand-green); }

/* Analyzing spinner */
.analyzing {
  padding: 64px 32px;
  text-align: center;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-card);
  background: var(--brand-white);
  position: relative;
}
.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--neutral-300);
  border-top-color: var(--brand-blue);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing__title { font-size: 16px; font-weight: 500; color: var(--brand-dark); }
.analyzing__cancel {
  position: absolute;
  bottom: 16px;
  right: 16px;
}

/* Review panel */
.review {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  .review { grid-template-columns: 1fr; }
}
.panel {
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--brand-white);
}
.panel__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}
.panel__title .mono { font-family: var(--font-mono); font-weight: 500; }

/* Diagnostics rows */
.diag {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diag__row {
  display: grid;
  grid-template-columns: 20px 150px 1fr;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.diag__icon { width: 18px; height: 18px; }
.diag__icon--ok { color: var(--brand-green); }
.diag__icon--warn { color: var(--warn); }
.diag__icon--err { color: var(--brand-pink); }
.diag__label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--neutral-700);
}
.diag__value {
  font-size: 14px;
  color: var(--brand-dark);
}
.diag__value .accent { color: var(--neutral-500); }

/* Mapping rows */
.mapping {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.map-row {
  display: grid;
  grid-template-columns: 1fr 24px 1fr auto;
  gap: 10px;
  align-items: center;
}
.map-row__src {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand-dark);
  background: var(--brand-light);
  padding: 8px 10px;
  border-radius: var(--radius-input);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-row__arrow {
  color: var(--neutral-500);
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 500;
}
.map-row__select {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 8px 28px 8px 10px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-input);
  background: var(--brand-white);
  color: var(--brand-dark);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7785' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}
.map-row__select:focus { border-color: var(--brand-blue); outline: none; }
.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.badge--exact { background: rgba(42, 204, 153, 0.15); color: #1f8c69; }
.badge--fuzzy { background: rgba(245, 158, 11, 0.15); color: #b06b00; }
.badge--skip  { background: var(--brand-light); color: var(--neutral-500); }
.badge--dup   { background: rgba(221, 0, 79, 0.10); color: var(--brand-pink); }

.map-warning {
  font-size: 12px;
  color: var(--brand-pink);
  margin-top: -4px;
  grid-column: 1 / -1;
}

.mapping-note {
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 16px;
}
.mapping-extras {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mapping-add {
  font-size: 13px;
  color: var(--brand-blue);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.mapping-add:hover { text-decoration: underline; }
.dedupe {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--neutral-700);
  margin-top: 12px;
  cursor: pointer;
}

/* Preview */
.preview {
  margin-top: 24px;
}
.preview__scroll {
  overflow-x: auto;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-card);
  background: var(--brand-white);
}
.preview table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.preview th, .preview td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--neutral-300);
  white-space: nowrap;
  vertical-align: top;
}
.preview th {
  background: var(--brand-light);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: var(--brand-dark);
}
.preview tbody tr:nth-child(even) { background: #FAFBFC; }
.preview tbody tr:last-child td { border-bottom: none; }
.preview__summary {
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 8px;
}

/* Action bar */
.actions {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.actions__primary {
  display: flex;
  align-items: center;
  gap: 16px;
}
.actions__tip {
  font-size: 12px;
  color: var(--neutral-500);
}

/* Done banner */
.done {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background: rgba(42, 204, 153, 0.12);
  border: 1px solid var(--brand-green);
  margin-top: 24px;
}
.done .icon { width: 24px; height: 24px; color: var(--brand-green); flex-shrink: 0; }
.done__text { font-size: 14px; color: var(--brand-dark); }
.done__text strong { font-family: var(--font-mono); font-weight: 500; }
.done__actions { margin-left: auto; }
@media (max-width: 600px) {
  .done { flex-wrap: wrap; }
  .done__actions { margin-left: 0; }
}

/* ---------- Sections ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}
.step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand-blue);
  margin-bottom: 12px;
}
.step__title { margin-bottom: 8px; }
.step__body { color: var(--neutral-700); font-size: 15px; }
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
}

.section--alt { background: var(--brand-light); }

.fixes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 56px;
  margin-top: 56px;
}
.fix__title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.fix__body { color: var(--neutral-700); font-size: 15px; }
@media (max-width: 768px) {
  .fixes { grid-template-columns: 1fr; gap: 24px; }
}

.value-props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}
.vp__icon {
  width: 40px;
  height: 40px;
  color: var(--brand-blue);
  margin-bottom: 16px;
}
.vp__title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.vp__body { color: var(--neutral-700); font-size: 15px; }
@media (max-width: 880px) {
  .value-props { grid-template-columns: 1fr; gap: 32px; }
}

/* Section headings */
.section__head {
  max-width: 720px;
}
.section__title { margin-bottom: 16px; }
.section__sub { color: var(--neutral-700); font-size: 18px; }

/* CTA */
.cta {
  background: var(--brand-blue);
  color: var(--brand-white);
  text-align: center;
}
.cta h2 { color: var(--brand-white); }
.cta__sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  margin: 16px auto 32px;
  max-width: 560px;
}
.cta__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: 64px 0 32px;
  background: var(--brand-white);
  border-top: 1px solid var(--neutral-300);
}
.footer__cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 880px) {
  .footer__cols { grid-template-columns: 1fr 1fr; }
}
.footer__tagline {
  margin-top: 12px;
  color: var(--neutral-500);
  font-size: 14px;
  max-width: 280px;
}
.footer__col h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral-500);
  font-weight: 600;
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--neutral-700); font-size: 14px; }
.footer__col a:hover { color: var(--brand-blue); text-decoration: none; }
.footer__bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--neutral-300);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--neutral-500);
  flex-wrap: wrap;
  gap: 16px;
}

/* Utility */
.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;
}
.hidden { display: none !important; }
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
}
.cta .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}
.map-row__src--empty {
  font-style: italic;
  color: var(--neutral-500);
}
.btn--text-sm {
  font-size: 12px;
  padding: 4px 0;
}
body.nav-menu-open {
  overflow: hidden;
}
