/* =========================================================================
   VerifyAct — stylesheet
   Direction: institutional navy + cool paper; the traffic-light verdict
   (green/amber/red) is the only expressive color. Serif display (Source Serif),
   Inter for UI, IBM Plex Mono for forensic data (IDs and the reliability index).
   ========================================================================= */

:root {
  --ink: #15314B;          /* deep navy — brand */
  --ink-strong: #0E2336;
  --text: #1A2330;
  --muted: #5B6678;
  --line: #E3E7EC;
  --line-soft: #EEF1F4;
  --paper: #F6F7F9;
  --surface: #FFFFFF;
  --accent: #2C5A8C;       /* interactive blue (navy family) */
  --accent-ink: #1E3F63;

  --green: #1E9E5A; --green-bg: #E8F5EE;
  --amber: #C77700; --amber-bg: #FBF1E0;
  --red:   #D14343; --red-bg:   #FBE9E9;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 35, 54, .06), 0 1px 3px rgba(16, 35, 54, .04);
  --shadow-md: 0 6px 24px rgba(16, 35, 54, .08);
  --shadow-lg: 0 18px 48px rgba(16, 35, 54, .12);

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.18; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }

/* Eyebrow label — used to mark sections honestly, not to decorate */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
  display: inline-block;
}

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-size: .98rem; font-weight: 600;
  padding: .72rem 1.4rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--ink-strong); color: #fff; box-shadow: var(--shadow-md); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn--block { width: 100%; }
