/* ==========================================================================
   Volterom · IT Solutions — landing "Órbita"
   Valores tomados del mockup aprobado (context/referencia-diseno/Glass5.dc.html)
   ========================================================================== */

/* ---------- Tipografías (self-hosted, variables, subset latino; licencia SIL OFL 1.1) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --grafito: #14171C;
  --hueso: #F4F4F1;
  --lima: #C8F031;
  --acero: #5B6270;

  /* Texto sobre oscuro */
  --ink-nav: #D7DAE0;
  --ink-soft: #C3C7CF;
  --ink-muted: #B5BAC3;
  --ink-footer: #9BA1AC;

  /* Vidrio y líneas (hueso con alfa) */
  --glass-bg: rgba(244, 244, 241, 0.06);
  --glass-border: rgba(244, 244, 241, 0.16);
  --card-bg: rgba(244, 244, 241, 0.04);
  --card-border: rgba(244, 244, 241, 0.12);
  --line: rgba(244, 244, 241, 0.1);
  --line-panel: rgba(244, 244, 241, 0.12);

  /* Tipografía */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-gap: 104px;

  /* Radios */
  --r-btn: 10px;
  --r-btn-lg: 12px;
  --r-chip: 14px;
  --r-card: 20px;
  --r-cta: 28px;

  /* Movimiento */
  --t-btn: 200ms;
  --t-card: 350ms;
  --orbit-period: 48s;

  /* Órbita */
  --stage: 540px;
  --orbit-radius: 230px;
  --stage-scale: 1;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--grafito);
  color: var(--hueso);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: var(--lima);
}

a:hover {
  color: var(--hueso);
}

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

[id] {
  scroll-margin-top: 24px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: var(--lima);
  color: var(--grafito);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  color: var(--grafito);
}

.container {
  position: relative;
  /* 1240 px de contenido + gutter, igual que el mockup (content-box) */
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  transition: background-color var(--t-btn) ease, color var(--t-btn) ease, transform var(--t-btn) ease;
}

/* Lima con texto grafito. En hover pasa a hueso (nunca texto claro sobre lima). */
.btn--lima {
  padding: 11px 18px;
  border-radius: var(--r-btn);
  background: var(--lima);
  color: var(--grafito);
}

.btn--lima:hover {
  background: var(--hueso);
  color: var(--grafito);
}

/* Grafito sobre la banda lima */
.btn--grafito {
  padding: 18px 28px;
  border-radius: var(--r-btn-lg);
  background: var(--grafito);
  color: var(--hueso);
  font-size: 17px;
}

.btn--grafito:hover {
  background: #262B33;
  color: var(--hueso);
}

.btn--grafito:focus-visible {
  outline-color: var(--grafito);
}

/* ---------- Nav ---------- */
.nav {
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--hueso);
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
}

.nav__link {
  text-decoration: none;
  color: var(--ink-nav);
  transition: color var(--t-btn) ease;
}

.nav__link:hover {
  color: var(--lima);
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 var(--section-gap);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}

.hero__copy {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.accent {
  color: var(--lima);
}

.hero__lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 480px;
}

/* Panel de vidrio con el servicio seleccionado */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: var(--r-card);
}

.panel {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}

.panel__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--lima);
}

.panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
}

.panel__desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.panel__example {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hueso);
  padding-top: 12px;
  border-top: 1px solid var(--line-panel);
}

.panel__example strong {
  color: var(--lima);
  font-weight: 600;
}

/* ---------- Órbita ---------- */
.hero__orbit {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

/* El wrapper ocupa el tamaño ya escalado, así no genera scroll horizontal */
.stagewrap {
  flex: none;
  width: calc(var(--stage) * var(--stage-scale));
  height: calc(var(--stage) * var(--stage-scale));
}

.stage {
  position: relative;
  width: var(--stage);
  height: var(--stage);
  margin: 0;
  padding: 0;
  border: 0;
  transform: scale(var(--stage-scale));
  transform-origin: left top;
}

.stage__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  background: var(--lima);
  filter: blur(80px);
  opacity: 0.35;
}

.stage__ring {
  position: absolute;
  border-radius: 50%;
}

.stage__ring--outer {
  inset: 40px;
  border: 1px dashed rgba(244, 244, 241, 0.22);
}

.stage__ring--inner {
  inset: 150px;
  border: 1px solid var(--line);
}

.stage__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 244, 241, 0.1);
  border: 1px solid rgba(244, 244, 241, 0.25);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* Punto de 0×0 en el centro: al rotar no genera una caja más ancha que el escenario */
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Cada chip se ubica con rotate(a) translate(r) rotate(-a); a = i·72° − 90° */
.orbit__slot {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: rotate(var(--a)) translate(var(--orbit-radius)) rotate(calc(var(--a) * -1));
}

