/* SYNTAXIA GitGuard · sitio público. Mobile-first: los breakpoints sólo amplían. */
:root {
  color-scheme: light;
  --navy: #0d2b47;
  --navy-deep: #091f35;
  --ink: #14283d;
  --muted: #51657a;
  --line: #d6e3ee;
  --blue: #1b64a3;
  --blue-dark: #134b80;
  --teal: #2aa7a6;
  --teal-dark: #1c8584;
  --sky: #dceef8;
  --sky-soft: #f2f8fc;
  --surface: #ffffff;
  --danger: #b3261e;
  --gradient: linear-gradient(135deg, #175998 0%, #2473a6 45%, #2aa7a6 100%);
  --shadow-sm: 0 1px 2px rgba(13, 43, 71, 0.06), 0 4px 12px rgba(13, 43, 71, 0.06);
  --shadow-lg: 0 18px 48px rgba(13, 43, 71, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --shell: 1180px;
  --header-height: 64px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--surface); font: 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; color: var(--navy); font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 0.75rem; top: -4rem; z-index: 100; padding: 0.6rem 0.9rem; border-radius: 8px; color: #fff; background: var(--navy); }
.skip-link:focus { top: 0.75rem; }
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 1.25rem; }
.shell-narrow { max-width: 820px; }
.icon { flex: 0 0 auto; width: 1.15em; height: 1.15em; }

/* Marca */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--navy); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-name { display: grid; line-height: 1.05; }
.brand-name span { color: var(--muted); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; }
.brand-name strong { font: 800 1.2rem/1.1 var(--font-display); letter-spacing: -0.02em; }

