/*
 * TEC · Primitivas, Signature Closure (TEC-36) y control de pausa (TEC-33). B03.
 * Estilos acotados a clases tec-*; no se alteran etiquetas globales de Dawn.
 */

.tec-root,
.tec-footer,
.tec-card,
.tec-choice {
  font-family: var(--tec-font-sans);
  font-synthesis: none;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}

.tec-container {
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: calc(var(--tec-content-max) + 2 * var(--tec-gutter));
  margin-inline: auto;
  padding-inline: var(--tec-gutter);
}

.tec-visually-hidden {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Tipografía editorial y de interfaz. */
.tec-eyebrow {
  margin: 0;
  color: var(--tec-text-secondary);
  font-family: var(--tec-font-sans);
  font-size: var(--tec-type-eyebrow);
  font-weight: 700;
  line-height: var(--tec-leading-eyebrow);
  letter-spacing: var(--tec-tracking-eyebrow);
  text-transform: uppercase;
}

.tec-h1,
.tec-h2,
.tec-h3 {
  margin: 0;
  color: var(--tec-text-primary);
  font-family: var(--tec-font-serif);
  font-weight: 400;
  letter-spacing: var(--tec-tracking-heading);
  text-wrap: balance;
}

.tec-h1 {
  font-size: var(--tec-type-h1);
  line-height: var(--tec-leading-h1);
}

.tec-h2 {
  font-size: var(--tec-type-h2);
  line-height: var(--tec-leading-h2);
}

.tec-h3 {
  font-size: var(--tec-type-h3);
  line-height: var(--tec-leading-h3);
}

.tec-emphasis {
  font-style: italic;
}

.tec-body {
  max-inline-size: var(--tec-measure);
  margin: 0;
  color: var(--tec-text-secondary);
  font-size: var(--tec-type-body);
  line-height: var(--tec-leading-body);
}

.tec-rule {
  display: block;
  inline-size: 64px;
  block-size: 0;
  margin: var(--tec-s5) 0;
  border: 0;
  border-block-start: var(--tec-border-width) solid var(--tec-accent-decorative);
}

/* Acciones: enlace para navegar, botón para mutar. */
.tec-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tec-s3);
  box-sizing: border-box;
  min-block-size: var(--tec-target);
  padding: var(--tec-s2) var(--tec-s5);
  border: var(--tec-border-width) solid transparent;
  border-radius: var(--tec-radius-control);
  font-family: var(--tec-font-sans);
  font-size: var(--tec-type-ui);
  font-weight: 700;
  line-height: var(--tec-leading-ui);
  text-decoration: none;
  cursor: pointer;
}

.tec-action--primary {
  background: var(--tec-action-primary-bg);
  color: var(--tec-action-primary-fg);
}

.tec-action--secondary {
  border-color: var(--tec-action-secondary-border);
  background: var(--tec-action-secondary-bg);
  color: var(--tec-action-secondary-fg);
}

.tec-action--text {
  padding-inline: 0;
  border-radius: 0;
  color: var(--tec-text-primary);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.tec-action:disabled,
.tec-action[aria-disabled='true'] {
  border-style: dashed;
  border-color: var(--tec-border-control);
  background: var(--tec-surface-card);
  color: var(--tec-text-secondary);
  cursor: not-allowed;
}

.tec-arrow {
  flex: none;
  inline-size: 20px;
  block-size: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .tec-action--primary:not(:disabled):hover {
    background: var(--tec-color-walnut);
  }

  .tec-action--secondary:not(:disabled):hover {
    background: var(--tec-surface-panel);
  }

  .tec-action--text:hover {
    text-decoration-thickness: 2px;
  }
}

/* Foco visible 2 px + offset 3 px; doble anillo sobre fotografía o fondo oscuro. */
.tec-action:focus-visible,
.tec-footer a:focus-visible {
  outline: var(--tec-focus-width) solid var(--tec-focus-light);
  outline-offset: var(--tec-focus-offset);
}

.tec-footer__closure a:focus-visible {
  outline-color: var(--tec-focus-dark);
}

/* TEC-36 · Información comercial + Signature Closure. */
.tec-footer {
  color: var(--tec-text-primary);
}

.tec-footer a {
  color: inherit;
}

.tec-info {
  background: var(--tec-surface-card);
  border-block-start: var(--tec-border-width) solid var(--tec-border-decorative);
}

.tec-info__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.tec-info__item {
  display: flex;
  border-block-end: var(--tec-border-width) solid var(--tec-border-decorative);
}

.tec-info__item:nth-child(odd) {
  border-inline-end: var(--tec-border-width) solid var(--tec-border-decorative);
}

.tec-info__item:nth-last-child(-n + 2):nth-child(odd),
.tec-info__item:nth-last-child(-n + 2):nth-child(odd) ~ .tec-info__item {
  border-block-end: 0;
}

.tec-info__item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-inline-end: 0;
}

.tec-info__link {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: var(--tec-s2);
  box-sizing: border-box;
  min-block-size: var(--tec-target);
  padding: var(--tec-s7) var(--tec-s3);
  color: var(--tec-text-primary);
  text-align: center;
  text-decoration: none;
}

.tec-info__icon {
  inline-size: 32px;
  block-size: 32px;
  margin-block-end: var(--tec-s2);
  color: var(--tec-color-cacao);
}

