/* ==========================================================================
   Managua Networks
   Design tokens, one radius scale (controls 10px, surfaces 16px), one accent.
   ========================================================================== */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #e9eef4;
  --ink: #0f1722;
  --text: #3a4755;
  --muted: #5b6875;
  --line: #d6dee7;

  --brand: #5988ff;
  --brand-deep: #2f5ee0;
  --slate: #677987;
  --logo-blue: #5988ff;
  --logo-slate: #677987;
  --accent: #2c5ef0;
  --accent-ink: #ffffff;
  --deep: #0f1722;
  --deep-text: #c9d3de;

  --slab-top: #ffffff;
  --slab-left: #dbe3ec;
  --slab-right: #c6d1dd;
  --slab-stroke: #c3cedb;

  --radius-control: 10px;
  --radius-surface: 16px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --font: "Ubuntu", system-ui, sans-serif;
  --font-mono: "Ubuntu Mono", ui-monospace, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;

  --error: #c2362b;

  color-scheme: light;
}

/* Dark tokens: follow the system unless the visitor picked light,
   or apply directly when the visitor picked dark (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1017;
    --surface: #111922;
    --surface-2: #17212c;
    --ink: #eef2f7;
    --text: #b4c0cc;
    --muted: #8e9aa7;
    --line: #233040;

    --brand: #6f97ff;
    --brand-deep: #3e67d6;
    --slate: #93a4b3;
    --logo-slate: #8fa1af;
    --accent: #7ea2ff;
    --accent-ink: #0b1017;
    --deep: #182638;
    --deep-text: #b9c6d4;

    --slab-top: #1a2430;
    --slab-left: #121a24;
    --slab-right: #0e151d;
    --slab-stroke: #2a3847;

    --error: #ff8a80;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1017;
  --surface: #111922;
  --surface-2: #17212c;
  --ink: #eef2f7;
  --text: #b4c0cc;
  --muted: #8e9aa7;
  --line: #233040;

  --brand: #6f97ff;
  --brand-deep: #3e67d6;
  --slate: #93a4b3;
  --logo-slate: #8fa1af;
  --accent: #7ea2ff;
  --accent-ink: #0b1017;
  --deep: #182638;
  --deep-text: #b9c6d4;

  --slab-top: #1a2430;
  --slab-left: #121a24;
  --slab-right: #0e151d;
  --slab-stroke: #2a3847;

  --error: #ff8a80;

  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-control);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 500;
  font-size: 1rem;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn i { font-size: 1.15em; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-deep); color: #fff; }
  .btn-ghost:hover { border-color: var(--ink); }
  .btn-primary:hover .ph-arrow-right { transform: translateX(3px); }
}
.btn .ph-arrow-right { transition: transform 200ms var(--ease-out); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

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

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand svg { height: 40px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
}
.nav-cta { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  display: inline-flex;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: transparent;
  font-size: 1.25rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.icon-btn:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { border-color: var(--ink); }
}

/* Theme toggle: moon in light mode, sun in dark mode, crossfaded in place */
.theme-toggle i {
  position: absolute;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.theme-toggle .ph-sun { opacity: 0; transform: rotate(-45deg) scale(0.8); }
:root[data-theme="dark"] .theme-toggle .ph-moon { opacity: 0; transform: rotate(45deg) scale(0.8); }
:root[data-theme="dark"] .theme-toggle .ph-sun { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ph-moon { opacity: 0; transform: rotate(45deg) scale(0.8); }
  :root:not([data-theme="light"]) .theme-toggle .ph-sun { opacity: 1; transform: none; }
}

.nav-toggle { display: none; font-size: 1.35rem; }
.nav-toggle .ph-x { display: none; }
.nav-toggle[aria-expanded="true"] .ph-x { display: block; }
.nav-toggle[aria-expanded="true"] .ph-list { display: none; }

/* Logo tokens (inline SVG follows the theme) */
.lg-blue { fill: var(--logo-blue); }
.lg-slate { fill: var(--logo-slate); }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
}

