:root {
  --lab-bg: #071b42;
  --lab-surface: #0d2858;
  --lab-fg: #f4f8ff;
  --lab-muted: #a9b9d3;
  --lab-line: #31517f;
  --lab-accent: #2b9bff;
  --lab-font-display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --lab-font-body: "Trebuchet MS", system-ui, sans-serif;
  --lab-font-mono: "SF Mono", Consolas, "Liberation Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { background: var(--lab-bg); scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgb(43 155 255 / .12), transparent 28%),
    linear-gradient(135deg, #071b42 0%, #050e24 72%);
  color: var(--lab-fg);
  font-family: var(--lab-font-body);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgb(105 178 255 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(105 178 255 / .07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  content: "";
  pointer-events: none;
}

a { color: inherit; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--lab-accent); outline-offset: 4px; }

.container { width: min(100%, 1320px); margin-inline: auto; padding-inline: clamp(20px, 4vw, 64px); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(169 185 211 / .22);
  background: rgb(7 27 66 / .8);
  backdrop-filter: blur(18px);
}

.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--lab-font-display); font-size: 18px; font-weight: 700; letter-spacing: -.03em; text-decoration: none; }

.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--lab-accent); color: var(--lab-accent); font-family: var(--lab-font-mono); font-size: 11px; }

.back-link { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 16px; border: 1px solid var(--lab-line); color: var(--lab-muted); font-family: var(--lab-font-mono); font-size: 10px; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease; }
.back-link:hover { border-color: var(--lab-accent); background: rgb(43 155 255 / .08); color: var(--lab-fg); }

main { padding-block: clamp(72px, 10vw, 150px) 120px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; padding-bottom: 56px; border-bottom: 1px solid var(--lab-line); }

.eyebrow { margin: 0 0 20px; color: var(--lab-accent); font-family: var(--lab-font-mono); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }

h1, h2, h3 { margin-top: 0; font-family: var(--lab-font-display); font-weight: 700; }

h1 { max-width: 10ch; margin-bottom: 0; font-size: clamp(64px, 9vw, 132px); letter-spacing: -.07em; line-height: .82; }

.hero-copy { max-width: 58ch; margin: 26px 0 0; color: var(--lab-muted); font-size: 18px; }

.hero-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }

