/* ==========================================================================
   E&T SERVICES — DIGITAL BUSINESS CARD — styles.css
   --------------------------------------------------------------------------
   Sistema de diseño: premium / tech / corporativo / minimalista
   Paleta basada en la identidad de marca de E&T SERVICES S.A.S.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Fondo */
  --bg-0: #06090d;
  --bg-1: #0a0f16;
  --bg-2: #121b26;

  /* Superficie de la tarjeta */
  --surface-1: #131b26;
  --surface-2: #1c2833;
  --surface-edge: rgba(255, 255, 255, 0.07);
  --surface-edge-strong: rgba(255, 255, 255, 0.14);

  /* Acentos de marca E&T Services */
  --accent-blue: #4dacee;
  --accent-blue-dim: #3a87bd;
  --accent-blue-soft: rgba(77, 172, 238, 0.14);
  --accent-amber: #e8a33d;
  --accent-amber-soft: rgba(232, 163, 61, 0.16);
  --slate: #5b7e91;
  --slate-soft: rgba(91, 126, 145, 0.18);

  /* Texto */
  --text-0: #edf2f7;
  --text-1: #a9b7c4;
  --text-2: #6c7b8a;

  /* Sombra / profundidad */
  --shadow-ambient: rgba(3, 6, 10, 0.65);
  --shadow-accent: rgba(77, 172, 238, 0.18);

  /* Tipografía */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  /* Layout */
  --card-radius: 26px;
  --control-radius: 12px;
  --card-max-width: 420px;

  /* Movimiento */
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --tilt-max: 7deg;
}

/* --------------------------------------------------------------------------
   2. RESET BÁSICO
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  color: var(--text-0);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

/* Foco visible y accesible para navegación por teclado */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   3. FONDO DE PÁGINA
   -------------------------------------------------------------------------- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(760px 520px at 82% 8%, rgba(77, 172, 238, 0.10), transparent 60%),
    radial-gradient(620px 480px at 10% 96%, rgba(232, 163, 61, 0.07), transparent 60%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 55%, var(--bg-2) 100%);
}

.page-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 38%, black 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 38%, black 0%, transparent 78%);
}

.page-bg__glow {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  left: var(--glow-x, 50%);
  top: var(--glow-y, 30%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(77, 172, 238, 0.10) 0%, transparent 68%);
  transition: left 1.4s var(--ease-premium), top 1.4s var(--ease-premium);
  pointer-events: none;
}

.page-bg__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.page-bg__particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-blue);
  opacity: 0.28;
  animation: drift 18s linear infinite;
}

.page-bg__particles span:nth-child(2) { background: var(--accent-amber); opacity: 0.22; }
.page-bg__particles span:nth-child(3) { background: var(--slate); opacity: 0.3; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(6px, -14px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* --------------------------------------------------------------------------
   4. LAYOUT PRINCIPAL
   -------------------------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vh, 64px) 18px;
}

.stage__scene {
  perspective: 1500px;
  width: 100%;
  max-width: var(--card-max-width);
}

/* --------------------------------------------------------------------------
   5. TARJETA
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  transform-style: preserve-3d;
  border-radius: var(--card-radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 40%),
    linear-gradient(150deg, var(--surface-2) 0%, var(--surface-1) 62%, #0f151d 100%);
  border: 1px solid var(--surface-edge);
  box-shadow:
    0 30px 60px -20px var(--shadow-ambient),
    0 1px 0 0 rgba(255, 255, 255, 0.05) inset,
    0 0 0 1px rgba(0, 0, 0, 0.3);
  padding: 56px 30px 28px;
  transition: transform 0.18s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
  will-change: transform;
}

.card.is-settling {
  transition: transform 0.6s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}

/* Sheen / reflejo que sigue el puntero */
.card__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 20%),
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0) 60%
  );
  mix-blend-mode: screen;
}

.card:hover .card__sheen,
.card.is-active .card__sheen {
  opacity: 1;
}

/* Marca discreta en la esquina */
.card__mark {
  position: absolute;
  top: 22px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateZ(30px);
}

.card__mark-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 8px 1px var(--shadow-accent);
}

.card__mark-text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-2);
}

/* Badge esquina superior derecha */
.card__badge {
  position: absolute;
  top: 22px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-amber-soft);
  border: 1px solid rgba(232, 163, 61, 0.28);
  transform: translateZ(30px);
}

.card__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-amber);
}

.card__badge-text {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0c98a;
}

/* --------------------------------------------------------------------------
   6. FOTOGRAFÍA
   -------------------------------------------------------------------------- */
.card__photo-wrap {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 0 auto 18px;
  transform: translateZ(50px);
}

