:root {
  --bg: #0c0f14;
  --bg-elevated: #111620;
  --surface: #161d2a;
  --surface-hover: #1c2535;
  --border: #2a3444;
  --border-subtle: #1e2636;
  --text: #e8edf4;
  --text-secondary: #94a3b8;
  --accent: #22c55e;
  --accent-hover: #4ade80;
  --accent-muted: rgba(34, 197, 94, 0.12);
  --primary: var(--accent);
  --primary-hover: var(--accent-hover);
  --muted: var(--text-secondary);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  background-image: radial-gradient(
      ellipse 120% 80% at 50% -30%,
      rgba(34, 197, 94, 0.08),
      transparent 55%
    ),
    radial-gradient(
      ellipse 80% 50% at 100% 0%,
      rgba(59, 130, 246, 0.05),
      transparent 45%
    );
  color: var(--text);
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ——— Cabecera global ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.site-brand:hover {
  color: var(--text);
  opacity: 0.92;
}

.site-brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--accent) 0%, #15803d 100%);
  box-shadow: var(--shadow-sm);
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav-link--accent {
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.site-nav-link--accent:hover {
  color: var(--accent-hover);
  background: rgba(34, 197, 94, 0.18);
}

/* ——— Hero / landing ——— */
.hero {
  padding: 3rem 0 3.5rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 4rem 0 4.5rem;
  }
}

.hero-inner {
  max-width: 40rem;
  text-align: center;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.hero-lead strong {
  color: #cbd5e1;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-actions-note {
  font-size: 0.8125rem;
  color: var(--muted);
}

.section-block {
  padding-bottom: 3rem;
}

/* Bloque de las tres tarjetas: más aire antes del CTA */
.section-block:not(.section-block--cta) {
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section-block:not(.section-block--cta) {
    padding-bottom: 5rem;
  }
}

.section-block--cta {
  padding-top: 3rem;
  margin-top: 2.5rem;
  padding-bottom: 4rem;
  border-top: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .section-block--cta {
    padding-top: 4rem;
    margin-top: 3rem;
  }
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.feature-card {
  position: relative;
  padding: 1.5rem 1.35rem 1.5rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  border-color: #3d4d63;
  box-shadow: var(--shadow-md);
}

.feature-card-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-muted);
  border-radius: var(--radius-sm);
}

.feature-card-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.feature-card-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.cta-panel {
  max-width: 32rem;
  margin: 0 auto;
  padding: 2rem 1.75rem;
  text-align: center;
  background: linear-gradient(
    180deg,
    var(--surface) 0%,
    var(--bg-elevated) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.cta-panel-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cta-panel-text {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ——— Pie ——— */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2rem;
  text-align: center;
}

.site-footer-disclaimer {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.site-footer-copy {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

/* ——— Contenedor herramienta ——— */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--tool {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.tool-page-head {
  margin-bottom: 1.75rem;
}

.tool-page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.tool-page-title {
  margin: 0 0 0.65rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.tool-page-subtitle {
  margin: 0;
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.tool-page-subtitle strong {
  color: #cbd5e1;
  font-weight: 600;
}

.tool-page-subtitle kbd {
  display: inline-block;
  padding: 0.12em 0.45em;
  font-size: 0.85em;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.card--tool:last-of-type {
  margin-bottom: 0;
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.input-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

input[type="url"] {
  flex: 1 1 320px;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="url"]::placeholder {
  color: #64748b;
}

input[type="url"]:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

button {
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

button.primary {
  background: var(--accent);
  color: #0a0f14;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.help {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.card-acciones {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

button.btn-secundario {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

button.btn-secundario:hover:not(:disabled) {
  color: var(--text);
  border-color: #475569;
  background: rgba(255, 255, 255, 0.04);
}

.btn-zoom {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.btn-zoom:hover {
  color: var(--text);
  border-color: #475569;
}

/* Lista de enlaces — estilo sobrio */
.lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lista li {
  overflow-wrap: anywhere;
  padding: 0;
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lista li:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.lista a {
  display: block;
  padding: 0.75rem 1rem;
  color: #7dd3fc;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  line-height: 1.45;
}

.lista a:hover {
  color: #bae6fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.estado {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: #15803d;
  color: #fff;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  font-size: 0.9375rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 1000;
}

.toast.mostrar {
  opacity: 1;
  transform: translateY(0);
}

/* CTA enlaces */
a.btn-cta {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

a.btn-cta.primary {
  background: var(--accent);
  color: #0a0f14;
  border: 1px solid transparent;
}

a.btn-cta.primary:hover {
  background: var(--accent-hover);
  color: #0a0f14;
}

a.btn-cta.btn-cta--lg {
  padding: 0.95rem 2rem;
  font-size: 1rem;
}

/* Legacy: intro kbd si queda en algún sitio */
.intro kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}
