/* CTRL MEDIA — BASE
   Contrato: reglas globales de documento y defaults compartidos. */

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

html,
body {
  width: 100%;
  height: 100%;
}

html {
  scroll-behavior: auto; /* scroll controlado por JS */
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--cm-font-sans);
  background-color: var(--cm-black);
  color: var(--cm-text);
  line-height: var(--cm-lh-normal);
  overflow: hidden; /* crítico: el scroll vive en .cm-scroll-shell */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Media defaults */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Video fills */
video {
  object-fit: cover;
}

/* Links & buttons */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Focus (accesible pero silencioso) */
:focus-visible {
  outline: 2px solid var(--cm-fog-2);
  outline-offset: 3px;
}

/* Typography helpers */
.cm-title {
  font-size: clamp(28px, 4vw, var(--cm-text-2xl));
  line-height: var(--cm-lh-tight);
  font-weight: var(--cm-font-weight-semibold);
  letter-spacing: -0.01em;
  margin: 0 0 var(--cm-space-3);
}

.cm-subtitle {
  font-size: clamp(16px, 2vw, var(--cm-text-lg));
  line-height: var(--cm-lh-relaxed);
  font-weight: var(--cm-font-weight-regular);
  color: var(--cm-muted);
  margin: 0;
}

/* Contrato: aislamiento tipográfico de L5 sin afectar tipografía global. */

/* TODO(owner:@design, criterio: definir fuente oficial L5/Portafolio y reflejarla en este bloque): mantener Cormorant como fallback temporal. */
.cm-team-quote-title,
.cm-quote-mark {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

/* Contrato: el control de cierre de L5 conserva presencia visual alineada con el sistema de pills. */

.cm-team-close {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cm-team-close:active {
  transform: translateY(0px) scale(0.99);
  opacity: 0.96;
}

/* Utility */
[hidden] {
  display: none !important;
}
