/* La hoja de la edición de Servicios se aplica a todo el contenido posterior.
   Sólo la cabecera, la portada y la franja de experiencia usan los estilos de V1.1. */
@import url("styles.css") layer(servicios);

:where(.site-header, .site-header *, .portada, .portada :not(svg *), .credentials, .credentials *, .skip-link) {
  all: revert;
  box-sizing: border-box;
}

.site-header, .portada, .credentials, .skip-link {
  --ink: #173a3d;
  --deep: #103f43;
  --teal: #007d83;
  --teal-dark: #00676c;
  --orange: #f58a24;
  --line: #d3dfdd;
  --muted: #526c6f;
  --display: "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

:is(.site-header, .portada) :is(a, button) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:is(.site-header, .portada) a {
  color: inherit;
  text-underline-offset: 5px;
}
:is(.site-header, .portada) button {
  font: inherit;
  cursor: pointer;
}
:is(.site-header, .portada) :is(img, svg) {
  max-width: 100%;
  vertical-align: middle;
}
.site-header :focus-visible, .skip-link:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 5px;
}
.site-header .menu-lines::after { content: none; }
:where(.portada h1, .portada p) { margin: 0; }
.portada p + p { margin-top: 18px; }
.site-header .brand img { width: 40px; height: 38px; }

.site-header .shell,
.portada .shell,
.credentials.shell {
  width: min(1200px,calc(100% - 80px));
  margin-inline: auto;
}

.portada .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 100;
  background: var(--deep);
  color: white;
  padding: 12px 20px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}

.site-header .header-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header .brand strong {
  font-family: var(--display);
  display: block;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: .035em;
}

.site-header .brand small {
  display: block;
  font-size: 10px;
  letter-spacing: .025em;
  line-height: 1.7;
  color: var(--muted);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-header nav>a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding-block: 13px;
}

.site-header nav>a:hover {
  color: var(--teal);
}

.site-header .nav-contact {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-left: 8px;
  border-bottom: 2px solid var(--teal);
}

.site-header .menu-toggle {
  display: none;
}

.portada .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 13px 22px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  transition: background-color .15s,color .15s;
}

.portada .button-orange {
  background: var(--orange);
  color: #183a3d;
}

.portada .button-orange:hover {
  background: #ff9e43;
}

.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-block: 1px solid var(--line);
  padding-block: 27px;
}

.credentials>div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.credentials>div:first-child {
  border: 0;
  padding-left: 0;
}

.credentials strong {
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: -.03em;
}

.credentials span {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width:1100px) {
  .site-header .shell,
  .portada .shell,
  .credentials.shell {
    width: calc(100% - 64px);
  }
  .site-header nav {
    gap: 18px;
  }
  .site-header .nav-contact {
    margin-left: 0;
    font-size: 12px;
  }
}

@media (max-width:899px) {
  .site-header .shell,
  .portada .shell,
  .credentials.shell {
    width: calc(100% - 48px);
  }
  .site-header .header-inner {
    min-height: 80px;
    gap: 16px;
  }
  .site-header .brand strong {
    font-size: 25px;
  }
  .site-header .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid #c8d6d3;
    border-radius: 4px;
    padding: 10px 13px;
    min-height: 44px;
    font-size: 13px;
    color: var(--deep);
  }
  .site-header .menu-lines {
    display: block;
    width: 16px;
    height: 9px;
    border-top: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
  }
  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 18px 24px 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 16px #103f4308;
    align-items: stretch;
    gap: 0;
  }
  .site-header nav.is-open {
    display: flex;
    flex-direction: column;
  }
  .site-header nav>a {
    font-size: 15px;
    padding: 14px 12px;
  }
  .site-header .nav-contact {
    margin-top: 8px;
    justify-content: space-between;
  }
  .credentials strong {
    font-size: 21px;
  }
  .credentials span {
    font-size: 11px;
  }
  .credentials>div {
    padding-left: 18px;
  }
}

@media (max-width:600px) {
  .site-header, .portada, .credentials, .skip-link {
    font-size: 16px;
  }
  .site-header .shell,
  .portada .shell,
  .credentials.shell {
    width: calc(100% - 40px);
  }
  .site-header .brand strong {
    font-size: 24px;
  }
  .site-header .brand small {
    font-size: 9px;
  }
  .site-header .brand img {
    width: 34px;
    height: auto;
  }
  .site-header .header-inner {
    min-height: 76px;
  }
  .credentials {
    grid-template-columns: 1fr;
    padding-block: 20px;
    gap: 17px;
  }
  .credentials>div,
  .credentials>div:first-child {
    padding: 0;
    border: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
  }
  .credentials strong {
    font-size: 17px;
    flex-shrink: 0;
  }
  .credentials span {
    font-size: 11px;
    max-width: 190px;
    text-align: right;
  }
}

/* La descripción larga del logo puede ocupar dos líneas junto al menú. */
@media (max-width: 420px) {
  .site-header .brand { min-width: 0; flex-shrink: 1; }
  .site-header .brand > span { min-width: 0; }
  .site-header .brand small { white-space: normal; }
  .site-header .brand img, .site-header .menu-toggle { flex-shrink: 0; }
}
