/* ==========================================================================
   links.enerkhi.com
   Tokens tomados del sistema de diseño de Enerkhi (project/tokens.json).
   No inventar valores aquí: si un color o tamaño cambia, cambia allí primero.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: 'Sora';
  src: url('../fonts/sora-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  /* Color */
  --deep-current: #205D60;
  --core-blue: #033142;
  --fresh-horizon: #AFD8A1;
  --soft-cyan: #9FD2CD;
  --clear-energy: #FFFFFF;
  --surface-light: #F4F9FA;
  --border: #E2EBF0;

  /* Tipografía */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;

  /* Espaciado */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-xxxl: 48px;

  /* Radio */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Sombra */
  --shadow-sm: 0 1px 3px rgba(3, 49, 66, 0.08);
  --shadow-md: 0 4px 12px rgba(3, 49, 66, 0.12);
  --shadow-lg: 0 8px 24px rgba(3, 49, 66, 0.16);
}

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

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

body {
  margin: 0;
  background: var(--surface-light);
  color: var(--core-blue);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Contenedor
   -------------------------------------------------------------------------- */

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xxxl);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */

.hero {
  background: var(--deep-current);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin: 0 calc(-1 * var(--space-lg)) var(--space-xl);
  padding: var(--space-xxl) var(--space-xl) var(--space-xl);
  text-align: center;
  color: var(--clear-energy);
}

.hero__logo {
  display: block;
  width: 148px;
  height: auto;
  margin: 0 auto var(--space-xl);
}

.hero__avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clear-energy);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__avatar svg {
  width: 48px;
  height: auto;
}

.hero__name {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  color: var(--clear-energy);
}

.hero__role {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  color: var(--fresh-horizon);
}

.hero__tagline {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: var(--space-lg) 0 0;
  /* fresh-horizon (4,71:1), no soft-cyan: sobre deep-current soft-cyan da
     4,49:1 y no llega al minimo AA de 4,5:1 para texto pequenio. */
  color: var(--fresh-horizon);
}

.hero__logo--lg {
  width: 200px;
  margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------------------------
   Llamada a la acción principal
   Botón grande centrado: el número no se escribe, se pulsa.
   -------------------------------------------------------------------------- */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--deep-current);
  color: var(--clear-energy);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cta:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.cta:active { transform: translateY(0); }

.cta:focus-visible {
  outline: 3px solid var(--core-blue);
  outline-offset: 3px;
}

.cta__icon {
  width: 56px;
  height: 56px;
  color: var(--clear-energy);
}

.cta__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cta__label {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
}

.cta__detail {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fresh-horizon);
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

/* La página es corta: el contenido se centra en el espacio libre en vez de
   quedar pegado arriba con un hueco muerto antes del pie. */
main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: 0 0 var(--space-xl);
}

.btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 56px;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--clear-energy);
  color: var(--core-blue);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 3px solid var(--deep-current);
  outline-offset: 2px;
}

.btn__icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: var(--deep-current);
}

.btn__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.btn__text { flex: 1 1 auto; }

.btn__label { display: block; }

/* Variante centrada: sin texto secundario, el icono acompaña a la etiqueta */
.btn--center {
  justify-content: center;
  gap: var(--space-md);
  font-size: 16px;
}

.btn--center .btn__icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.btn--center .btn__label { display: inline; }

.btn__detail {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--deep-current);
}

/* Botón principal: Guardar contacto */
.btn--primary {
  background: var(--deep-current);
  border-color: var(--deep-current);
  color: var(--clear-energy);
  box-shadow: var(--shadow-md);
}

.btn--primary .btn__icon { color: var(--clear-energy); }
.btn--primary .btn__detail { color: var(--fresh-horizon); }

.btn--primary:focus-visible {
  outline-color: var(--core-blue);
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */

.section {
  margin: 0 0 var(--space-xl);
}

.section__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep-current);
  margin: 0 0 var(--space-md);
}

/* Qué hacemos: Produce · Guarda · Aprovecha · Comparte */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.services li {
  background: var(--clear-energy);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: 14px;
  line-height: 1.4;
}

.services strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--deep-current);
  margin-bottom: 2px;
}

.services span {
  font-size: 12px;
  line-height: 1.5;
  color: var(--core-blue);
}

/* --------------------------------------------------------------------------
   Equipo (en la página de empresa)
   -------------------------------------------------------------------------- */

.people {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.person {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 56px;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--clear-energy);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--core-blue);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.person:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.person:focus-visible {
  outline: 3px solid var(--deep-current);
  outline-offset: 2px;
}

.person__avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-light);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--deep-current);
}

.person__name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}

.person__role {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--deep-current);
}

.person__chevron {
  flex: 0 0 20px;
  color: var(--deep-current);
}

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */

.footer {
  margin-top: auto;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--deep-current);
}

.footer a {
  color: var(--deep-current);
  text-decoration: underline;
}

.footer a:focus-visible {
  outline: 3px solid var(--deep-current);
  outline-offset: 2px;
}

.footer__legal {
  margin: var(--space-sm) 0 0;
  color: var(--core-blue);
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Accesibilidad
   -------------------------------------------------------------------------- */

.visually-hidden {
  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: absolute;
  left: -9999px;
  top: 0;
  background: var(--core-blue);
  color: var(--clear-energy);
  padding: var(--space-md) var(--space-lg);
  z-index: 10;
  border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
  left: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Pantallas grandes: la tarjeta se centra, no se estira */
@media (min-width: 540px) {
  body {
    padding: var(--space-xxl) 0;
  }

  .page {
    min-height: auto;
    background: var(--clear-energy);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding-top: 0;
    overflow: hidden;
  }

  .hero {
    border-radius: 0;
    margin-top: 0;
  }

  .services li,
  .btn,
  .person {
    background: var(--clear-energy);
  }
}