.btn--lg { padding: .9rem 1.8rem; font-size: 1.05rem; }
.btn--sm { padding: .45rem .85rem; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------------ Navbar */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 247, 249, .85); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--ink); letter-spacing: -.01em; }
.wordmark:hover { text-decoration: none; color: var(--ink-strong); }
.wordmark__mark { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nav-links a { color: var(--text); font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: .7rem; }

/* Language selector */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: .35rem; background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .4rem .6rem;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .05em; color: var(--muted); cursor: pointer;
}
.lang__btn:hover { border-color: var(--accent); color: var(--ink); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  min-width: 130px; padding: .3rem; display: none;
}
.lang__menu.open { display: block; }
.lang__menu button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: .5rem .6rem; border-radius: 6px; font-size: .9rem; color: var(--text); cursor: pointer;
}
.lang__menu button:hover { background: var(--line-soft); }
.lang__menu button[aria-selected="true"] { color: var(--accent); font-weight: 600; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

/* ------------------------------------------------------------------ Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__title { margin-bottom: 1.1rem; }
.hero__lead { font-size: 1.18rem; color: var(--muted); max-width: 30rem; margin-bottom: 1.8rem; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero__note { margin-top: 1.1rem; font-size: .85rem; color: var(--muted); }
.hero__note strong { color: var(--ink); font-weight: 600; }

/* Signature element: the verdict card (semáforo + reliability index) */
.verdict {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 1.6rem; max-width: 380px; margin-left: auto;
}
.verdict--reveal { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.verdict__top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line-soft); }
.verdict__label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.semaforo { display: inline-flex; gap: .4rem; align-items: center; }
.semaforo__dot { width: 13px; height: 13px; border-radius: 50%; background: #D8DDE3; transition: background .2s; }
.semaforo--verde .semaforo__dot.is-green { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.semaforo--amarillo .semaforo__dot.is-amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.semaforo--rojo .semaforo__dot.is-red { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.verdict__index { text-align: center; padding: 1.3rem 0 .6rem; }
.verdict__num { font-family: var(--font-mono); font-size: 3.6rem; font-weight: 600; line-height: 1; color: var(--ink); }
.verdict__num span { font-size: 1.3rem; color: var(--muted); }
.verdict__caption { font-size: .82rem; color: var(--muted); margin: .3rem 0 0; }
.verdict__rows { margin-top: 1rem; display: grid; gap: .55rem; }
.vrow { display: flex; align-items: center; gap: .6rem; font-size: .88rem; }
.vrow__check { width: 18px; height: 18px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; color: #fff; }
.vrow__check.ok { background: var(--green); }
.vrow__check.warn { background: var(--amber); }
.vrow__check.bad { background: var(--red); }
.vrow__label { color: var(--muted); }
.vrow__value { margin-left: auto; font-family: var(--font-mono); font-size: .82rem; color: var(--text); }

/* ------------------------------------------------------------------ Sections */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--tint { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 42rem; margin-bottom: 2.5rem; }
.section__head.center { margin-left: auto; margin-right: auto; }

/* Steps / how it works (a genuine 3-step sequence -> numbered) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.step__n { font-family: var(--font-mono); font-size: .82rem; color: var(--accent); letter-spacing: .1em; }
.step h3 { margin: .6rem 0 .4rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Checks grid (the 11 verifications) */
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem 2rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.check__mark { color: var(--green); flex: none; margin-top: .15rem; }
.check strong { color: var(--ink); font-weight: 600; }

/* Generic card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }

/* Disclaimer banner */
.disclaimer {
  border-left: 3px solid var(--amber); background: var(--amber-bg);
  padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-size: .9rem; color: #6b4d12;
}

/* ------------------------------------------------------------------ Forms */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 3rem 0; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 2.2rem; width: 100%; max-width: 440px; }
.form-card h1 { font-size: 1.7rem; margin-bottom: .4rem; }
.form-card__sub { color: var(--muted); margin-bottom: 1.6rem; font-size: .95rem; }
.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.input, select.input, textarea.input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, select.input:focus, textarea.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(44, 90, 140, .14); }
.field__hint { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.form-error { background: var(--red-bg); color: #8f2b2b; border: 1px solid #f1c9c9; border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .88rem; margin-bottom: 1rem; }
.form-success { background: var(--green-bg); color: #14663b; border: 1px solid #bfe4cf; border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .88rem; margin-bottom: 1rem; }
.form-foot { margin-top: 1.3rem; font-size: .9rem; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ Tool screen */
.tool { padding: 2.5rem 0 4rem; }
.tool__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.credit-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1.2rem; font-size: .92rem; box-shadow: var(--shadow-sm);
}
.credit-bar .pill { font-family: var(--font-mono); font-size: .82rem; background: var(--line-soft); border-radius: 999px; padding: .25rem .7rem; color: var(--ink); }
.credit-bar .warn-text { color: var(--amber); }

.tool__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.4rem 0; }
.upload {
  border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 1.6rem; text-align: center; transition: border-color .15s, background .15s; cursor: pointer;
}
.upload:hover, .upload.dragover { border-color: var(--accent); background: #fbfdff; }
.upload h3 { margin: 0 0 .3rem; }
.upload__hint { font-size: .82rem; color: var(--muted); }
.upload__file { margin-top: .8rem; font-family: var(--font-mono); font-size: .82rem; color: var(--accent-ink); word-break: break-all; }
.upload input[type="file"] { display: none; }

/* Comparecientes */
.parties { display: grid; gap: 1rem; }
.party { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.party__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .9rem; }
.party__title { font-weight: 600; color: var(--ink); font-family: var(--font-display); }
.party__remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: .85rem; }
.party__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .8rem; }
.party__custom { margin-top: .8rem; }

/* ------------------------------------------------------------------ Result screen */
.result { padding: 2.5rem 0 4rem; }
.result__verdict {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-md); margin-bottom: 1.6rem;
}
.gauge { text-align: center; }
.gauge__num { font-family: var(--font-mono); font-weight: 600; font-size: 4.5rem; line-height: 1; }
.gauge__num span { font-size: 1.5rem; color: var(--muted); }
.gauge__bar { width: 200px; height: 8px; border-radius: 999px; background: var(--line); margin: 1rem auto 0; overflow: hidden; }
.gauge__fill { height: 100%; border-radius: 999px; }
.result__summary h1 { margin-bottom: .5rem; }
.tag { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; padding: .35rem .8rem; border-radius: 999px; }
.tag--verde { background: var(--green-bg); color: #14663b; }
.tag--amarillo { background: var(--amber-bg); color: #6b4d12; }
.tag--rojo { background: var(--red-bg); color: #8f2b2b; }

.alert { border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.6rem; border: 1px solid; }
.alert--red { background: var(--red-bg); border-color: #f1c9c9; color: #8f2b2b; }
.alert h3 { color: #8f2b2b; margin: 0 0 .5rem; font-size: 1rem; }
.alert ul { margin: 0; padding-left: 1.2rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm); }
.panel > h2 { font-size: 1.25rem; margin-bottom: 1rem; }

.fields-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.fields-table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.fields-table td { padding: .7rem .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.fields-table tr:last-child td { border-bottom: none; }
.fields-table .field-val { font-family: var(--font-mono); font-size: .85rem; }
.status-dot { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .82rem; }
.status-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.status-dot.ok::before { background: var(--green); } .status-dot.ok { color: #14663b; }
.status-dot.warn::before { background: var(--amber); } .status-dot.warn { color: #6b4d12; }
.status-dot.bad::before { background: var(--red); } .status-dot.bad { color: #8f2b2b; }
.status-dot.neutral::before { background: #aab2bd; } .status-dot.neutral { color: var(--muted); }

.findings { display: grid; gap: .7rem; }
.finding { display: flex; gap: .7rem; font-size: .92rem; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--line-soft); }
.finding__loc { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }

/* ------------------------------------------------------------------ Pricing */
.pricing { padding: 3rem 0 4rem; }
.region-note { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); text-align: center; margin-bottom: 2rem; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.plan--featured { border-color: var(--ink); box-shadow: var(--shadow-lg); position: relative; }
.plan__badge { position: absolute; top: -11px; left: 1.8rem; background: var(--ink); color: #fff; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 999px; font-family: var(--font-mono); }
.plan__name { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); margin-bottom: .3rem; }
.plan__price { display: flex; align-items: baseline; gap: .25rem; margin: .6rem 0 .2rem; }
.plan__amount { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 600; color: var(--ink); }
.plan__per { color: var(--muted); font-size: .9rem; }
.plan__credits { font-size: .9rem; color: var(--muted); margin-bottom: 1.2rem; }
.plan__features { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; font-size: .92rem; }
.plan__features li { display: flex; gap: .55rem; align-items: flex-start; }
.plan__features li::before { content: "✓"; color: var(--green); font-weight: 700; }
.plan .btn { margin-top: auto; }
.credits-pack { margin-top: 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.3rem 1.6rem; }
.promo-row { display: flex; gap: .6rem; max-width: 420px; margin: 1.6rem auto 0; }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: var(--ink); color: #cdd6e0; padding: 3rem 0 2rem; margin-top: 4rem; }
.site-footer a { color: #cdd6e0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-grid h4 { color: #fff; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-family: var(--font-mono); margin-bottom: .9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .92rem; }
.footer__brand { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin-bottom: .6rem; }
.footer__disclaimer { font-size: .82rem; color: #93a1b3; max-width: 30rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.4rem; font-size: .82rem; color: #93a1b3; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

/* ------------------------------------------------------------------ Utilities */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--ghost .spinner { border-color: rgba(21,49,75,.3); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.flash { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .8rem 1.3rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: .92rem; z-index: 100; }
.loading-block { text-align: center; padding: 4rem 0; color: var(--muted); }
.loading-block .spinner { border-color: rgba(21,49,75,.2); border-top-color: var(--ink); width: 30px; height: 30px; margin: 0 auto 1rem; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .verdict { margin: 0 auto; }
  .steps, .plans { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .tool__grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 1rem 24px; gap: 1rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .party__grid { grid-template-columns: 1fr; }
  .result__verdict { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 560px) {
  .form-card, .plan { padding: 1.5rem; }
  .result__verdict { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