.tec-info__title {
  margin: 0;
  color: var(--tec-color-cacao);
  font-size: calc(var(--tec-type-body) * 1.06);
  font-weight: 700;
  line-height: var(--tec-leading-ui);
}

.tec-info__text {
  margin: 0;
  color: var(--tec-text-secondary);
  font-size: var(--tec-type-help);
  line-height: 1.45;
}

@media (hover: hover) and (pointer: fine) {
  .tec-info__link:hover .tec-info__title {
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }
}

.tec-footer__closure {
  padding-block: var(--tec-s9) var(--tec-s7);
  background: var(--tec-surface-inverse);
  color: var(--tec-text-inverse);
}

.tec-footer__grid {
  display: grid;
  /* Two columns while they fit; enlarged text (rem) falls back to one. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(40%, 14rem)), 1fr));
  gap: var(--tec-s8) var(--tec-s6);
}

.tec-footer__identity {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  gap: var(--tec-s5);
  padding-block-end: var(--tec-s7);
  border-block-end: var(--tec-border-width) solid rgb(181 163 145 / 45%);
  text-align: center;
}

.tec-footer__tagline {
  margin: 0;
  color: var(--tec-text-inverse);
  font-family: var(--tec-font-serif);
  font-size: calc(var(--tec-type-body) * 1.12);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
}

.tec-footer__nav {
  min-inline-size: 0;
}

.tec-footer__nav--wide {
  grid-column: 1 / -1;
  padding-block-start: var(--tec-s6);
  border-block-start: var(--tec-border-width) solid rgb(181 163 145 / 45%);
}

.tec-footer__heading {
  margin: 0 0 var(--tec-s5);
  color: var(--tec-text-inverse);
  font-family: var(--tec-font-serif);
  font-size: var(--tec-type-h3);
  font-weight: 400;
  line-height: var(--tec-leading-h3);
}

.tec-footer__heading::after {
  display: block;
  inline-size: 32px;
  margin-block-start: var(--tec-s4);
  border-block-start: var(--tec-border-width) solid var(--tec-accent-decorative);
  content: '';
}

.tec-footer__links {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tec-footer__nav--wide .tec-footer__links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--tec-s6);
}

.tec-footer__links a {
  display: flex;
  align-items: center;
  min-block-size: var(--tec-target);
  color: var(--tec-text-inverse-secondary);
  font-size: var(--tec-type-body);
  line-height: var(--tec-leading-ui);
  text-decoration: none;
}

.tec-footer__links a[aria-current='page'] {
  color: var(--tec-text-inverse);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

@media (hover: hover) and (pointer: fine) {
  .tec-footer__links a:hover {
    color: var(--tec-text-inverse);
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }
}

.tec-footer__base {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--tec-s2);
  margin-block-start: var(--tec-s8);
  padding-block-start: var(--tec-s6);
  border-block-start: var(--tec-border-width) solid rgb(181 163 145 / 45%);
  color: var(--tec-text-inverse-secondary);
  font-size: var(--tec-type-help);
  line-height: 1.45;
  text-align: center;
}

.tec-footer__base p {
  margin: 0;
}

.tec-footer__credit {
  color: var(--tec-color-taupe);
}

@media screen and (min-width: 1024px) {
  .tec-info__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-block: var(--tec-s7);
  }

  .tec-info__item,
  .tec-info__item:nth-child(odd),
  .tec-info__item:last-child:nth-child(odd) {
    grid-column: auto;
    border-block-end: 0;
    border-inline-end: var(--tec-border-width) solid var(--tec-border-decorative);
  }

  .tec-info__item:last-child {
    border-inline-end: 0;
  }

  .tec-info__link {
    padding-block: var(--tec-s4);
  }

  .tec-footer__closure {
    padding-block: var(--tec-s10) var(--tec-s9);
  }

  .tec-footer__grid {
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
    column-gap: var(--tec-s7);
  }

  .tec-footer__identity {
    grid-column: auto;
    align-items: flex-start;
    padding-block-end: 0;
    border-block-end: 0;
    text-align: start;
  }

  .tec-footer__nav--wide {
    grid-column: auto;
    padding-block-start: 0;
    border-block-start: 0;
  }

  .tec-footer__nav--wide .tec-footer__links {
    grid-template-columns: minmax(0, 1fr);
  }

  .tec-footer__base {
    flex-direction: row;
    justify-content: space-between;
    margin-block-start: var(--tec-s11);
    text-align: start;
  }
}

/* Reflow: una columna cuando el ancho efectivo no admite dos (zoom 200–400 %). */
@media screen and (max-width: 359px) {
  .tec-info__list,
  .tec-footer__grid,
  .tec-footer__nav--wide .tec-footer__links {
    grid-template-columns: minmax(0, 1fr);
  }

  .tec-info__item,
  .tec-info__item:nth-child(odd) {
    border-inline-end: 0;
    border-block-end: var(--tec-border-width) solid var(--tec-border-decorative);
  }
}

/* Keep native lazy sources and reserved boxes for no-script and boot failure. */
html[data-tec-media-boot] [data-tec-deferred-media]:not(:focus-within) img[loading='lazy'] {
  display: none;
}