.orbit__slot:nth-child(1) { --a: -90deg; }
.orbit__slot:nth-child(2) { --a: -18deg; }
.orbit__slot:nth-child(3) { --a: 54deg; }
.orbit__slot:nth-child(4) { --a: 126deg; }
.orbit__slot:nth-child(5) { --a: 198deg; }

.orbit__upright {
  position: absolute;
  left: -76px;
  top: -26px;
  width: 152px;
}

.chip {
  width: 152px;
  min-height: 52px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: var(--r-chip);
  padding: 10px 12px;
  color: var(--hueso);
  background: rgba(244, 244, 241, 0.08);
  border: 1px solid rgba(244, 244, 241, 0.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: background-color 250ms ease, color 250ms ease, transform 250ms ease;
  -webkit-tap-highlight-color: transparent;
}

.chip:hover {
  transform: scale(1.06);
}

.chip[aria-pressed="true"] {
  background: var(--lima);
  color: var(--grafito);
}

.chip:focus-visible {
  outline: 2px solid var(--hueso);
  outline-offset: 3px;
  border-radius: var(--r-chip);
}

/* Animaciones: solo si el usuario no pidió reducir movimiento */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  to { transform: rotate(-360deg); }
}

@keyframes pulse {
  from { opacity: 0.35; transform: scale(1); }
  to { opacity: 0.6; transform: scale(1.08); }
}

@media (prefers-reduced-motion: no-preference) {
  .orbit {
    animation: spin var(--orbit-period) linear infinite;
  }

  .orbit__upright {
    animation: spin-reverse var(--orbit-period) linear infinite;
  }

  .stage__glow {
    animation: pulse 3.5s ease-in-out infinite alternate;
  }

  .stage:hover .orbit,
  .stage:hover .orbit__upright,
  .stage:focus-within .orbit,
  .stage:focus-within .orbit__upright {
    animation-play-state: paused;
  }
}

/* ---------- Cómo trabajamos ---------- */
.steps {
  border-top: 1px solid var(--line);
}

.steps__grid {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 0;
  margin-bottom: 0;
  list-style: none;
}

.step {
  border-radius: var(--r-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: border-color var(--t-card) ease, background-color var(--t-card) ease;
}

.step:hover {
  border-color: var(--glass-border);
  background: var(--glass-bg);
}

.step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.2;
  color: var(--lima);
}

.step__title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.step__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* ---------- CTA lima ---------- */
.cta {
  padding-bottom: var(--section-gap);
}

.cta__box {
  border-radius: var(--r-cta);
  padding: clamp(32px, 6vw, 72px);
  background: var(--lima);
  color: var(--grafito);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1;
  max-width: 680px;
}

.cta__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cta__mail {
  color: var(--grafito);
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta__mail:hover {
  color: var(--grafito);
  text-decoration-thickness: 2px;
}

.cta__mail:focus-visible {
  outline-color: var(--grafito);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
}

.footer__inner {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-footer);
}

.footer__inner p {
  margin: 0;
}

.footer a {
  color: var(--ink-footer);
  text-decoration: underline;
  text-decoration-color: rgba(155, 161, 172, 0.45);
  text-underline-offset: 3px;
  transition: color var(--t-btn) ease;
}

.footer a:hover {
  color: var(--lima);
}

/* ---------- Página 404 ---------- */
.notfound {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  padding: 56px 0 var(--section-gap);
}

.notfound__code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--lima);
}

/* ---------- Responsive ---------- */
/* Chrome infla el área de scroll de los chips al componer las dos rotaciones;
   main ocupa todo el ancho, así que clip solo recorta lo que queda fuera del viewport. */
main {
  overflow-x: clip;
}

/* Con chips, la órbita mide ~590 px: por debajo de 1152 px la columna no alcanza */
@media (max-width: 1151px) {
  :root {
    --stage-scale: 0.85;
  }
}

@media (max-width: 640px) {
  :root {
    --stage-scale: 0.62;
    --orbit-radius: 210px;
  }

  /* Chips más grandes dentro del escenario escalado: con scale(.54–.62)
     el texto de 14 px quedaría en ~8 px. Así queda en ~11–12 px reales. */
  .orbit__upright {
    left: -90px;
    top: -32px;
    width: 180px;
  }

  .chip {
    width: 180px;
    min-height: 64px;
    font-size: 20px;
    border-radius: 18px;
  }

  .hero {
    padding-top: 32px;
  }

  .cta__box {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta__actions {
    align-items: flex-start;
  }
}

/* Con los chips, la órbita mide ~600 px de ancho: a 360 px hay que achicar más */
@media (max-width: 420px) {
  :root {
    --stage-scale: 0.54;
  }

  .hero__lead {
    font-size: 17px;
  }

  .btn--grafito {
    padding: 16px 22px;
    font-size: 16px;
  }
}