.hero h1 {
  font-size: clamp(2.5rem, 4.3vw, 3.375rem); /* max keeps "Del cable a la aplicación," on one line in the 1240px wrap */
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.hero h1 span { display: block; color: var(--accent); }

.hero-lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  max-width: 34ch;
  margin-bottom: 36px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero entrance */
.hero-copy > * {
  animation: rise 700ms var(--ease-out) both;
}
.hero-copy > :nth-child(2) { animation-delay: 70ms; }
.hero-copy > :nth-child(3) { animation-delay: 140ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

/* ---------- Isometric stack ---------- */

.stack { width: 100%; max-width: 640px; margin-inline: auto; }
.stack text {
  font-family: var(--font);
  font-size: 19px;
  font-weight: 500;
  fill: var(--muted);
  transition: fill 200ms ease;
}
.stack .lead-line { stroke: var(--line); stroke-width: 1.5; }
.stack .top { fill: var(--slab-top); }
.stack .left { fill: var(--slab-left); }
.stack .right { fill: var(--slab-right); }
.stack .top, .stack .left, .stack .right {
  stroke: var(--slab-stroke);
  stroke-width: 1;
  stroke-linejoin: round;
  transition: fill 220ms ease;
}

.layer-drop {
  animation: drop 800ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 90ms + 200ms);
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-36px); }
}

.slab { transition: transform 260ms var(--ease-out); }

/* Active layer mirrors the logo: blue top, deep-blue and slate faces */
.layer.is-active .top,
.layer:hover .top { fill: var(--brand); stroke: var(--brand); }
.layer.is-active .left,
.layer:hover .left { fill: var(--brand-deep); stroke: var(--brand-deep); }
.layer.is-active .right,
.layer:hover .right { fill: var(--slate); stroke: var(--slate); }
.layer.is-active text,
.layer:hover text { fill: var(--ink); }
.layer.is-active .lead-line,
.layer:hover .lead-line { stroke: var(--brand); }

.stack:has(.layer:hover) .layer.is-active:not(:hover) .top { fill: var(--slab-top); stroke: var(--slab-stroke); }
.stack:has(.layer:hover) .layer.is-active:not(:hover) .left { fill: var(--slab-left); stroke: var(--slab-stroke); }
.stack:has(.layer:hover) .layer.is-active:not(:hover) .right { fill: var(--slab-right); stroke: var(--slab-stroke); }
.stack:has(.layer:hover) .layer.is-active:not(:hover) text { fill: var(--muted); }
.stack:has(.layer:hover) .layer.is-active:not(:hover) .lead-line { stroke: var(--line); }

@media (hover: hover) and (pointer: fine) {
  .layer:hover .slab { transform: translateY(-10px); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 128px) 0; }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin-bottom: 16px; }
.section-head p { max-width: 52ch; }