.hero-stat { min-width: 122px; padding: 16px; border-left: 2px solid var(--lab-accent); background: rgb(255 255 255 / .06); }
.hero-stat strong { display: block; font-family: var(--lab-font-display); font-size: 30px; line-height: 1; }
.hero-stat span { display: block; margin-top: 8px; color: var(--lab-muted); font-family: var(--lab-font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

.catalog { padding-top: 58px; }

.catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.catalog-heading h2 { margin-bottom: 0; font-size: clamp(34px, 5vw, 68px); letter-spacing: -.055em; line-height: .9; }
.catalog-heading p { margin: 0; color: var(--lab-muted); font-family: var(--lab-font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.delivery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.delivery-card { display: flex; min-width: 0; flex-direction: column; padding: 14px; border: 1px solid var(--lab-line); background: rgb(7 20 48 / .56); transition: border-color 220ms ease, transform 260ms cubic-bezier(.2, 0, 0, 1), background-color 220ms ease; }
.delivery-card:hover { border-color: var(--lab-accent); background: rgb(13 40 88 / .72); transform: translateY(-5px); }

.preview { position: relative; min-height: 210px; display: grid; align-items: end; overflow: hidden; background: #030916; }
.preview::before { position: absolute; inset: 0; background: radial-gradient(circle at 18% 16%, rgb(43 155 255 / .48), transparent 42%), linear-gradient(135deg, transparent 45%, rgb(255 255 255 / .08) 45%, rgb(255 255 255 / .08) 46%, transparent 46%); background-size: auto, 42px 42px; content: ""; }
.preview::after { position: absolute; top: 13px; right: 14px; color: rgb(255 255 255 / .28); content: "</>"; font-family: var(--lab-font-mono); font-size: 36px; font-weight: 700; }

.preview-content { position: relative; z-index: 1; padding: 18px; }
.preview-label { display: inline-block; padding: 6px 8px; border: 1px solid rgb(255 255 255 / .34); color: var(--lab-fg); font-family: var(--lab-font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.preview-entry { display: block; margin-top: 10px; color: rgb(244 248 255 / .7); font-family: var(--lab-font-mono); font-size: 10px; overflow-wrap: anywhere; }

.delivery-card h3 { margin: 22px 0 8px; font-size: 30px; letter-spacing: -.04em; line-height: .95; }
.description { min-height: 52px; margin: 0; color: var(--lab-muted); font-size: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag { padding: 5px 7px; border: 1px solid var(--lab-line); color: var(--lab-muted); font-family: var(--lab-font-mono); font-size: 9px; }

.delivery-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--lab-line); color: var(--lab-muted); font-family: var(--lab-font-mono); font-size: 9px; }

.delivery-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.button { min-height: 44px; display: inline-flex; flex: 1 1 120px; align-items: center; justify-content: center; padding-inline: 13px; border: 1px solid var(--lab-accent); background: var(--lab-accent); color: #031226; font-size: 11px; font-weight: 700; text-decoration: none; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
.button:hover { border-color: var(--lab-fg); background: var(--lab-fg); }
.button-secondary { border-color: var(--lab-line); background: transparent; color: var(--lab-fg); }
.button-secondary:hover { border-color: var(--lab-accent); background: rgb(43 155 255 / .1); color: var(--lab-fg); }

.empty { padding: 28px; border: 1px dashed var(--lab-line); color: var(--lab-muted); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 46px; }
.pagination a, .pagination span { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--lab-line); color: var(--lab-muted); font-family: var(--lab-font-mono); font-size: 10px; text-decoration: none; }
.pagination a:hover, .pagination .current { border-color: var(--lab-accent); background: var(--lab-accent); color: #031226; }
.pagination .ellipsis { border-color: transparent; }

.modal[hidden] { display: none; }
.modal { width: min(calc(100% - 30px), 1120px); max-width: none; height: min(88dvh, 820px); padding: 0; border: 1px solid var(--lab-line); background: #050e24; color: var(--lab-fg); box-shadow: 0 30px 100px rgb(0 0 0 / .55); }
.modal::backdrop { background: rgb(1 5 15 / .8); backdrop-filter: blur(5px); }
.modal-panel { height: 100%; display: flex; flex-direction: column; padding: 18px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 14px; }
.modal-header h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.modal-close { min-width: 44px; min-height: 44px; border: 1px solid var(--lab-line); background: transparent; color: var(--lab-fg); cursor: pointer; }
.modal-close:hover { border-color: var(--lab-accent); background: var(--lab-accent); color: #031226; }
.modal-frame-wrap { position: relative; flex: 1; min-height: 0; background: #030916; }
.modal-frame { width: 100%; height: 100%; min-height: 0; border: 1px solid var(--lab-line); background: #030916; }
.modal-frame-wrap.is-loading::after { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(3 9 22 / .82); color: var(--lab-accent); content: "Cargando preview..."; font-family: var(--lab-font-mono); font-size: 11px; letter-spacing: .08em; pointer-events: none; text-transform: uppercase; }
.modal-frame-wrap.has-error::after { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; background: rgb(3 9 22 / .9); color: var(--lab-muted); content: "No fue posible cargar este preview. Usa Abrir para verlo en una pestaña nueva."; font-family: var(--lab-font-mono); font-size: 11px; text-align: center; }
body.modal-open { overflow: hidden; }

@media (max-width: 900px) { .delivery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero { grid-template-columns: 1fr; } .hero-stats { justify-content: flex-start; } }

@media (max-width: 620px) {
  .container { padding-inline: 18px; }
  .nav { min-height: 66px; }
  .brand { font-size: 16px; }
  .back-link { padding-inline: 10px; }
  main { padding-block: 52px 76px; }
  .hero { padding-bottom: 38px; }
  h1 { font-size: clamp(55px, 17vw, 84px); }
  .hero-copy { font-size: 16px; }
  .delivery-grid { grid-template-columns: 1fr; }
  .catalog-heading { display: block; }
  .catalog-heading p { margin-top: 13px; }
  .modal { width: calc(100% - 20px); height: 92dvh; }
  .modal-panel { padding: 10px; }
}

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