/* ==========================================================================
   VANTAR Dynamics — Components
   Glass cards, buttons, bottom nav, modals, tool panels, gauges, charts.
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 13px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), opacity var(--dur) var(--ease);
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  color: #0d0d0f;
  background: var(--yellow);
  border: 1px solid var(--yellow);
  box-shadow: 0 4px 14px -4px rgba(212, 154, 23, 0.4);
}
.btn-primary:hover { background: #b88310; border-color: #b88310; }

.btn-ghost {
  color: var(--ink);
  background: var(--glass-bg-2);
  border: 1px solid var(--hairline-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-soft {
  color: var(--ink);
  background: var(--cream-3);
  border: 1px solid var(--hairline);
}

.btn-sm { padding: 9px 16px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn-icon {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--glass-bg-2); border: 1px solid var(--hairline-2);
}

/* --- Glass card --------------------------------------------------------- */
.card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  overflow: hidden;
}
.card-pad { padding: var(--s-5); }

/* --- Section heading ---------------------------------------------------- */
.sec-head { margin: var(--s-8) 0 var(--s-5); }
.sec-head .eyebrow { display: block; margin-bottom: var(--s-2); }

/* --- Portfolio grid ----------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 460px) { .grid { grid-template-columns: 1fr 1fr; } }

.proj {
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  padding: 0;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.proj:active { transform: scale(0.98); }
.proj-cover {
  height: 116px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.proj-cover svg { width: 100%; height: 100%; }
.proj-body { padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.proj-tag {
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange);
}
.proj-title { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.1; }
.proj-desc { font-size: 0.82rem; color: var(--ink-faint); line-height: 1.4; }
.proj-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--ink-soft); }

/* --- Modal -------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal.is-open { display: flex; }
.modal-scrim {
  position: absolute; inset: 0;
  background: rgba(26, 22, 19, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade var(--dur) var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border: 1px solid var(--glass-brd);
  box-shadow: 0 -10px 50px -10px rgba(59, 13, 107, 0.3);
  padding: var(--s-5) var(--s-5) calc(var(--s-7) + var(--safe-b));
  animation: sheetUp var(--dur-slow) var(--ease);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-grip {
  width: 42px; height: 5px; border-radius: 999px;
  background: var(--hairline-2); margin: 0 auto var(--s-4);
}
.modal-close {
  position: absolute; top: var(--s-4); right: var(--s-4);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--cream-3); display: grid; place-items: center; font-size: 1.1rem;
}
.modal-cover { height: 200px; border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--s-5); }
.modal-cover svg { width: 100%; height: 100%; }
.spec-list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.spec-list li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: 0.9rem; }
.spec-list .k { color: var(--ink-faint); min-width: 116px; font-size: 0.8rem; letter-spacing: 0.02em; }
.spec-list .v { color: var(--ink); font-weight: 500; }
.chiprow { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.chip {
  font-size: 0.72rem; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--cream-2); border: 1px solid var(--hairline); color: var(--ink-soft);
}

/* --- Bottom navigation -------------------------------------------------- */
.bottomnav {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s-4) + var(--safe-b));
  transform: translateX(-50%);
  z-index: 50;
  width: min(calc(100% - 24px), 620px);
  height: var(--nav-h);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr); /* columnas iguales */
  align-items: center;
  background: rgba(21, 21, 24, 0.94);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-pill);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  padding: 0 6px;
}
.navbtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; border-radius: var(--r-lg);
  color: var(--ink-faint);
  transition: color var(--dur) var(--ease);
}
.navbtn svg { width: 22px; height: 22px; stroke-width: 1.7; }
.navbtn span { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
@media (min-width: 700px) { .navbtn span { font-size: 0.7rem; } }
.navbtn.is-active { color: var(--ink); }
.navbtn.is-active svg { stroke: var(--yellow); }
.navbtn.is-active span { color: var(--ink); }

/* --- Toolbox grid ------------------------------------------------------- */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.toolcard {
  text-align: left;
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-4);
  min-height: 132px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.toolcard:active { transform: scale(0.97); }
.toolcard .ic {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad-accent); color: #fff;
}
.toolcard .ic svg { width: 22px; height: 22px; stroke-width: 1.8; }
.toolcard .tc-title { font-family: var(--font-serif); font-size: 1.02rem; line-height: 1.1; }
.toolcard .tc-sub { font-size: 0.74rem; color: var(--ink-faint); line-height: 1.35; margin-top: auto; }

/* --- Tool panel (full view inside toolbox) ------------------------------ */
.toolview { display: none; }
.toolview.is-active { display: block; animation: viewIn var(--dur) var(--ease); }
.tool-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
  margin-bottom: var(--s-4);
}
.tool-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-5); }
.tool-head .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-accent); color: #fff; flex: none; }
.tool-head .ic svg { width: 24px; height: 24px; stroke-width: 1.8; }
.tool-head h2 { font-size: 1.5rem; }
.tool-head p { font-size: 0.8rem; color: var(--ink-faint); }