/* ---------- Services bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.cell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 240px;
  padding: clamp(24px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}
.cell > i { font-size: 2rem; color: var(--accent); }
.cell h3 { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 10px; }
.cell p { font-size: 1rem; max-width: 44ch; }

.c-sec { grid-column: span 4; min-height: 300px; }
.c-net { grid-column: span 2; }
.c-voip { grid-column: span 2; }
.c-support { grid-column: span 4; }
.c-consult { grid-column: span 2; }
.c-pos { grid-column: span 4; }

/* Isometric lattice, the same 30 degree grid the logo is drawn on */
.c-sec::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(30deg, var(--line) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(150deg, var(--line) 0 1px, transparent 1px 32px);
  -webkit-mask-image: linear-gradient(115deg, transparent 30%, #000 85%);
  mask-image: linear-gradient(115deg, transparent 30%, #000 85%);
}

.c-net { background: var(--accent); border-color: var(--accent); }
.c-net h3, .c-net p, .c-net > i { color: var(--accent-ink); }

/* Point of sale teaser: horizontal on wide screens, links to its own section */
/* Support: tinted surface, so the row has visual variation next to the plain VoIP cell */
.c-support { background: var(--surface-2); border-color: var(--surface-2); }
.cell-note { margin-top: 12px; font-size: 0.875rem; font-weight: 500; color: var(--accent); }

/* Point of sale teaser: deep surface, links to its own page */
.c-pos { background: var(--deep); border-color: var(--deep); }
.c-pos h3 { color: #f2f5f9; }
.c-pos p { color: var(--deep-text); }
.c-pos > i { color: #9db8ff; }
.c-pos .cell-link { margin-top: 16px; }

.cell-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 500;
  color: #f2f5f9;
  border-bottom: 1px solid rgba(242, 245, 249, 0.35);
  transition: border-color 200ms ease;
}
.cell-link i { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .cell-link:hover { border-bottom-color: #f2f5f9; }
  .cell-link:hover i { transform: translateX(3px); }
}

/* ---------- Brands ---------- */

.brands { border-block: 1px solid var(--line); padding: 28px 0; }
.brands-inner { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.brands-title {
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.brands-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 20px; color: var(--text); }

/* Partner logos in one color: the SVG is a mask, the fill follows the theme */
.brand-logo {
  display: block;
  height: var(--h);
  aspect-ratio: var(--ratio);
  background-color: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
/* Paths live here, not inline: url() inside a custom property resolves differently across browsers */
.brand-logo--unifi { --logo: url(../assets/brands/unifi.svg); }
.brand-logo--pfsense { --logo: url(../assets/brands/pfsense.svg); }
.brand-logo--hikvision { --logo: url(../assets/brands/hikvision.svg); }
.brand-logo--came { --logo: url(../assets/brands/came.svg); }
.brand-logo--dell { --logo: url(../assets/brands/dell.svg); }
.brand-logo--grandstream { --logo: url(../assets/brands/grandstream.svg); }
.brand-logo--panduit { --logo: url(../assets/brands/panduit.svg); }
.brand-logo--omada { --logo: url(../assets/brands/omada.png); }
.brand-logo--starlink { --logo: url(../assets/brands/starlink.svg); }
.brand-logo--uniview { --logo: url(../assets/brands/uniview.svg); }


/* ---------- Statement ---------- */

.statement { border-block: 1px solid var(--line); }
.statement-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.statement-text {
  font-size: clamp(1.75rem, 3.8vw, 3.25rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--muted);
  max-width: 24ch;
  text-wrap: balance;
}
.statement-text strong { color: var(--ink); font-weight: 500; }
.statement-note { margin-top: 28px; max-width: 46ch; }

/* The B mark as a blueprint: pieces in hairline, the node is the only solid */
.statement-mark { width: 100%; max-width: 360px; justify-self: end; overflow: visible; }
.sm-line {
  fill: none;
  stroke-width: 1.4; /* drawing units; about 1.5px at the rendered size */
  stroke-linejoin: round;
}
.sm-blue { stroke: var(--logo-blue); fill: color-mix(in srgb, var(--logo-blue) 16%, transparent); }
.sm-slate { stroke: var(--logo-slate); fill: color-mix(in srgb, var(--logo-slate) 16%, transparent); }
.sm-node { fill: var(--brand); }

/* Draws itself once on reveal: the network gets built, then the node lights up */
@media (prefers-reduced-motion: no-preference) {
  .js .statement-mark .sm-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    fill-opacity: 0;
    transition:
      stroke-dashoffset 1100ms var(--ease-in-out) calc(var(--i) * 180ms + 150ms),
      fill-opacity 600ms ease 1250ms;
  }
  .js .statement-mark.is-in .sm-line { stroke-dashoffset: 0; fill-opacity: 1; }
  .js .statement-mark .sm-node {
    opacity: 0;
    transform: scale(0.6);
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 400ms var(--ease-out) 1250ms, transform 400ms var(--ease-out) 1250ms;
  }
  .js .statement-mark.is-in .sm-node { opacity: 1; transform: none; }
}

/* ---------- Process ---------- */

.process-list { border-bottom: 1px solid var(--line); }
.process-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px 48px;
  align-items: center;
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
}
.process-row h3 {
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  font-weight: 300;
  letter-spacing: -0.045em;
}
.process-row p { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); max-width: 50ch; }

/* ---------- Projects ---------- */

/* Field photos in two rows sharing one height; captions are screen-reader only */
.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1.35fr);
  gap: 16px;
}
.project { margin: 0; display: grid; gap: 14px; align-content: start; }
.project img {
  display: block;
  width: 100%;
  height: clamp(380px, 42vw, 560px);
  object-fit: cover;
  border-radius: var(--radius-surface);
  background: var(--surface-2);
}
/* Keep the subject in frame when the photo is cropped to the tile */
.project--lead img { object-position: 50% 68%; }
.project--wide img { object-position: 57% 50%; } /* the tester sits right of center */
.project--staging img { object-position: 55% 55%; }
.project--rack img { object-position: 50% 50%; }
/* Second row mirrors the first: the wide photo spans the two narrower columns */
.project--span2 { grid-column: span 2; }
.project figcaption { font-size: 1rem; font-weight: 500; color: var(--ink); line-height: 1.4; }
.project figcaption span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
}

/* ---------- Point of sale ---------- */

.pos-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

