/* opencnc.mx — hoja de estilos del sitio estático */
:root {
  --bg: #0d0e10;
  --bg-2: #141619;
  --panel: #1a1d21;
  --panel-2: #20242a;
  --line: #2c3036;
  --text: #ecedef;
  --muted: #a4a9b0;
  --yellow: #ffc400;
  --yellow-2: #ffd84d;
  --red: #e3262b;
  --radius: 10px;
  --max: 1180px;
  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--yellow-2); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); letter-spacing: .02em; }
p { margin: 0 0 1em; }
::selection { background: var(--yellow); color: #000; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Franja de advertencia ---------- */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, #111 18px 36px);
}

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 14, 16, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand img { width: 190px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text); text-decoration: none;
  font: 600 1.02rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 12px; border-radius: 6px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--yellow); }
.nav .btn { margin-left: 8px; color: #000; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; display: block; }

@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 16px 18px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 6px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 14px 0 0; text-align: center; border-bottom: 0; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--yellow); color: #000; text-decoration: none;
  font: 700 1.05rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  padding: 14px 22px; border-radius: 8px; border: 2px solid var(--yellow);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--yellow-2); border-color: var(--yellow-2); color: #000; transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--text); border-color: #50555c; }
.btn.ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Héroe ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(86vh, 760px);
  display: grid; align-items: end;
  padding: 120px 0 72px;
}
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,14,16,0) 45%, rgba(13,14,16,.6) 80%, var(--bg) 100%),
              linear-gradient(90deg, rgba(13,14,16,.88) 0%, rgba(13,14,16,.45) 45%, rgba(13,14,16,0) 75%);
}
.hero .eyebrow { margin-bottom: 14px; }
.hero p.lead { max-width: 640px; font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: #d8dade; }
.hero.short { min-height: min(62vh, 560px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 .92rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .18em;
  color: var(--yellow);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--yellow); }

/* ---------- Secciones ---------- */
section { padding: 84px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.12rem; }
.muted { color: var(--muted); }

/* ---------- Tarjetas de proyecto ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.project-card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--yellow); box-shadow: var(--shadow); color: var(--text); }
.project-card .media { aspect-ratio: 16/10; overflow: hidden; background: #000; }
.project-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover .media img { transform: scale(1.04); }
.project-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-card .body p { color: var(--muted); margin: 0; }
.project-card .more { margin-top: auto; padding-top: 8px; font: 700 1rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--yellow); }
.tag {
  align-self: flex-start;
  font: 700 .8rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .12em;
  color: #000; background: var(--yellow); padding: 6px 9px; border-radius: 4px;
}
.tag.red { background: var(--red); color: #fff; }
.tag.gray { background: #3a3f46; color: var(--text); }

/* ---------- Especificaciones ---------- */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 28px 0 0; }
.spec { background: var(--panel); padding: 20px; }
.spec b { display: block; font: 800 1.9rem/1.05 var(--font-head); color: var(--yellow); }
.spec span { color: var(--muted); font-size: .95rem; }

