/* ==========================================================================
   miserver.co — hoja de estilos única
   Sin dependencias externas: no hay CDN, ni fuentes remotas, ni frameworks.
   ========================================================================== */

:root {
  --ink:        #0b1220;
  --ink-2:      #121c31;
  --ink-3:      #1b2842;
  --text:       #16202f;
  --text-muted: #5c6b83;
  --text-dim:   #8b99ad;
  --surface:    #ffffff;
  --surface-2:  #f5f8fc;
  --surface-3:  #eef3f9;
  --border:     #e0e7f0;
  --border-dark:#26334d;

  --accent:      #ffc72c;
  --accent-dark: #e0a800;
  --accent-soft: #fff6dc;
  --blue:        #2f6df6;
  --green:       #17915f;
  --green-soft:  #e6f5ee;
  --red:         #d92b3f;

  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --wrap:      1200px;
  --shadow:    0 1px 2px rgba(16, 30, 54, .06), 0 8px 24px rgba(16, 30, 54, .06);
  --shadow-lg: 0 2px 4px rgba(16, 30, 54, .07), 0 18px 48px rgba(16, 30, 54, .12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

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

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; }
.ta-r { text-align: right; }
.muted { color: var(--text-muted); font-size: .875em; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--ink);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* --- Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease,
              color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 14px 26px; font-size: 1.0625rem; }
.btn-sm { padding: 8px 15px; font-size: .9375rem; }

.btn-primary { background: var(--accent); color: #23180a; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-ghost { background: transparent; color: #dfe7f4; border-color: rgba(223, 231, 244, .3); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(223, 231, 244, .55); }

/* --- Cabecera ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 68px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.logo:hover { text-decoration: none; }
.logo-mark { flex: none; }
.logo-mark rect { fill: #24334f; }
.logo-mark .bar { fill: #47597d; }
.logo-mark .led { fill: var(--accent); }
.logo-text { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.logo-tld { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: #c7d2e3; font-size: .9375rem; font-weight: 500;
}
.site-nav > a:hover { color: #fff; background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav-lang {
  border: 1px solid rgba(255, 255, 255, .18);
  margin-left: 6px; font-family: var(--mono); font-size: .8125rem !important;
  letter-spacing: .06em;
}
.site-nav .btn { margin-left: 6px; }

.nav-toggle {
  display: none;
  width: 42px; height: 38px; padding: 10px 9px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; background: #d7e0ee; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span + span { margin-top: 4px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.tricolor { display: flex; height: 3px; }
.tricolor i { flex: 1; }
.tricolor i:nth-child(1) { background: #ffc72c; flex: 2; }
.tricolor i:nth-child(2) { background: #123a8c; }
.tricolor i:nth-child(3) { background: #ce1126; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1100px 520px at 50% -8%, #1d2c4c 0%, var(--ink) 62%);
  color: #eaf0fa;
  padding: 84px 0 92px;
  text-align: center;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 25%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 25%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-title {
  font-size: clamp(2.1rem, 5.4vw, 3.75rem);
  color: #fff; margin: 0 0 20px; letter-spacing: -.03em; line-height: 1.08;
}
.hero-lead {
  max-width: 680px; margin: 0 auto 32px;
  font-size: clamp(1.03rem, 1.6vw, 1.1875rem);
  color: #b9c7dd;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-note { margin: 26px auto 0; max-width: 520px; font-size: .9375rem; color: var(--text-dim); }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 22px; padding: 6px 15px 6px 12px;
  border-radius: 999px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.badge-soon {
  background: rgba(255, 199, 44, .12);
  border: 1px solid rgba(255, 199, 44, .32);
  color: var(--accent);
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 199, 44, .55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 199, 44, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(255, 199, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 199, 44, 0); }
}

/* --- Barra de confianza --------------------------------------------------- */
.trust { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  padding-top: 44px; padding-bottom: 44px;
}
.trust-item h3 { font-size: 1rem; margin: 10px 0 6px; }
.trust-item p { margin: 0; font-size: .9375rem; color: var(--text-muted); }
.trust-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid #f4e2ab;
}
.trust-icon svg { fill: var(--accent-dark); }