/* E-invoicing is the differentiator, so it gets the only elevated card */
.ecf {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-surface);
}
.ecf > i { font-size: 2rem; color: var(--accent); }
.ecf h3 { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; margin: 20px 0 6px; }
.ecf > p { color: var(--muted); font-size: 1rem; }
.checks { display: grid; gap: 14px; margin-top: 24px; }
.checks li { display: flex; gap: 12px; font-size: 1rem; color: var(--ink); }
.checks i { flex-shrink: 0; margin-top: 3px; color: var(--accent); }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.feature { padding: 24px 0; border-top: 1px solid var(--line); }
.feature i { font-size: 1.5rem; color: var(--accent); }
.feature h3 { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; margin: 12px 0 6px; }
.feature p { font-size: 0.9375rem; }

.verticals { margin-top: clamp(48px, 7vw, 88px); }
.verticals h3 { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 16px; }
.verticals .sectors-list { font-size: clamp(1.25rem, 2.2vw, 1.875rem); }

.sectors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  font-size: clamp(1.375rem, 2.8vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--ink);
  max-width: 1000px;
}
.sectors-list li:not(:last-child)::after {
  content: "/";
  margin: 0 0.45em;
  color: var(--brand);
  font-weight: 300;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact-grid h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin-bottom: 16px; }

.channels { margin-top: 36px; display: grid; gap: 4px; }
.channels a,
.channels .channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-radius: var(--radius-control);
}
.channels i {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-control);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 1.25rem;
}
.channels span { display: block; font-size: 0.875rem; color: var(--muted); }
.channels strong { display: block; font-weight: 500; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .channels a:hover strong { color: var(--accent); }
}

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  padding: clamp(24px, 4vw, 40px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.form-hint { margin: -8px 0 0; font-size: 0.875rem; color: var(--muted); }

.field label { font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.field label small { font-weight: 400; color: var(--muted); font-size: 0.875rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { min-height: 132px; resize: vertical; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field ::placeholder { color: var(--muted); opacity: 1; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field-error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--error);
}
.field.has-error input,
.field.has-error textarea { border-color: var(--error); }
.field.has-error .field-error { display: flex; }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.form-note { font-size: 0.875rem; color: var(--muted); max-width: 36ch; }
.form-status {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--ink);
  font-size: 0.9375rem;
}
.form-status.is-visible { display: flex; }
.form-status i { color: var(--accent); font-size: 1.25rem; }
.form-status.is-error { background: color-mix(in srgb, var(--error) 12%, transparent); }
.form-status.is-error i { color: var(--error); }
.form-status a { color: inherit; font-weight: 500; }

/* Honeypot: kept in the DOM for bots, out of sight and reach for people */
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-top: 24px; min-height: 65px; }
.form .btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-grid .brand svg { height: 42px; }
.footer-grid p { margin-top: 16px; font-size: 0.9375rem; max-width: 34ch; }
.footer-grid h2 {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { font-size: 0.9375rem; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) {
  .footer-grid a:hover { color: var(--ink); }
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Point of sale page ---------- */

.nav-links a[aria-current="page"] { color: var(--ink); }

.pos-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.pos-more p { color: var(--muted); max-width: 52ch; }

.page-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
/* Stacked hero: copy on top, the product screenshot full width underneath so it stays legible */
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 5vw, 64px);
  align-items: end;
}
.page-hero-grid .hero-copy { display: contents; }
.page-hero-grid .eyebrow,
.page-hero-grid h1 { grid-column: 1; }
.page-hero-grid .hero-lead { grid-column: 2; grid-row: 2; margin-bottom: 0; }
.page-hero-grid .hero-cta { grid-column: 2; grid-row: 3; }
.page-hero-grid h1 { grid-row: 2 / span 2; margin-bottom: 0; }
.shot--hero { grid-column: 1 / -1; margin-top: clamp(24px, 4vw, 48px); }
.page-hero h1 {
  font-size: clamp(2.25rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.page-hero h1 span { color: var(--accent); }

/* Where it runs: a quiet list instead of a fake product screenshot */
.platforms {
  display: grid;
  gap: 4px;
  padding: 8px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}
.platforms li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 16px 0;
}
.platforms li + li { border-top: 1px solid var(--line); }
.platforms i { grid-row: span 2; font-size: 1.75rem; color: var(--accent); }
.platforms span { font-weight: 500; color: var(--ink); }
.platforms small { font-size: 0.875rem; color: var(--muted); }

.ecf-section { border-block: 1px solid var(--line); }
.ecf-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.ecf-grid h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 16px; }
.ecf-grid p { max-width: 46ch; }
.checks--grid { grid-template-columns: 1fr 1fr; gap: 20px 32px; margin-top: 0; }

.feature-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
}
.group { padding: 28px 0; border-top: 1px solid var(--line); }
.group > i { font-size: 1.5rem; color: var(--accent); }
.group h3 { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; margin: 12px 0 12px; }
.group ul { display: grid; gap: 8px; }
.group li { font-size: 0.9375rem; }