.controls { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-4); }

/* --- Readouts / gauges -------------------------------------------------- */
.readout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.readout {
  background: var(--cream-2); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: var(--s-3); text-align: center;
}
.readout .lbl { font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.readout .val { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }
.readout.x .val { color: var(--axis-x); }
.readout.y .val { color: var(--axis-y); }
.readout.z .val { color: var(--axis-z); }

.bigval {
  font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 17vw, 4.2rem); line-height: 1; letter-spacing: -0.02em;
}
.bigval .unit { font-size: 0.32em; color: var(--ink-faint); margin-left: 6px; letter-spacing: 0; }

.bar {
  height: 12px; border-radius: 999px; background: var(--cream-3);
  overflow: hidden; border: 1px solid var(--hairline); margin-top: var(--s-3);
}
.bar > i { display: block; height: 100%; width: 0%; border-radius: 999px;
  background: var(--grad-accent); transition: width 90ms linear; }

.scale { display: flex; justify-content: space-between; font-size: 0.64rem; color: var(--ink-faint); margin-top: 6px; }

/* Canvas chart frame */
.canvas-wrap {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(180deg, #fffdfa, #f6f1e9);
  border: 1px solid var(--hairline);
  margin-top: var(--s-4);
}
.canvas-wrap canvas { width: 100%; display: block; }
.legend { display: flex; gap: var(--s-4); margin-top: var(--s-3); font-size: 0.74rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Status pill */
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.74rem; font-weight: 600; color: var(--ink-soft);
  padding: 5px 12px; border-radius: 999px; background: var(--cream-2); border: 1px solid var(--hairline);
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.status.live .dot { background: var(--bad); animation: pulse 1.2s ease-in-out infinite; }
.status.ok .dot { background: var(--good); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.note { font-size: 0.78rem; color: var(--ink-faint); line-height: 1.5; }
.warnbox {
  font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5;
  background: rgba(232, 163, 61, 0.12); border: 1px solid rgba(232, 163, 61, 0.35);
  border-radius: var(--r-md); padding: var(--s-3) var(--s-4);
}

/* --- Inclinometer bubble ----------------------------------------------- */
.level {
  position: relative; width: 230px; height: 230px; margin: var(--s-4) auto;
  border-radius: 50%; background: radial-gradient(circle, var(--cream-2), #111113);
  border: 1px solid var(--hairline-2);
  box-shadow: inset 0 4px 18px rgba(0,0,0,0.5);
}
.level .ring { position: absolute; border: 1px solid var(--hairline); border-radius: 50%; inset: 50% auto auto 50%; transform: translate(-50%,-50%); }
.level .cross-h, .level .cross-v { position: absolute; background: var(--hairline); }
.level .cross-h { left: 8%; right: 8%; top: 50%; height: 1px; }
.level .cross-v { top: 8%; bottom: 8%; left: 50%; width: 1px; }
.level .bubble {
  position: absolute; width: 54px; height: 54px; border-radius: 50%;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: radial-gradient(circle at 35% 30%, var(--yellow), #9b6c0b);
  box-shadow: 0 6px 16px -4px rgba(212, 154, 23, 0.4);
  transition: left 80ms linear, top 80ms linear, background 200ms;
}
.level .bubble.centered {
  background: radial-gradient(circle at 35% 30%, #5fd39c, var(--good));
  box-shadow: 0 6px 16px -4px rgba(47, 158, 111, 0.4);
}
.level .target { position: absolute; width: 60px; height: 60px; border: 2px dashed var(--hairline-2); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }

/* --- Contact / form ----------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  background: var(--paper); border: 1px solid var(--hairline-2); border-radius: var(--r-md);
  padding: 13px 14px; font-size: 0.92rem; transition: border var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.field textarea { resize: vertical; min-height: 110px; }

.social { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-4); }
.social a {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  font-size: 0.86rem; font-weight: 600;
  transition: transform var(--dur) var(--ease);
}
.social a:active { transform: scale(0.97); }
.social svg { width: 20px; height: 20px; }

.formok {
  margin-top: var(--s-4); padding: var(--s-4);
  background: rgba(47, 158, 111, 0.1); border: 1px solid rgba(47,158,111,0.3);
  border-radius: var(--r-md); font-size: 0.86rem; color: #6fdca8;
}
.formerr {
  margin-top: var(--s-4); padding: var(--s-4);
  background: rgba(220, 70, 60, 0.1); border: 1px solid rgba(220,70,60,0.35);
  border-radius: var(--r-md); font-size: 0.86rem; color: #ff9b91;
}
.formerr a { color: inherit; text-decoration: underline; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Footer ------------------------------------------------------------- */
.foot { padding: var(--s-7) var(--s-5) var(--s-5); text-align: center; color: var(--ink-faint); font-size: 0.74rem; }
.foot b { color: var(--ink-soft); }

/* --- Permission overlay ------------------------------------------------- */
.perm {
  position: fixed; inset: 0; z-index: 70; display: none;
  align-items: center; justify-content: center; padding: var(--s-5);
}
.perm.is-open { display: flex; }
.perm-card {
  position: relative; width: 100%; max-width: 400px; text-align: center;
  background: var(--paper); border-radius: var(--r-xl); padding: var(--s-6) var(--s-5);
  border: 1px solid var(--glass-brd); box-shadow: 0 20px 60px -16px rgba(59,13,107,0.4);
  animation: sheetUp var(--dur) var(--ease);
}
.perm-card .ic { width: 64px; height: 64px; margin: 0 auto var(--s-4); border-radius: 18px;
  display: grid; place-items: center; background: var(--grad-accent); color: #fff; }
.perm-card .ic svg { width: 32px; height: 32px; }

/* --- Services, products, confidentiality (contenido real 2026-09) ------ */
.svc { display: flex; flex-direction: column; gap: var(--s-2); }
.svc-num { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; color: var(--yellow); }
.svc h3, .prod-link h3 { font-size: 1.08rem; }
.svc p, .prod-link p { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }
.pill {
  align-self: flex-start; display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--yellow); border: 1px solid rgba(212, 154, 23, 0.45);
}
.prod-link { display: flex; flex-direction: column; gap: var(--s-2); text-align: left; color: var(--ink); cursor: pointer; }
.prod-link:active { transform: scale(0.98); }
.prod-detail { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-4); }
.prod-name { font-size: 1.7rem; letter-spacing: -0.02em; }
.confid { border-left: 3px solid var(--yellow); }
.confid p { color: var(--ink-soft); line-height: 1.6; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* --- Argentina: la bandera es el único lugar donde aparecen sus colores --- */
.flag { width: 24px; height: 16px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px var(--hairline-2); vertical-align: middle; }
.flag-nav { width: 21px; height: 14px; margin-left: 4px; }
.eyebrow-ar { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-ar .flag { width: 21px; height: 14px; }
.badge-ar { display: inline-flex; align-items: center; gap: 8px; }
.badge-ar .flag { width: 18px; height: 12px; }
.nac { display: flex; flex-direction: column; gap: var(--s-4); }
.nac-flag .flag { width: 54px; height: 36px; border-radius: 3px; }
.nac-list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.nac-list li { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.55; padding-left: var(--s-4); border-left: 2px solid var(--hairline-2); }
.nac-list b { color: var(--ink); font-weight: 600; }
.foot-ar { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.foot-ar .flag { width: 18px; height: 12px; }
@media (min-width: 1024px) {
  .nac { flex-direction: row; align-items: flex-start; gap: var(--s-6); }
  .nac-list { grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-6); }
}

/* --- Quiénes somos --- */
.about p { color: var(--ink-soft); line-height: 1.7; max-width: 65ch; }
.about p:first-child { color: var(--ink); }

/* Logo en la barra inferior: solo en páginas internas (en la portada ya está grande) */
.nav-logo svg { width: 26px; height: 28px; stroke: none; }
.nav-logo.is-active svg { stroke: none; }
body[data-vista="home"] .nav-logo { display: none; }
@media (max-width: 419px) {
  .navbtn span { white-space: normal; text-align: center; line-height: 1.15; }
}

/* Velo bajo la barra inferior: el contenido se funde en el fondo antes de pasar por detrás */
.nav-velo {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + var(--s-4) + var(--safe-b) + 64px);
  z-index: 49;
  pointer-events: none;
  background: linear-gradient(to top, var(--cream) 0%, var(--cream) 42%, rgba(13, 13, 15, 0.85) 62%, rgba(13, 13, 15, 0) 100%);
}

/* --- Servicios como lista técnica (sin tarjetas numeradas) --- */
.svc-bloque { display: grid; gap: var(--s-6); }
.svc-lista { list-style: none; padding: 0; margin: 0; }
.svc-fila { display: grid; grid-template-columns: 34px 1fr; gap: var(--s-4); padding: var(--s-5) 0; border-top: 1px solid var(--hairline-2); }
.svc-fila:last-child { border-bottom: 1px solid var(--hairline-2); }
.svc-ico { width: 30px; height: 30px; color: var(--yellow); margin-top: 2px; }
.svc-fila h3 { font-size: 1.12rem; }
.svc-fila p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; margin-top: 6px; max-width: 60ch; }
@media (min-width: 1024px) {
  .svc-bloque { grid-template-columns: 1.1fr 0.9fr; align-items: start; gap: var(--s-7); }
  .svc-bloque .lamina { position: sticky; top: 110px; }
}

/* --- Láminas: dibujos técnicos propios --- */
.lamina { margin: 0; padding: var(--s-4); border: 1px solid var(--hairline-2); border-radius: var(--r-md); background: rgba(13, 13, 15, 0.6); }
.lamina-dibujo { width: 100%; height: auto; display: block; }
.lamina figcaption { margin-top: var(--s-3); font-size: 0.78rem; color: var(--ink-faint); line-height: 1.4; }
.prod-detail .lamina { margin-block: var(--s-2); }
