/* ═══════════════════════════════════════════════════════════
   Universal Code Scanner — Landing Page
   Misma estructura que las landings de RootCause; el acento es
   el color de marca de la aplicación (seed teal de app_theme.dart).
   Tema oscuro. Acentos monoespaciados. Sin dependencias.
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d1117;
  --bg-alt:   #161b22;
  --bg-card:  #1e2530;
  --border:   #30363d;
  --accent:   #12847b;
  --accent-h: #5bd7cd;
  --green:    #3fb950;
  --yellow:   #d29922;
  --red:      #f85149;
  --txt:      #e6edf3;
  --txt-sec:  #8b949e;
  --txt-mut:  #484f58;
  --mono:     'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --sans:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --radius:   8px;
  --shadow:   0 4px 24px rgba(0,0,0,.45);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-h); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: .85em;
  background: rgba(18,132,123,.16);
  color: #7ee3da;
  padding: .1em .35em;
  border-radius: 4px;
}

pre {
  font-family: var(--mono);
  font-size: .82em;
  line-height: 1.55;
  overflow-x: auto;
}

pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* ── nav ──────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--txt);
  letter-spacing: .02em;
  white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

.nav-links a {
  color: var(--txt-sec);
  font-size: .88rem;
  font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--txt); text-decoration: none; }

.btn-nav {
  background: var(--accent);
  color: #fff !important;
  padding: .35rem .9rem;
  border-radius: 6px;
  font-size: .85rem;
  transition: background .15s;
}
.btn-nav:hover { background: var(--accent-h); color: #06231f !important; text-decoration: none !important; }

/* ── hero ─────────────────────────────────────────────── */
.hero {
  background: var(--bg);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 900px; margin: 0 auto; }

.ascii-block {
  display: inline-block;
  text-align: left;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  max-width: 100%;
}

.ascii-block pre {
  color: var(--accent-h);
  font-family: var(--mono);
  font-size: clamp(.45rem, 1.1vw, .72rem);
  line-height: 1.35;
  white-space: pre;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--txt-sec);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.hero-sub strong { color: var(--txt); }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  margin-bottom: 1.75rem;
}
.badges img { height: 20px; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: .65rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 12px rgba(18,132,123,.4);
}
.btn-primary:hover { background: var(--accent-h); color: #06231f; text-decoration: none; transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--txt-sec);
  padding: .65rem 1.6rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent-h); color: var(--txt); text-decoration: none; }

.hero-tagline { color: var(--txt-mut); font-size: .9rem; }

/* ── layout ───────────────────────────────────────────── */
.section     { padding: 4rem 1.5rem; }
.section-alt { background: var(--bg-alt); }
.container   { max-width: 1100px; margin: 0 auto; }

.section-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--txt);
}
.section-sub {
  color: var(--txt-sec);
  margin-bottom: 2.5rem;
  font-size: .97rem;
}

/* ── feature grid ─────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color .2s, transform .15s;
}
.feature-card:hover { border-color: var(--accent-h); transform: translateY(-2px); }

.feature-icon { font-size: 1.6rem; margin-bottom: .6rem; }

.feature-card h3 {
  font-size: .97rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--txt);
}
.feature-card p { font-size: .88rem; color: var(--txt-sec); }
.feature-card p + p { margin-top: .5rem; }

/* ── table ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
th {
  background: var(--bg-card);
  color: var(--txt-sec);
  text-align: left;
  padding: .65rem 1rem;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}
td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--txt-sec);
  vertical-align: top;
}
tr:hover td { background: rgba(255,255,255,.025); }
td strong { color: var(--txt); }
.ok  { color: var(--green); }
.warn { color: var(--yellow); }

/* ── capturas ─────────────────────────────────────────── */
.shots {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}
.shots figure { width: 235px; max-width: 80vw; }
.shots img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.shots figcaption {
  margin-top: .6rem;
  font-size: .8rem;
  color: var(--txt-mut);
  text-align: center;
}

/* ── diagrama ─────────────────────────────────────────── */
.diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.diagram img { width: 100%; max-width: 820px; }

/* ── descargas ────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.download-card.primary { border-color: var(--accent-h); }

.dl-badge {
  position: absolute;
  top: -1px; right: 1rem;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2em .7em;
  border-radius: 0 0 6px 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.download-card h3 { font-size: .97rem; font-weight: 700; color: var(--txt); }
.download-card p  { font-size: .87rem; color: var(--txt-sec); flex: 1; }
.dl-meta { font-size: .78rem; color: var(--txt-mut) !important; font-family: var(--mono); }

/* ── aviso ────────────────────────────────────────────── */
.note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-size: .88rem;
  color: var(--txt-sec);
}
.note strong { color: var(--txt); }

/* ── lista de límites ─────────────────────────────────── */
.limits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  list-style: none;
}
.limits li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: .88rem;
  color: var(--txt-sec);
}
.limits li strong { display: block; color: var(--txt); margin-bottom: .25rem; }

/* ── docs ─────────────────────────────────────────────── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .75rem;
}
.doc-entry {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
}
.doc-entry a    { font-size: .89rem; font-weight: 600; }
.doc-entry span { font-size: .82rem; color: var(--txt-sec); }

/* ── footer ───────────────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-col p  { font-size: .85rem; color: var(--txt-sec); margin-top: .6rem; line-height: 1.7; }
.footer-col h4 { font-size: .88rem; font-weight: 700; color: var(--txt); margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; }
.footer-col li a { font-size: .85rem; color: var(--txt-sec); }
.footer-col li a:hover { color: var(--accent-h); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: center;
}
.footer-bottom p { font-size: .8rem; color: var(--txt-mut); }
.footer-bottom a { color: var(--txt-sec); }

/* ── responsive ───────────────────────────────────────── */
@media (max-width: 700px) {
  .nav-links { gap: .9rem; }
  .nav-links a:not(.btn-nav) { display: none; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .ascii-block pre { font-size: .38rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .section { padding: 2.5rem 1rem; }
}
