/* ==========================================================================
   RESET · ELEMENTS · LAYOUT PRIMITIVES · UTILITIES
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(255, 107, 44, 0.16);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-feature-settings: 'ss01' 1, 'cv05' 1, 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100svh;
}

body.is-locked { overflow: hidden; }

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }

/* Default icon size. Without this an inline SVG with no intrinsic dimensions
   expands to fill its container. Component classes override it. */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

/* No double-tap-to-zoom delay on controls. */
a, button, label, summary, input, select, textarea { touch-action: manipulation; }

ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-head);
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection {
  background: var(--c-accent);
  color: var(--c-accent-ink);
}

/* --- Focus ---------------------------------------------------------------
   Visible, high-contrast, and never removed. */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

/* --- Scrollbar ----------------------------------------------------------- */
@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--c-void); }
  ::-webkit-scrollbar-thumb {
    background: var(--c-surface-3);
    border: 2px solid var(--c-void);
    border-radius: var(--r-pill);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--c-text-faint); }
}
html { scrollbar-color: var(--c-surface-3) var(--c-void); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.section {
  position: relative;
  padding-block: var(--section-y);
  border-top: 1px solid var(--c-line-soft);
}

.section--raised { background: var(--c-bg-raised); }
.section--void   { background: var(--c-void); }
.section--flush  { border-top: 0; }

/* Section header block: eyebrow index + title + lead */
.section-head {
  display: grid;
  gap: var(--s-5);
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 5rem);
}

.section-head__title {
  font-size: var(--t-h2);
  max-width: 20ch;
}

.section-head__lead {
  font-size: var(--t-lead);
  color: var(--c-text-muted);
  max-width: 56ch;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: end;
    column-gap: var(--s-9);
  }
  .section-head--split .section-head__eyebrow { grid-column: 1 / -1; }
  .section-head--split .section-head__lead { padding-bottom: 0.35rem; }
}

/* --- Eyebrow: "03 / SERVICIOS" ------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--ls-tech);
  text-transform: uppercase;
  color: var(--c-text-dim);
}

.eyebrow__index { color: var(--c-accent); }

.eyebrow__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--c-line-strong), transparent);
  max-width: 220px;
}

.eyebrow--accent { color: var(--c-accent); }

/* --- Technical grid overlay ---------------------------------------------- */
.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grid);
  background-image:
    linear-gradient(to right, var(--c-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--c-grid) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
}

.grid-overlay--fine { background-size: 32px 32px; }

/* Vertical rule columns used as a background structure device */
.rules {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grid);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.rules span {
  border-left: 1px solid var(--c-line-soft);
}
.rules span:first-child { border-left-color: transparent; }

/* Four spans in a two-column grid wrap onto a second row, which put a rule
   straight through the copy. On phones the device is dropped instead. */
@media (max-width: 720px) {
  .rules { display: none; }
}

/* ==========================================================================
   TYPOGRAPHY UTILITIES
   ========================================================================== */

.mono {
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--ls-tech);
  text-transform: uppercase;
}

.tech-label {
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--ls-tech);
  text-transform: uppercase;
  color: var(--c-text-dim);
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--c-text-muted);
}

.muted { color: var(--c-text-muted); }
.dim   { color: var(--c-text-dim); }
.accent { color: var(--c-accent); }

.text-balance { text-wrap: balance; }

/* Placeholder values such as [ACCURACY] read as configuration, not as data. */
.placeholder {
  font-family: var(--f-mono);
  color: var(--c-text-dim);
  letter-spacing: 0.04em;
  border-bottom: 1px dashed var(--c-line-strong);
  padding-bottom: 1px;
}

/* ==========================================================================
   A11Y UTILITIES
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -110%);
  z-index: calc(var(--z-modal) + 1);
  padding: 0.75rem 1.25rem;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: transform var(--d-fast) var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* Content shown only when JS never boots. */
.no-js-only { display: none; }
html.no-js .no-js-only { display: block; }
html.no-js .js-only { display: none !important; }