.card__photo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    var(--accent-blue),
    var(--slate) 35%,
    var(--accent-amber) 70%,
    var(--accent-blue) 100%
  );
  opacity: 0.85;
  padding: 2px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.card__photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--bg-1));
  border: 3px solid var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__photo-initials {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  color: var(--text-1);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   7. IDENTIDAD
   -------------------------------------------------------------------------- */
.card__identity {
  text-align: center;
  transform: translateZ(35px);
}

.card__name {
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text-0);
}

.card__role {
  margin: 6px 0 0;
  font-size: 14.5px;
  color: var(--text-1);
  font-weight: 500;
}

.card__company {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--slate);
}

/* --------------------------------------------------------------------------
   8. DIVISOR
   -------------------------------------------------------------------------- */
.card__divider {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, transparent, var(--surface-edge-strong) 50%, transparent);
  transform: translateZ(20px);
}

/* --------------------------------------------------------------------------
   9. DATOS DE CONTACTO
   -------------------------------------------------------------------------- */
.card__info {
  display: flex;
  flex-direction: column;
  gap: 13px;
  transform: translateZ(25px);
}

.card__info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.card__info-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--slate-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}

.card__info-icon svg {
  width: 16px;
  height: 16px;
}

.card__info-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.card__info-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

.card__info-value {
  font-size: 14px;
  color: var(--text-0);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.card__info-value:hover {
  color: var(--accent-blue);
}

/* --------------------------------------------------------------------------
   10. ACCIONES
   -------------------------------------------------------------------------- */
.card__actions {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  transform: translateZ(28px);
}

.action-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 68px;
  padding: 12px 6px;
  border-radius: var(--control-radius);
  border: 1px solid var(--surface-edge);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.15s var(--ease-premium), border-color 0.2s ease, background 0.2s ease;
}

.action-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: var(--accent-blue-soft);
  transition: opacity 0.2s ease;
}

.action-btn:hover {
  border-color: rgba(77, 172, 238, 0.35);
  transform: translateY(-2px);
}

.action-btn:hover::before {
  opacity: 1;
}

.action-btn:active {
  transform: translateY(0) scale(0.97);
}

.action-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent-blue);
}

.action-btn span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-1);
}

.action-btn--primary {
  border-color: rgba(77, 172, 238, 0.4);
  background: linear-gradient(160deg, rgba(77, 172, 238, 0.16), rgba(77, 172, 238, 0.03));
}

.action-btn--primary svg,
.action-btn--primary span {
  color: var(--accent-blue);
}

/* --------------------------------------------------------------------------
   11. FOOTER DE LA TARJETA
   -------------------------------------------------------------------------- */
.card__footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transform: translateZ(15px);
}

.card__footer-brand {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

.card__footer-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card__footer-link:hover {
  color: #7cc4f5;
}

/* --------------------------------------------------------------------------
   12. TOAST DE RETROALIMENTACIÓN
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 20;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(18, 27, 38, 0.92);
  border: 1px solid var(--surface-edge-strong);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -10px var(--shadow-ambient);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-premium), transform 0.3s var(--ease-premium);
}

.toast svg {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
  flex: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   13. ENTRADA SUAVE (una sola secuencia orquestada)
   -------------------------------------------------------------------------- */
.stage__scene {
  opacity: 0;
  transform: translateY(14px);
  animation: card-enter 0.75s var(--ease-premium) 0.05s forwards;
}

@keyframes card-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   14. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .card {
    padding: 50px 20px 22px;
  }

  .card__actions {
    grid-template-columns: repeat(2, 1fr);
  }

  /* El badge "OFFICIAL BUSINESS CONTACT" es más largo que la marca de
     esquina: en pantallas muy angostas se reduce su tipografía y su
     separación de letras para que ambos elementos convivan sin
     superponerse ni desbordar la tarjeta. */
  .card__mark {
    top: 18px;
    left: 20px;
  }

  .card__mark-text {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .card__badge {
    top: 18px;
    right: 16px;
    padding: 5px 8px;
  }

  .card__badge-text {
    font-size: 9px;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 340px) {
  /* En los teléfonos más angostos (ej. iPhone SE), el badge pasa a una
     segunda línea debajo de la marca en vez de competir por el mismo
     espacio horizontal. */
  .card__mark {
    top: 18px;
  }

  .card__badge {
    top: 46px;
    right: 20px;
  }

  .card__photo-wrap {
    margin-top: 26px;
  }
}

@media (min-width: 640px) {
  .card {
    padding: 60px 40px 32px;
  }
}

/* --------------------------------------------------------------------------
   15. ACCESIBILIDAD — REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    scroll-behavior: auto !important;
  }

  .stage__scene {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .card {
    transform: none !important;
  }

  .card__sheen {
    display: none;
  }

  .page-bg__particles {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   16. UTILIDADES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--accent-blue);
  color: #06131c;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}

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