:root{
  /* Artboard aspect ratio 1029x2560  */
  --maxW: 1920px;

  /* Z-index */
  --z-ui: 10;
  --z-modal: 50;

  /* Typography */
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Device screen insets (AJUSTA 1 VEZ SEGÚN TUS MARCOS) */
  /* Formato: top right bottom left en % del contenedor del device */
  --lap-inset: 10% 7% 18% 7%;
  --lap-radius: 10px;

  --ph-inset: 7% 10% 9% 10%;
  --ph-radius: 18px;

  --tab-inset: 7% 9% 7% 9%;
  --tab-radius: 16px;
}

*{ box-sizing:border-box; }
html,body{
  font-family: var(--font);
  overflow-x:hidden;
  min-height: 100svh;
  background-color:#000;
  background-image: url("../img/bg/inicio.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body{ background:#000; font-family: var(--font); overflow-x:hidden; }

/* Artboard responsive, mantiene proporción 2:3 */
.artboard{
  position:relative;
  width:100%;
  max-width: var(--maxW);
  margin:0 auto;
  min-height: 100svh;
  aspect-ratio: 3 / 4;
  overflow:hidden;
}
.bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.layer{
  position:absolute;
  inset:0;
  z-index: var(--z-ui);
}

/* ====== Logo (posición basada en el mockup) ====== */
.logo{
  position:absolute;
  left: 50%;
  top: 4.2%;
  transform: translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:#fff;
  font-weight: 900;
  text-shadow: 0 8px 18px rgba(0,0,0,.28);
  width: max-content;
  z-index: 50;
}

.logo__mark{
  width:46px; height:46px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0,255,255,.30), rgba(125,90,255,.35));
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
}
.logo__text{
  font-size: 34px;
  letter-spacing: .2px;
}

/* ====== Navbar (posición exacta mockup-ish) ====== */
.nav{
  position:absolute;
  left: 12%;
  right: 12%;
  top: 11.3%;
  height: 54px;

  display:flex;
  align-items:center;
  gap: 10px;

  padding: 0 12px;
  border-radius: 16px;

  background: rgba(16,66,176,.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 26px rgba(0,0,0,.22);
}

.nav{ flex-wrap: nowrap; }

.nav__item{
  text-decoration:none;
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
}

/* Inicio con icono (como el mockup) */
.nav__item--home{ display:flex; align-items:center; gap:10px; }
.nav__item--home::before{
  content:"";
  width:18px; height:18px;
  background: rgba(255,255,255,.92);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3 2 12h3v9h6v-6h2v6h6v-9h3z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3 2 12h3v9h6v-6h2v6h6v-9h3z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity:.95;
}
.nav__item.is-active{ background: rgba(255,255,255,.12); }
.nav__sep{ color: rgba(255,255,255,.55); font-weight: 900; }

.nav__right{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
  position:relative;
}

/* Botón Ingresar (como el mockup) */
.btnLogin{
  height:40px;
  padding:0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(40,130,255,.95), rgba(20,90,235,.95));
  color:#fff;
  font-weight: 1000;
  cursor:pointer;
  box-shadow: 0 12px 18px rgba(20,90,235,.18), 0 10px 18px rgba(0,0,0,.14);
}

/* CTA top */
.ctaTop{
  height:40px;
  padding:0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, #ff4b2b, #ff2e6f);
  color:#fff;
  font-weight: 900;
  cursor:pointer;
  box-shadow: 0 14px 24px rgba(255,60,60,.26), 0 10px 18px rgba(0,0,0,.18);
}

