/* IoT Consulting: plantilla "Inicio industrial" */

:root {
  --navy: #00263E;
  --navy-panel: #08344F;
  --navy-deep: #001A2C;
  --cyan: #4AC1E0;
  --orange: #FF9E18;
  --paper: #F3F6F8;
  --white: #FFFFFF;
  --ink: #0E2A3D;
  --muted: #4A6274;
  --line: #D3DDE4;
  --on-navy: #E6F1F6;
  --on-navy-muted: #A9C3D1;
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

body.iotc-home {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(.iotc-home) :where(h1, h2, h3) {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.005em;
}
:where(.iotc-home) :where(p) { margin: 0; }
:where(.iotc-home) :where(img) { max-width: 100%; height: auto; display: block; }
:where(.iotc-home) :where(a) { color: inherit; }
.iotc-home :focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }

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

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--orange); color: var(--navy); padding: 8px 14px; font-weight: 600;
}
.skip:focus { top: 8px; }

/* Encabezado */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); }
.site-head__in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { display: block; flex: none; }
.brand img { width: 209px; height: 36px; }

.nav { position: relative; }
.nav__toggle {
  list-style: none; cursor: pointer; font-weight: 500; color: var(--navy);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px;
}
.nav__toggle::-webkit-details-marker { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.97rem; }
.nav a:hover { color: #0A7FA0; }
.nav .current-menu-item > a { color: #0A7FA0; }

.nav--desk { display: none; }
.nav--desk ul { display: flex; gap: 28px; }
.nav--mobile[open] nav {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20;
  background: var(--white); border: 1px solid var(--line); border-radius: 6px;
  min-width: 220px; padding: 8px 0; box-shadow: 0 12px 28px rgba(0, 38, 62, 0.14);
}
.nav--mobile li a { display: block; padding: 10px 18px; }
@media (min-width: 900px) {
  .nav--desk { display: block; }
  .nav--mobile { display: none; }
}

/* Botones */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 13px 22px; border-radius: 4px; line-height: 1.2; border: 2px solid transparent;
}
.btn--primary { background: var(--orange); color: var(--navy) !important; }
.btn--primary:hover { background: #FFB24A; }
.btn--ghost { border-color: var(--cyan); color: var(--on-navy) !important; }
.btn--ghost:hover { background: rgba(74, 193, 224, 0.12); }

/* Hero */
.hero { background: var(--navy); color: var(--on-navy); }
.hero__in {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px);
}
.hero__kicker { color: var(--cyan); font-weight: 500; font-size: 0.98rem; margin-bottom: 18px; max-width: 34em; }
.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.85rem);
  line-height: 1.02; color: var(--white); max-width: 13em; letter-spacing: -0.012em;
}
.hero__lead { margin-top: 22px; font-size: clamp(1.08rem, 1.6vw, 1.22rem); max-width: 34em; color: var(--on-navy); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__cred { margin-top: 30px; font-size: 0.92rem; color: var(--on-navy-muted); max-width: 38em; }

.hero__chart {
  margin: 0; background: var(--navy-panel); border: 1px solid #184A68; border-radius: 6px;
  padding: 18px 16px 16px;
}
.hero__chart figcaption { margin-top: 10px; font-size: 0.86rem; color: var(--on-navy-muted); line-height: 1.5; }

@media (min-width: 960px) {
  .hero__in { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
}

/* Gráfico de tendencia */
.trend { width: 100%; height: auto; display: block; font-family: var(--font-head); overflow: visible; }
.trend__grid line { stroke: rgba(74, 193, 224, 0.12); stroke-width: 1; }
.trend__axis { stroke: #3E6C88; stroke-width: 1.2; }
.trend__axislabel { fill: var(--on-navy-muted); font-size: 12px; }
.trend__tag { fill: var(--on-navy); font-size: 13px; font-weight: 600; }
.trend__fail { fill: rgba(169, 195, 209, 0.14); }
.trend__faillabel { fill: var(--on-navy-muted); font-size: 12px; font-weight: 600; }
.trend__thr { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 6 5; }
.trend__thrlabel { fill: var(--orange); font-size: 12.5px; font-weight: 600; }
.trend__line {
  fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.trend__alert { fill: var(--orange); stroke: var(--navy-panel); stroke-width: 3; }
.trend__alertlabel { fill: var(--orange); font-size: 13px; font-weight: 600; }
.trend__bracket { fill: none; stroke: var(--on-navy); stroke-width: 1.4; }
.trend__bracketlabel { fill: var(--on-navy); font-size: 12.5px; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .trend__line { stroke-dashoffset: 1; animation: iotc-draw 2.4s cubic-bezier(.45, 0, .25, 1) .3s forwards; }
  .trend__late { opacity: 0; animation: iotc-fade .5s ease 2.5s forwards; }
}
@keyframes iotc-draw { to { stroke-dashoffset: 0; } }
@keyframes iotc-fade { to { opacity: 1; } }

/* Punto de partida */
.start { background: var(--paper); border-bottom: 1px solid var(--line); }
.start__in { padding-top: 56px; padding-bottom: 56px; display: grid; gap: 18px; }
.start h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy); max-width: 18em; }
.start p { max-width: 40em; color: var(--muted); font-size: 1.08rem; }
@media (min-width: 900px) {
  .start__in { grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
}

/* Servicios */
.services { padding: 72px 0 40px; }
.services > .wrap > h2, .process h2, .reading h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: var(--navy); margin-bottom: 28px; }
.services > .wrap > h2 { margin-bottom: 14px; }
.services__intro { color: var(--muted); max-width: 44em; margin-bottom: 28px; }
.service__more { margin-top: 12px; }
.service {
  display: grid; gap: 12px; padding: 28px 0; border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service h3 { font-size: 1.5rem; color: var(--navy); }
.service p { color: var(--muted); max-width: 38em; }
.service__scope { margin: 12px 0 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 6px; max-width: 38em; }
.service__scope li::marker { color: #0A6E8C; }
.service__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.service__links a { color: #0A6E8C; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.service__links a:hover { color: var(--navy); }
@media (min-width: 900px) {
  .service { grid-template-columns: 15rem 1fr 15rem; gap: 40px; align-items: start; }
  .service h3 { padding-top: 2px; }
}
.service:target h3 { color: #0A6E8C; }

/* Proceso */
.process { padding: 56px 0 80px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-left: 56px; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: -4px;
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--navy);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; color: var(--navy);
  background: var(--white);
}
.step h3 { font-size: 1.25rem; color: var(--navy); margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 1rem; }
@media (max-width: 899px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; left: 19px; top: 40px; bottom: -26px; width: 2px; background: var(--line);
  }
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
  .steps::before { content: ""; position: absolute; left: 19px; right: 0; top: 15px; height: 2px; background: var(--line); }
  .step { padding-left: 0; padding-top: 58px; }
  .step::before { top: -4px; }
}

/* Trayectoria */
.about { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 64px 0 72px; }
.about__in { display: grid; gap: 32px; align-items: start; }
.about h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: var(--navy); margin-bottom: 18px; }
.about__text p { max-width: 36em; }
.about__text p + p { margin-top: 16px; }
.about__text a { color: #0A6E8C; font-weight: 500; text-underline-offset: 3px; }
.about__photo { margin: 0; width: 100%; max-width: 240px; }
@media (min-width: 900px) { .about__photo { max-width: 300px; } }
.about__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }
.about__photo--empty {
  aspect-ratio: 4 / 5; border: 2px dashed #9DB3C2; border-radius: 6px; display: grid; place-items: center;
  color: var(--muted); font-size: 0.95rem; text-align: center; padding: 16px;
}
@media (min-width: 900px) {
  .about__in { grid-template-columns: 300px 1fr; gap: 56px; }
  .about__in > .about__text:only-child { grid-column: 1 / -1; }
}

.shelf { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.shelf h3 { font-size: 1.3rem; color: var(--navy); margin-bottom: 20px; }
.shelf ul { list-style: none; margin: 0; padding: 0; }
.shelf__books { display: grid; grid-template-columns: repeat(3, minmax(0, 168px)); gap: clamp(14px, 3vw, 32px); }
.shelf__books a { display: grid; gap: 10px; text-decoration: none; color: var(--ink); }
.shelf__books img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 6px 18px rgba(0, 38, 62, 0.18); }
.shelf__books span { font-size: 0.95rem; font-weight: 500; line-height: 1.35; }
.shelf__books a:hover span { color: #0A6E8C; text-decoration: underline; text-underline-offset: 3px; }
.shelf__certs { display: grid; grid-template-columns: repeat(3, minmax(0, 120px)); gap: clamp(14px, 3vw, 32px); }
.shelf__certs li { display: block; }
.shelf__certs img { width: 100%; height: auto; aspect-ratio: 187 / 240; }
@media (min-width: 900px) {
  .shelves { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
}

/* Artículos */
.reading { padding: 64px 0 72px; }
.reading__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.reading__list li { border-top: 1px solid var(--line); }
.reading__list li:last-child { border-bottom: 1px solid var(--line); }
.reading__list a {
  display: block; padding: 16px 0; text-decoration: none; color: var(--ink);
  font-size: 1.12rem; font-weight: 500;
}
.reading__list a:hover { color: #0A6E8C; }
.reading__more { margin-top: 20px; }
.reading__more a { color: #0A6E8C; font-weight: 500; text-underline-offset: 3px; }

/* Contacto */
.contact { background: var(--navy); color: var(--on-navy); }
.contact__in { padding-top: 72px; padding-bottom: 72px; }
.contact h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); color: var(--white); max-width: 16em; }
.contact p { margin-top: 16px; max-width: 36em; color: var(--on-navy); }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; }
.contact__mail { color: var(--cyan) !important; font-weight: 500; text-underline-offset: 3px; }

/* Pie */
.site-foot { background: var(--navy-deep); color: var(--on-navy-muted); font-size: 0.92rem; }
.site-foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; padding-top: 28px; padding-bottom: 28px; }
.site-foot img { width: 44px; height: 40px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { text-decoration: none; color: var(--on-navy); }
.site-foot a:hover { color: var(--cyan); }
.site-foot p { margin-left: auto; }
@media (max-width: 699px) { .site-foot p { margin-left: 0; width: 100%; } }
