/* CoomerDL landing — base styles */

:root {
  --bg: #0b0d12;
  --bg-alt: #0f121a;
  --surface: #141824;
  --surface-2: #1a1f2e;
  --line: #242a3a;
  --text: #e8ecf5;
  --muted: #99a2b8;
  --brand: #6c5ce7;
  --brand-2: #00c2ff;
  --ok: #2fd07a;
  --warn: #ffb020;
  --down: #ff5c72;
  --radius: 14px;
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: .15em .4em; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, .8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  object-fit: cover; display: block;
  border: 1px solid rgba(108, 92, 231, .6);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, .14);
}

.site-header nav { display: flex; align-items: center; gap: 26px; }
.site-header nav a { color: var(--muted); font-size: .93rem; font-weight: 500; transition: color .15s; }
.site-header nav a:hover { color: var(--text); }
.site-header nav .nav-cta {
  color: var(--text); border: 1px solid var(--line); background: var(--surface);
  padding: 7px 14px; border-radius: 9px;
}
.site-header nav .nav-cta:hover { border-color: var(--brand); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 9px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 11px; font-weight: 600; font-size: .97rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #8b7bff);
  color: #fff; box-shadow: 0 8px 24px -10px rgba(108, 92, 231, .9);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(108, 92, 231, .95); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); transform: translateY(-2px); }
.btn.big { padding: 16px 32px; font-size: 1.05rem; }

.version-pill {
  background: rgba(255, 255, 255, .18); border-radius: 20px; padding: 2px 10px;
  font-size: .8rem; font-weight: 600;
}

/* ---------- Hero ---------- */

.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -200px 0 auto 0; height: 620px; z-index: 0;
  background:
    radial-gradient(600px 320px at 22% 42%, rgba(108, 92, 231, .30), transparent 70%),
    radial-gradient(560px 300px at 78% 30%, rgba(0, 194, 255, .16), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-inner > * { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 6px 14px;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 208, 122, .18); }

.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
.grad { background: linear-gradient(120deg, var(--brand-2), #a78bff); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lead { font-size: 1.1rem; color: var(--muted); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; }
.micro { font-size: .84rem; color: var(--muted); margin: 0; }
.micro a { color: var(--brand-2); }
.micro a:hover { text-decoration: underline; }

/* App screenshot */
.hero-app { margin: 0; }
.shot-scroll { max-width: 100%; }
.hero-app img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
  transition: transform .35s ease;
}
.hero-app img:hover { transform: perspective(1600px) rotateY(-2deg) rotateX(0deg) scale(1.01); }
.hero-app figcaption { margin-top: 18px; font-size: .82rem; color: var(--muted); text-align: center; }

/* ---------- Stats ---------- */

.stats { border-block: 1px solid var(--line); background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 34px; text-align: center; }
.stats-grid strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.stats-grid span { font-size: .85rem; color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 10px; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 700; }
.section-lead { color: var(--muted); max-width: 62ch; margin-bottom: 40px; }

/* min-width:0 es lo que permite que un hijo de grid se encoja por debajo de
   su contenido; sin esto el <pre> de instalación estira la página entera. */
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.cards { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(108, 92, 231, .55); }
.card .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(108, 92, 231, .14); border: 1px solid rgba(108, 92, 231, .3);
}
.card .ico svg { width: 21px; height: 21px; fill: none; stroke: #a78bff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.05rem; font-weight: 650; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Sites */
.sites { grid-template-columns: repeat(4, 1fr); }
.site { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.site header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.site h3 { font-size: .97rem; font-weight: 650; margin: 0; word-break: break-word; }
.site p { color: var(--muted); font-size: .86rem; margin: 0; }
.site.down { opacity: .62; }

.tag { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.tag.ok { color: var(--ok); background: rgba(47, 208, 122, .12); border: 1px solid rgba(47, 208, 122, .35); }
.tag.warn { color: var(--warn); background: rgba(255, 176, 32, .12); border: 1px solid rgba(255, 176, 32, .35); }
.tag.down { color: var(--down); background: rgba(255, 92, 114, .12); border: 1px solid rgba(255, 92, 114, .35); }

/* File types */
.types { grid-template-columns: repeat(4, 1fr); }
.type { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.type h3 { font-size: 1rem; }
.type ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.type li { font-size: .78rem; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; font-family: ui-monospace, Consolas, monospace; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; max-width: 780px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.steps .n {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #8b7bff); color: #fff; font-weight: 700; font-size: .9rem;
}
.steps h3 { font-size: 1rem; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Panels */
.panels { grid-template-columns: repeat(3, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 24px; }
.panel h3 { font-size: 1rem; }
.panel p { color: var(--muted); font-size: .91rem; margin: 0; }

/* Install */
.install { grid-template-columns: 1fr 1.25fr; align-items: start; }
.install-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.install-card.featured { border-color: rgba(108, 92, 231, .5); background: linear-gradient(180deg, rgba(108, 92, 231, .10), transparent 60%), var(--surface); }
.install-card h3 { font-size: 1.2rem; }
.install-card p { color: var(--muted); font-size: .93rem; }
.badge { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #fff; background: var(--brand); border-radius: 20px; padding: 4px 11px; margin-bottom: 14px; }
.install-card pre {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 18px;
  overflow-x: auto; margin: 0 0 14px; max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.install-card pre code { background: none; padding: 0; color: #cdd6f4; font-size: .85rem; line-height: 1.75; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 20px; margin-bottom: 10px; }
details summary { cursor: pointer; list-style: none; padding: 17px 0; font-weight: 600; font-size: .98rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; color: var(--brand-2); font-size: 1.4rem; font-weight: 400; line-height: 1; flex: none; }
details[open] summary::after { content: '\2013'; }
details p { color: var(--muted); font-size: .93rem; padding-bottom: 18px; margin: 0; }

/* Community */
.links { grid-template-columns: repeat(4, 1fr); }
.linkcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .18s, border-color .18s; }
.linkcard:hover { transform: translateY(-4px); border-color: rgba(108, 92, 231, .55); }
.linkcard h3 { font-size: 1.05rem; margin-bottom: 4px; }
.linkcard p { color: var(--muted); font-size: .88rem; margin: 0; }

/* Final CTA */
.final-cta { padding: 92px 0; text-align: center; background: radial-gradient(700px 320px at 50% 0%, rgba(108, 92, 231, .22), transparent 70%); }
.final-cta h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.final-cta p { color: var(--muted); margin-bottom: 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 40px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; flex-wrap: wrap; margin-bottom: 26px; }
.footer-inner .brand { margin-bottom: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { color: var(--muted); font-size: .9rem; }
.footer-nav a:hover { color: var(--text); }
.disclaimer { font-size: .78rem; color: #6b7488; border-top: 1px solid var(--line); padding-top: 20px; margin: 0; max-width: 82ch; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .cards, .panels { grid-template-columns: repeat(2, 1fr); }
  .sites, .types, .links { grid-template-columns: repeat(2, 1fr); }
  .install { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-app img, .hero-app img:hover { transform: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-header nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px; display: none;
  }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: 12px 0; font-size: 1rem; }
  .site-header nav .nav-cta { text-align: center; margin-top: 10px; }

  .container { padding: 0 18px; }

  .hero { padding: 44px 0 56px; }
  .section { padding: 58px 0; }
  .final-cta { padding: 64px 0; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; padding-block: 28px; }
  .stats-grid strong { font-size: 1.6rem; }

  .cards, .panels, .sites, .types, .links { grid-template-columns: 1fr; }
  .cta-row { gap: 10px; margin: 24px 0 16px; }
  .cta-row .btn { width: 100%; justify-content: center; }

  /* La captura mide 1008px: encogida a ~340 no se lee nada. En móvil la
     dejamos a un tamaño legible y se desliza en horizontal. */
  .shot-scroll {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-radius: 12px; scrollbar-width: thin;
  }
  .hero-app img { min-width: 620px; }
  .hero-app figcaption { text-align: left; margin-top: 12px; }
  .hero-app figcaption::after { content: ' Swipe to see the whole window.'; color: #6b7488; }

  .card, .install-card, .site, .type, .linkcard { padding: 20px; }
  .steps li { padding: 18px; gap: 14px; }
  .install-card pre { padding: 14px; }
  .install-card pre code { font-size: .78rem; }

  .footer-inner { gap: 20px; }
  .footer-nav { gap: 0 20px; }
  .footer-nav a { padding: 8px 0; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.95rem; }
  .lead { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
