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

body {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 400;
  background: white;
  overflow-x: hidden;
}

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

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.site-header__inner {
  width: 100%;
  padding-inline: var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  text-decoration: none;
  color: inherit;
}

.brand__name {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  display: inline-block;
  white-space: pre-line;
  /* mantiene tu <br> */
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* reserva espacio pero no se ve */
.brand__ghost {
  visibility: hidden;
}

/* capa visible arriba del ghost */
.brand__live {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* Accesibilidad typewriter */
@media (prefers-reduced-motion: reduce) {
  .brand__name.is-typing::after {
    animation: none;
  }
}

/* ========== HEADER CONTACT TOGGLE ========== */

/* Bloque derecho (icono + panel) */
.site-header__contact {
  position: relative;
  display: flex;
  align-items: center;
}

/* Botón flecha */
.contact-toggle {
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  color: inherit;
  line-height: 0;

  opacity: 0;
  transform: translateY(-12px);
}

body.is-ready .contact-toggle {
  animation: headerArrowIn 1200ms ease forwards;
  animation-delay: 3000ms;
  /* ajustá si querés que entre antes/después */
}

@keyframes headerArrowIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .contact-toggle {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.contact-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-toggle__icon img {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform 350ms ease;
}

/* Rotación cuando está abierto */
.site-header__contact.is-open .contact-toggle__icon img {
  transform: rotate(180deg);
}

/* Panel desplegable */
.header-email {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;

  position: absolute;
  top: calc(100% + 10px);
  right: 0;

  padding: 10px 12px;
  background: #fff;

  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

/* Estado abierto */
.site-header__contact.is-open .header-email {
  transform: translateY(0);
  pointer-events: auto;
  opacity: 1;
}

.header-email__label {
  font-size: 1.2rem;
  line-height: 1.1;
  opacity: 0.75;
  text-align: right;
  width: 100%;
}

.header-email__copy {
  all: unset;
  box-sizing: border-box;

  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  cursor: pointer;

  font-family: inherit;
  color: #000;
}

.header-email__value {
  font-size: 20px;
  line-height: 1.2;
}

.header-email__copy-icon img {
  width: 15px;
  height: 15px;
  display: block;
  opacity: 1;
}

.header-email__copy:hover img {
  opacity: 1;
}

/* Accesibilidad */
.contact-toggle:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.6);
  outline-offset: 2px;
}

/* ========== MAIN ========== */
.site-main {
  padding-inline: var(--container-pad);
  padding-bottom: var(--container-pad);
  padding-top: 0;
}

/* ========== COPY TOAST ========== */

.copy-toast {
  position: fixed;
  top: calc(var(--header-h) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);

  padding: 8px 14px;
  background: #000;
  color: #fff;

  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 220ms ease,
    transform 220ms ease;

  z-index: 999;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  border-radius: 10px;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .copy-toast {
    transition: none;
  }
}