/* --- Secciones ------------------------------------------------------------ */
.section { padding: 76px 0; }
.section-muted { background: var(--surface-2); }
.section-dark { background: var(--ink); color: #dbe4f2; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-lead { color: #a9b8cf; }

.section-head { max-width: 720px; margin: 0 0 40px; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.section-lead { margin: 0; font-size: 1.0625rem; color: var(--text-muted); }
.section-cta { margin: 28px 0 0; }
.note {
  margin: 20px 0 0; font-size: .875rem; color: var(--text-muted); max-width: 900px;
}
.note-dark { color: var(--text-dim); }

/* --- Tabla de servidores -------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
table.servers { width: 100%; border-collapse: collapse; font-size: .9375rem; }
table.servers thead th {
  position: sticky; top: 0;
  background: var(--surface-3);
  padding: 13px 16px;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.servers tbody tr { border-bottom: 1px solid var(--border); transition: background-color .15s ease; }
table.servers tbody tr:last-child { border-bottom: 0; }
table.servers tbody tr:hover { background: var(--surface-2); }
table.servers tbody tr.is-featured { background: #fffdf5; }
table.servers tbody tr.is-featured:hover { background: #fffaea; }
table.servers th[scope="row"], table.servers td { padding: 16px; vertical-align: middle; text-align: left; }
table.servers td.ta-r, table.servers th.ta-r { text-align: right; }
table.servers .muted { display: block; }

.model-name { display: block; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; }
.model-line { display: block; font-size: .8125rem; color: var(--text-muted); font-weight: 500; }
.mult { font-family: var(--mono); font-size: .8125rem; color: var(--text-muted); }

.price { white-space: nowrap; }
.price-cop { display: block; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; }
.price-cop .cur { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.price-per { display: block; font-size: .75rem; color: var(--text-muted); }
.price-usd { display: block; font-size: .75rem; color: var(--text-dim); margin-top: 2px; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.tag-accent      { background: var(--accent-soft); color: #7a5900; border: 1px solid #f2dfa6; margin-top: 6px; }
.tag-coming_soon { background: var(--accent-soft); color: #7a5900; border: 1px solid #f2dfa6; }
.tag-available   { background: var(--green-soft); color: var(--green); border: 1px solid #bfe6d3; }
.tag-sold_out    { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }
.stock { display: block; font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* --- Red ------------------------------------------------------------------ */
.net-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 40px;
}
.net-stat {
  padding: 22px 24px;
  background: var(--ink-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
}
.net-stat-value {
  display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent);
  letter-spacing: -.02em;
}
.net-stat-label { display: block; font-size: .875rem; color: #93a3bd; margin-top: 2px; }

.net-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.net-card {
  padding: 24px;
  background: var(--ink-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
}
.net-card h3 { font-size: 1.0625rem; margin: 0 0 8px; }
.net-card p { margin: 0; font-size: .9375rem; color: #a9b8cf; }
.net-card .muted { display: inline; font-family: var(--mono); color: var(--text-dim); }
.net-kind {
  margin: 0 0 8px;
  font-size: .6875rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent);
}

.latency { margin-top: 44px; }
.latency-title { font-size: 1.125rem; margin-bottom: 14px; }
.latency-table {
  width: 100%; border-collapse: collapse;
  background: var(--ink-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.latency-table th, .latency-table td { padding: 11px 18px; text-align: left; }
.latency-table thead th {
  font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase;
  color: #8395b3; font-weight: 700;
  border-bottom: 1px solid var(--border-dark);
}
.latency-table tbody tr + tr { border-top: 1px solid rgba(255, 255, 255, .05); }
.latency-table th[scope="row"] { font-weight: 600; color: #e4ebf7; }
.latency-table .flag { margin-right: 8px; }
.latency-table .muted { color: var(--text-dim); margin-left: 8px; }
.latency-table td.ta-r { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.bar-track {
  display: block; width: 180px; max-width: 34vw; height: 6px;
  background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden;
}
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ms { font-family: var(--mono); font-size: .875rem; color: #cfdaeb; min-width: 62px; text-align: right; }

/* Anchos en pasos de 5 % — evita atributos style en línea (CSP). */
.w-5{width:5%}    .w-10{width:10%}  .w-15{width:15%}  .w-20{width:20%}
.w-25{width:25%}  .w-30{width:30%}  .w-35{width:35%}  .w-40{width:40%}
.w-45{width:45%}  .w-50{width:50%}  .w-55{width:55%}  .w-60{width:60%}
.w-65{width:65%}  .w-70{width:70%}  .w-75{width:75%}  .w-80{width:80%}
.w-85{width:85%}  .w-90{width:90%}  .w-95{width:95%}  .w-100{width:100%}

/* --- Por qué bare metal --------------------------------------------------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.why-card {
  position: relative;
  padding: 28px 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow .18s ease, transform .18s ease;
}
.why-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.why-num {
  display: block; font-family: var(--mono); font-size: .8125rem;
  font-weight: 700; color: var(--accent-dark); margin-bottom: 10px;
}
.why-card h3 { font-size: 1.125rem; }
.why-card p { margin: 0; color: var(--text-muted); }

/* --- Lista de espera ------------------------------------------------------ */
.section-cta-band {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border-top: 1px solid var(--border);
}
.section-cta-band .section-head { margin-left: auto; margin-right: auto; text-align: center; }

.waitlist-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .875rem; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--text-dim); font-size: .8125rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  font: inherit; font-size: .9375rem; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(255, 199, 44, .25);
}
.field input::placeholder { color: #a9b4c4; }

.form-actions { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
.social-proof { margin: 0; font-size: .875rem; color: var(--text-muted); }
.privacy { grid-column: 1 / -1; margin: 0; font-size: .8125rem; color: var(--text-muted); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  padding: 16px 20px; margin-bottom: 20px;
  border-radius: var(--radius); font-size: .9375rem;
}
.alert-ok  { background: var(--green-soft); border: 1px solid #bfe6d3; color: #0f6b46; }
.alert-ok strong { display: block; font-size: 1.0625rem; margin-bottom: 2px; }
.alert-err { background: #fdecee; border: 1px solid #f6c8ce; color: #a01526; }

/* --- FAQ ------------------------------------------------------------------ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.faq summary {
  padding: 16px 46px 16px 20px;
  position: relative;
  font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--accent-dark); }
.faq-body { padding: 0 20px 18px; }
.faq-body p { margin: 0; color: var(--text-muted); }

/* --- Pie ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #9fb0c9; padding: 54px 0 0; }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
  padding-bottom: 40px;
}
.footer-brand p { margin: 10px 0 0; font-size: .9375rem; max-width: 42ch; }
.footer-soon { color: var(--text-dim); font-size: .8125rem !important; }
.footer-col h4 {
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: #7f8ea8; margin-bottom: 12px;
}
.footer-col p { margin: 0 0 8px; font-size: .9375rem; }
.footer-col a, .footer-brand a { color: #cddaec; }
.footer-col a:hover { color: var(--accent); }
.footer-legal {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; padding-bottom: 22px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: .8125rem;
}
.footer-legal p { margin: 0; }
.to-top a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .14); color: #cddaec;
}
.to-top a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1040px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .net-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 24px 18px;
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a { padding: 12px; font-size: 1rem; }
  .nav-lang, .site-nav .btn { margin-left: 0; }
  .site-nav .btn { margin-top: 8px; }

  .hero { padding: 60px 0 68px; }
  .section { padding: 56px 0; }
  .net-stats { grid-template-columns: 1fr; }
  .why-grid  { grid-template-columns: 1fr; }
  .waitlist-form { grid-template-columns: 1fr; padding: 22px; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .footer-legal { flex-direction: column; gap: 12px; align-items: flex-start; }

  /* Tabla -> tarjetas */
  .table-scroll { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  table.servers, table.servers tbody, table.servers tr,
  table.servers th, table.servers td { display: block; width: 100%; }
  table.servers thead { display: none; }
  table.servers tbody tr {
    margin-bottom: 14px; padding: 6px 4px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  table.servers tbody tr.is-featured { border-color: #f0dca4; }
  table.servers th[scope="row"] { padding: 14px 18px 10px; border-bottom: 1px solid var(--border); }
  table.servers td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
    padding: 9px 18px; text-align: right !important;
  }
  table.servers td::before {
    content: attr(data-label);
    flex: none; text-align: left;
    font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--text-muted);
  }
  table.servers td > .muted { display: inline; }
  .price-cop, .price-per, .price-usd { display: inline; }
  .price-usd { margin-left: 6px; }

  .latency-table th, .latency-table td { padding: 10px 14px; }
  .bar-track { display: none; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .trust-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-actions .btn { width: 100%; }
  table.servers td { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left !important; }
  table.servers td::before { text-align: left; }
}

@media print {
  .site-header, .hero-actions, .waitlist-form, .to-top { display: none; }
  body { color: #000; background: #fff; }
  .section-dark, .site-footer, .hero { background: #fff !important; color: #000 !important; }
}