/* ====== Hero text ====== */
.hero{
  position:absolute;
  left: 10%;
  right: 10%;
  top: 21%;
  text-align:center;
  color:#fff;
  text-shadow: 0 10px 22px rgba(0,0,0,.28);
}
.hero__title{
  margin:0;
  font-weight: 1000;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.2px;
}
.hero__t1{ color:#fff; }
.hero__t2{ color:#ffdf6a; }
.hero__t3{ color:#ffdf6a; }
.hero__t4{ color:#fff; }
.hero__t5{ color:#ffdf6a; }
.hero__sub{
  margin: 14px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: rgba(255,255,255,.92);
}

/* CTA principal */
.ctaMain{
  margin-top: 18px;
  height: 58px;
  padding: 0 28px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, #ff4b2b, #ff2e6f);
  color:#fff;
  font-weight: 1000;
  font-size: 18px;
  cursor:pointer;
  box-shadow: 0 18px 32px rgba(255,60,60,.28), 0 12px 20px rgba(0,0,0,.18);
}

/* ====== Devices group (posiciones en % sobre el artboard) ====== */
.devices{
  position:absolute;
  left: 6%;
  right: 6%;
  top: 58%;
  height: 26%;
}

/* Base device container */
.device{
  position:absolute;
  inset:auto;
  pointer-events:none;
}
.device img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

/* Un poco más de “peso visual” como el mockup */
.device__frame{ filter: drop-shadow(0 18px 22px rgba(0,0,0,.35)); }

/* Laptop pos/size */
.device--laptop{
  left: 2%;
  top: 18%;
  width: 62%;
  height: 74%;
}

/* Phone pos/size */
.device--phone{
  left: 62%;
  top: 22%;
  width: 18%;
  height: 70%;
  z-index: 2;
}

/* Tablet pos/size */
.device--tablet{
  left: 74%;
  top: 26%;
  width: 26%;
  height: 64%;
  z-index: 1;
}

/* Screen sits UNDER frame and fits within window using insets */
.device__screen{
  z-index: 1;
  object-fit: cover;
}
.device__frame{
  z-index: 2;
  pointer-events:none;
}

/* Per-device screen window (clip with border-radius + inset) */
.device--laptop .device__screen{
  inset: var(--lap-inset);
  border-radius: var(--lap-radius);
}
.device--phone .device__screen{
  inset: var(--ph-inset);
  border-radius: var(--ph-radius);
}
.device--tablet .device__screen{
  inset: var(--tab-inset);
  border-radius: var(--tab-radius);
}

/* ====== Tiles ====== */
.tiles{
  position:absolute;
  left: 8%;
  right: 8%;
  bottom: 10.5%;
  height: 10%;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items:center;
}
.tile{
  height: 78%;
  border-radius: 18px;
  background: rgba(255,255,255,.30);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 14px 24px rgba(0,0,0,.16);
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
}
.tile__icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.40);
  box-shadow: 0 10px 18px rgba(0,0,0,.12);
  display:grid;
  place-items:center;
}

/* Icons (SVG inline en mask) */
.tile__icon::before{
  content:"";
  width:26px; height:26px;
  background: rgba(12,70,170,.95);
  -webkit-mask: var(--ico) center/contain no-repeat;
          mask: var(--ico) center/contain no-repeat;
}
.tile--sales .tile__icon{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 17h2v-7H3zm4 0h2V7H7zm4 0h2V11h-2zm4 0h2V5h-2zm4 0h2V9h-2z'/%3E%3C/svg%3E"); }
.tile--inv  .tile__icon{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 7V5l9-4 9 4v2l-9 4zm0 4l9 4 9-4v8l-9 4-9-4z'/%3E%3C/svg%3E"); }
.tile--rep  .tile__icon{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h18v14H6l-3 3zm4 4h10v2H7zm0 4h10v2H7z'/%3E%3C/svg%3E"); }
.tile__txt{
  font-weight: 1000;
  font-size: 20px;
  color: rgba(16,60,150,.96);
}

/* ====== Modal ====== */
.modal{ position:fixed; inset:0; display:none; z-index: var(--z-modal); }
.modal.is-open{ display:block; }
.modal__backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.50); backdrop-filter: blur(8px); }
.modal__panel{
  position:relative;
  width:min(520px, calc(100% - 26px));
  margin: 90px auto 0;
  border-radius: 18px;
  background: rgba(15,20,40,.92);
  border: 1px solid rgba(255,255,255,.18);
  padding: 14px;
  color:#fff;
}
.modal__head{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.modal__title{ font-weight: 1000; }
.modal__x{
  width:38px;height:38px;border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color:#fff; cursor:pointer; font-weight:1000;
}
.modal__body{ padding-top: 12px; display:flex; flex-direction:column; gap:10px; }

.choiceBtn{
  display:flex; gap:12px; align-items:center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  padding: 12px;
  cursor:pointer;
  color:#fff;
  text-align:left;
}
.choiceBtn b{ display:block; font-weight:1000; }
.choiceBtn small{ display:block; opacity:.85; font-weight:800; }
.choiceIco{ width:38px; height:38px; display:grid; place-items:center; background: rgba(255,255,255,.10); border-radius: 12px; }

/* Form */
.form{ margin-top: 8px; display:flex; flex-direction:column; gap:8px; }
.lbl{ font-weight:1000; font-size: 12px; opacity:.92; }
.inp{
  width:100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  padding: 10px 10px;
  color:#fff;
  font-weight:800;
}
.actions{ display:flex; justify-content:flex-end; gap:10px; margin-top: 8px; }
.btnGhost{
  height:42px; padding:0 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color:#fff; font-weight:1000; cursor:pointer;
}
.btnCta{
  height:42px; padding:0 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, #ff4b2b, #ff2e6f);
  color:#fff; font-weight:1000; cursor:pointer;
}
.status{ min-height: 18px; font-weight: 1000; font-size: 13px; margin-top: 6px; }

/* ====== Responsive scaling ====== */
@media (max-width: 560px){
  .hero__title{ max-width: 26ch; margin: 0 auto; }
  .logo__text{ font-size: 26px; }
  .hero__title{ font-size: 34px; }
  .tile__txt{ font-size: 16px; }
  /* Mantener el navbar como en el mockup: 1 línea, sin wrap */
  .nav{ height: 52px; padding: 0 10px; gap:8px; overflow:hidden; }
  .nav__item{ font-size: 12px; padding: 10px 10px; }
  .btnLogin{ height: 38px; padding: 0 12px; }
  .ctaTop{ height: 38px; padding: 0 12px; }
}

/* Safe-area (Android/iOS) para que no se pegue a la barra del navegador */
.logo{
  top: calc(env(safe-area-inset-top, 0px) + 18px);
}
.nav{
  top: calc(env(safe-area-inset-top, 0px) + 78px);
}