/* ---------- Características ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .icon { width: 46px; height: 46px; border-radius: 10px; background: rgba(255,196,0,.12); color: var(--yellow); display: grid; place-items: center; margin-bottom: 14px; }
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.3rem; margin-bottom: .35em; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Dos columnas ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img.framed { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } .split.reverse > :first-child { order: 0; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 3px;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='4'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
.checklist li b { color: var(--text); }
.checklist li span { display: block; color: var(--muted); font-size: .97rem; }

/* ---------- Descargas ---------- */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.download {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.download:hover { border-color: var(--yellow); transform: translateY(-2px); color: var(--text); }
.download .ficon { flex: none; width: 46px; height: 46px; border-radius: 8px; background: var(--yellow); color: #000; display: grid; place-items: center; font: 800 .78rem/1 var(--font-head); letter-spacing: .04em; }
.download .ficon.dark { background: #2f343b; color: var(--yellow); }
.download b { display: block; font: 700 1.15rem/1.15 var(--font-head); text-transform: uppercase; letter-spacing: .03em; }
.download small { color: var(--muted); font-size: .9rem; }
.download .arrow { margin-left: auto; color: var(--yellow); }
.download .arrow svg { width: 22px; height: 22px; display: block; }

.license {
  display: flex; gap: 18px; align-items: center; margin-top: 26px;
  border: 1px dashed #464b52; border-radius: var(--radius); padding: 18px 20px; color: var(--muted); font-size: .97rem;
}
.license svg { flex: none; width: 40px; height: 40px; color: var(--yellow); }
.license p { margin: 0; }

/* ---------- Video ---------- */
.video {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  background: #000 center/cover no-repeat; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.video button {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer;
  background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,.1)); color: #fff;
  display: grid; place-items: center;
}
.video button .play { width: 84px; height: 84px; border-radius: 50%; background: var(--red); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(227,38,43,.25); transition: transform .2s ease; }
.video button:hover .play { transform: scale(1.08); }
.video button .play svg { width: 34px; height: 34px; margin-left: 5px; }
.video button .label { position: absolute; left: 18px; bottom: 16px; font: 700 1.05rem/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .06em; text-align: left; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gallery a { display: block; aspect-ratio: 16/10; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .2s; }
.gallery a:hover img { transform: scale(1.05); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(0,0,0,.88); }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 8px; }
.lightbox .close { position: fixed; top: 14px; right: 16px; background: var(--yellow); color: #000; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- Banda de llamada ---------- */
.cta-band {
  background: var(--yellow); color: #111;
  background-image: repeating-linear-gradient(-45deg, rgba(0,0,0,.05) 0 18px, transparent 18px 36px);
}
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 46px 0; }
.cta-band h2 { margin: 0; color: #000; }
.cta-band p { margin: 6px 0 0; color: #2a2a2a; font-weight: 500; }
.cta-band .btn { background: #000; color: var(--yellow); border-color: #000; }
.cta-band .btn:hover { background: #222; border-color: #222; color: var(--yellow-2); }

/* ---------- Comunidad / estadísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.stat { border-left: 3px solid var(--yellow); padding: 6px 0 6px 18px; }
.stat b { display: block; font: 800 2.6rem/1 var(--font-head); }
.stat span { color: var(--muted); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.contact-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-decoration: none; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.contact-card:hover { border-color: var(--yellow); transform: translateY(-3px); color: var(--text); }
.contact-card svg { width: 36px; height: 36px; color: var(--yellow); }
.contact-card b { font: 700 1.45rem/1.1 var(--font-head); text-transform: uppercase; letter-spacing: .03em; }
.contact-card span { color: var(--muted); }
.contact-card.wa svg { color: #25d366; }
.contact-card.yt svg { color: #ff3b3b; }
.contact-card.fb svg { color: #4d8bff; }

/* ---------- Pie de página ---------- */
.site-footer { background: #090a0b; border-top: 1px solid var(--line); padding: 56px 0 28px; color: var(--muted); font-size: .97rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--text); font-size: 1.1rem; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .brand img { width: 200px; margin-bottom: 14px; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.socials a:hover { border-color: var(--yellow); color: var(--yellow); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .9rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Utilidades ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; }
.badge-row img { height: 110px; width: auto; }
.note { border-left: 3px solid var(--yellow); background: var(--panel); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; color: #d0d3d7; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Suscripción (correo opcional) ---------- */
.subscribe {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center;
  margin-top: 26px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,196,0,.12), rgba(255,196,0,.03)); border: 1px solid rgba(255,196,0,.35);
}
.subscribe h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); margin: 8px 0 8px; }
.subscribe-text p { color: var(--muted); margin: 0; font-size: .97rem; }
.subscribe-row { display: flex; gap: 10px; }
.subscribe-row input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: 8px; border: 1px solid #4a4f56;
  background: #0f1113; color: var(--text); font: inherit;
}
.subscribe-row input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,196,0,.25); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; color: var(--muted); font-size: .93rem; cursor: pointer; }
.consent input { margin-top: 4px; accent-color: var(--yellow); width: 16px; height: 16px; flex: none; }
.subscribe-msg { margin: 10px 0 0; min-height: 1.4em; font-weight: 600; font-size: .97rem; }
.subscribe-msg.ok { color: #6ee7a0; }
.subscribe-msg.error { color: #ff8a8d; }
.subscribe-form button[disabled] { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) { .subscribe { grid-template-columns: 1fr; padding: 22px; } }
@media (max-width: 420px) { .subscribe-row { flex-direction: column; } }

/* ---------- Texto legal ---------- */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.6rem; margin-top: 1.6em; }
.legal p, .legal li { color: #cfd2d6; }