.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.verticals-title { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: 16px; }

.cta-band { border-top: 1px solid var(--line); }
.cta-inner { display: grid; justify-items: start; gap: 28px; }
.cta-inner h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); max-width: 22ch; }

/* Real product screenshots: framed like a window, shadow tinted to the page */
.shot { margin: 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -32px color-mix(in srgb, var(--ink) 45%, transparent);
}
.shot figcaption { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); }
.shot--wide { margin-bottom: clamp(40px, 6vw, 72px); }

.platforms-strip { padding-bottom: clamp(40px, 6vw, 72px); }
.platforms--row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 8px;
}
.platforms--row li { padding: 16px; }
.platforms--row li + li { border-top: 0; border-left: 1px solid var(--line); }

/* ---------- Scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion: keep fades, drop movement ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .layer-drop { animation-name: fade; }
  .js [data-reveal] { transform: none; transition: opacity 400ms ease; }
  .slab, .btn, .btn .ph-arrow-right, .icon-btn { transition: none; }
  .theme-toggle i { transform: none !important; transition: opacity 150ms ease; }
  .layer:hover .slab { transform: none; }
  .btn:active { transform: none; }
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Responsive ---------- */

/* Keep the hero headline on two lines on small desktops */
@media (min-width: 861px) and (max-width: 1180px) {
  .hero h1 { font-size: 3.4vw; }
}

/* Small phones (360 px): the Turnstile widget needs 300 px inside the form, so trim side padding */
@media (max-width: 380px) {
  .form { padding: 20px 12px; }
}

/* Full menu and the larger logo don't fit side by side below ~1024px: step the logo down */
@media (min-width: 861px) and (max-width: 1024px) {
  .site-header .brand svg { height: 34px; }
}

@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-sec, .c-support { grid-column: span 2; }
  .c-net, .c-voip, .c-consult, .c-pos { grid-column: span 1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  }
  .nav-links a { display: block; padding: 14px 0; font-size: 1.125rem; }
  .nav-links .btn { margin-top: 12px; display: flex; }

  .hero-grid { grid-template-columns: 1fr; }
  .stack { max-width: 520px; }

  .process-row { grid-template-columns: 1fr; gap: 12px; }
  .pos-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project--lead { grid-column: 1 / -1; }
  .project--span2 { grid-column: auto; }
  .project--lead img { height: clamp(320px, 60vw, 480px); }
  .page-hero-grid, .ecf-grid { grid-template-columns: 1fr; }
  .page-hero-grid .hero-lead, .page-hero-grid .hero-cta, .page-hero-grid h1 { grid-column: 1; grid-row: auto; }
  .platforms--row { grid-template-columns: 1fr 1fr; }
  .platforms--row li + li { border-left: 0; }
  .feature-groups { grid-template-columns: 1fr 1fr; }
  .ecf { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .statement-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .statement-mark { order: -1; justify-self: center; max-width: 160px; }
  .statement-text, .statement-note { margin-inline: auto; }
}

@media (min-width: 861px) {
  .nav-links .nav-mobile-cta { display: none; }
}

@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .c-sec, .c-net, .c-voip, .c-support, .c-consult, .c-pos { grid-column: auto; min-height: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project img, .project--lead img { height: auto; aspect-ratio: 4 / 5; }
  .checks--grid, .feature-groups, .platforms--row { grid-template-columns: 1fr; }
  .brands-title { text-align: center; }
  .brands-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .brands-list li:nth-last-child(-n + 2) { grid-column: 1 / -1; } /* Dell and Grandstream: own centered rows */
  .brands-list li { display: flex; justify-content: center; align-items: center; min-height: 40px; }
  .brand-logo { max-width: 100%; }
  .form-foot .btn { width: 100%; }
  .hero-cta .btn { flex: 1 1 100%; }
  .stack text { font-size: 20px; } /* longest label, "Seguridad electrónica", must fit the 660-unit viewBox */
  .site-header .brand svg { height: 30px; }
}