/* Botones */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0.6rem 1.1rem; border: 1px solid transparent; border-radius: 999px; font: 600 0.95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease; }
.button:hover { transform: translateY(-1px); }
.button-large { min-height: 52px; padding: 0.8rem 1.5rem; font-size: 1rem; }
.button-block { width: 100%; }
.button-primary { color: #fff; background: var(--gradient); box-shadow: 0 8px 20px rgba(27, 100, 163, 0.28); }
.button-primary:hover { box-shadow: 0 12px 26px rgba(27, 100, 163, 0.36); }
.button-secondary { border-color: var(--line); color: var(--navy); background: var(--surface); }
.button-secondary:hover { border-color: var(--blue); }
.button-ghost { border-color: var(--line); color: var(--navy); background: transparent; }
.button-ghost:hover { border-color: var(--blue); color: var(--blue); }
.button-light { color: var(--navy); background: #fff; }
.button-outline-light { border-color: rgba(255, 255, 255, 0.55); color: #fff; background: transparent; }
.button-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

/* Selector de idioma */
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px; padding: 0 0.6rem; border-radius: 999px; color: var(--muted); font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.lang-switch a.active { color: #fff; background: var(--navy); }
.lang-switch a:not(.active):hover { color: var(--blue); }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent; background: rgba(255, 255, 255, 0.88); backdrop-filter: saturate(160%) blur(12px); transition: border-color 160ms ease, box-shadow 160ms ease; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(13, 43, 71, 0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-height); }
.nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: var(--surface); cursor: pointer; }
.nav-toggle .icon { width: 22px; height: 22px; }
.site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 0.75rem 1.25rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 18px 30px rgba(13, 43, 71, 0.1); }
.site-nav.is-open { display: block; }
.nav-links a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--sky-soft); color: var(--ink); font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--blue); }
.nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding-top: 1rem; }
.nav-actions .button { flex: 1 1 9rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 2.25rem 0 2.5rem; background: radial-gradient(1100px 520px at 85% -10%, rgba(42, 167, 166, 0.2), transparent 60%), linear-gradient(180deg, var(--sky-soft) 0%, var(--sky) 100%); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow { margin-bottom: 0.75rem; color: var(--teal-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.05rem, 7.4vw, 3.5rem); font-weight: 800; }
.lead { margin-top: 1rem; color: var(--muted); font-size: 1.06rem; text-wrap: pretty; }
.cta-row { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.6rem; }
.hero-points { display: grid; gap: 0.5rem; margin-top: 1.5rem; color: var(--ink); font-size: 0.92rem; font-weight: 600; }
.hero-points li, .check-list li { display: flex; align-items: flex-start; gap: 0.55rem; }
.hero-points .icon { margin-top: 0.2em; color: var(--teal-dark); }
.hero-media img { width: 100%; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.flow { display: grid; gap: 0.6rem; margin-top: 2rem; }
.flow li { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1rem; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 999px; color: var(--navy); background: rgba(255, 255, 255, 0.72); font-weight: 700; box-shadow: var(--shadow-sm); }
.flow-index { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--gradient); font-size: 0.85rem; }

/* Secciones */
.section { padding: 3.5rem 0; }
.section-tinted { background: var(--sky-soft); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section h2, .cta-band h2 { font-size: clamp(1.65rem, 5.4vw, 2.5rem); font-weight: 800; }
.icon-tile { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: var(--gradient); box-shadow: 0 8px 18px rgba(27, 100, 163, 0.24); }
.icon-tile .icon { width: 24px; height: 24px; }
.icon-tile-soft { color: var(--blue); background: #fff; box-shadow: var(--shadow-sm); }

.feature-grid { display: grid; gap: 1rem; }
.feature-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.feature-card:hover { transform: translateY(-3px); border-color: #b9d3e6; box-shadow: var(--shadow-lg); }
.feature-card h3, .step h3 { margin-top: 1rem; font-size: 1.15rem; }
.feature-card p, .step p { margin-top: 0.5rem; color: var(--muted); font-size: 0.96rem; }

.steps { display: grid; gap: 1rem; counter-reset: step; }
.step { position: relative; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-number { position: absolute; top: 1rem; right: 1.2rem; color: #c9dcea; font: 800 2.6rem/1 var(--font-display); }

.section-dark { color: #dbe8f3; background: radial-gradient(900px 420px at 0% 0%, rgba(42, 167, 166, 0.22), transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: #6fd6d2; }
.section-dark .lead { color: #b9cde0; }
.security-grid { display: grid; gap: 2rem; align-items: center; }
.check-list { display: grid; gap: 0.8rem; margin-top: 1.5rem; }
.check-list .icon { margin-top: 0.2em; color: #6fd6d2; }
.quote-card { margin: 0; padding: 1.6rem; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius); background: rgba(255, 255, 255, 0.07); }
.quote-card blockquote { margin: 0; color: #fff; font: 600 1.2rem/1.45 var(--font-display); text-wrap: pretty; }
.quote-card figcaption { margin-top: 1rem; color: #9fb8cf; font-size: 0.85rem; }

.faq-list { display: grid; gap: 0.75rem; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: 0.85rem 1.1rem; color: var(--navy); font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: 0 0 auto; color: var(--blue); font-size: 1.5rem; font-weight: 400; line-height: 1; transition: transform 160ms ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.1rem 1.1rem; color: var(--muted); }

.cta-band { padding: 3rem 0; color: #e6f3fb; background: var(--gradient); }
.cta-band h2 { color: #fff; }
.cta-band p { margin-top: 0.6rem; font-size: 1.05rem; }
.cta-band-inner { display: grid; gap: 1.5rem; align-items: center; }
.cta-band .cta-row { margin-top: 0; }

/* Pie */
.site-footer { padding: 2.5rem 0 1.5rem; color: var(--muted); background: var(--sky-soft); font-size: 0.9rem; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-tagline { margin-top: 0.75rem; }
.footer-company { display: flex; align-items: center; gap: 0.9rem; }
.footer-company img { width: 120px; height: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); }

/* Acceso y errores */
.auth-page { min-height: 100vh; background: radial-gradient(900px 480px at 100% 0%, rgba(42, 167, 166, 0.2), transparent 60%), linear-gradient(180deg, var(--sky-soft), var(--sky)); }
.auth-shell { display: flex; flex-direction: column; width: 100%; max-width: 440px; min-height: 100vh; margin-inline: auto; padding: 1.25rem; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-card { margin-block: auto; padding: 1.75rem 1.5rem; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-card h1 { margin-top: 1rem; font-size: 1.6rem; font-weight: 800; }
.auth-lead { margin: 0.5rem 0 1.25rem; color: var(--muted); }
.auth-form { display: grid; gap: 0.4rem; }
.auth-form label { margin-top: 0.6rem; color: var(--navy); font-size: 0.88rem; font-weight: 700; }
.auth-form input:not([type="hidden"]) { width: 100%; min-height: 48px; padding: 0.6rem 0.85rem; border: 1px solid #b9cbdb; border-radius: 12px; color: var(--ink); background: #fff; font: inherit; font-size: 1rem; }
.auth-form input:focus-visible { outline-offset: 1px; border-color: var(--blue); }
.auth-form .button { margin-top: 1.25rem; }
.form-error { margin-bottom: 0.5rem; padding: 0.7rem 0.85rem; border: 1px solid #f0c4c0; border-radius: 12px; color: var(--danger); background: #fdf1f0; font-size: 0.92rem; font-weight: 600; }
.auth-back { align-self: center; margin-top: 1.25rem; color: var(--blue-dark); font-weight: 600; }
.error-code { color: var(--teal-dark); font: 800 3rem/1 var(--font-display); }

@media (min-width: 560px) {
  .cta-row { flex-direction: row; flex-wrap: wrap; }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 880px) {
  .shell { padding-inline: 2rem; }
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .nav-links { display: flex; gap: 0.25rem; margin-left: 1.5rem; }
  .nav-links a { min-height: 40px; padding: 0 0.75rem; border: 0; border-radius: 999px; font-size: 0.93rem; }
  .nav-links a:hover { background: var(--sky-soft); }
  .nav-actions { flex-wrap: nowrap; padding-top: 0; }
  .nav-actions .button { flex: 0 0 auto; }
  .hero { padding: 4rem 0 3.5rem; }
  .lead { font-size: 1.15rem; }
  .section { padding: 5.5rem 0; }
  .section-head { margin-bottom: 3rem; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .security-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; }
  .cta-band { padding: 4rem 0; }
  .cta-band-inner { grid-template-columns: 1fr auto; }
}

@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 3rem; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

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