/*
 * Complementary base styles.
 *
 * Design tokens (colors, spacing, typography) come from theme.json.
 * This file only adds the few rules that cannot be expressed as a token.
 */

/*
 * Header: sticky, translucent and quiet. The only motion is the underline that
 * grows under the link on hover; nothing loads and nothing moves on scroll.
 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-block: 0.75rem;
  background: var(--wp--preset--color--base);
  border-block-end: 1px solid var(--wp--preset--color--surface);
}

/*
 * No `backdrop-filter` here, on purpose: a filter on an ancestor makes it the
 * containing block for `position: fixed` descendants, and the mobile menu
 * overlay would be clipped to the height of the header instead of covering the
 * viewport. The header background is opaque for the same reason it does not
 * need the blur.
 */

.site-header__bar {
  align-items: center;
  column-gap: 2rem;
}

/* Brand: the logo, sized by height so any wordmark keeps its proportions. */
.site-brand {
  display: inline-flex;
  align-items: center;
}

.site-brand__logo {
  display: block;
  width: auto;
  height: 30px;
}

.site-brand--footer .site-brand__logo {
  height: 34px;
  margin-block-end: 1.25rem;
}

@media (max-width: 600px) {
  .site-brand__logo {
    height: 24px;
  }
}

.site-header__brand {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.site-header__brand a {
  text-decoration: none;
}

.site-nav .wp-block-navigation-item__content {
  position: relative;
  padding-block: 0.35rem;
  color: var(--wp--preset--color--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.site-nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease;
}

.site-nav .wp-block-navigation-item__content:hover,
.site-nav .wp-block-navigation-item__content:focus-visible,
.site-nav .current-menu-item > .wp-block-navigation-item__content,
.site-nav [aria-current="page"] {
  color: var(--wp--preset--color--accent);
}

.site-nav .wp-block-navigation-item__content:hover::after,
.site-nav .wp-block-navigation-item__content:focus-visible::after,
.site-nav .current-menu-item > .wp-block-navigation-item__content::after,
.site-nav [aria-current="page"]::after {
  transform: scaleX(1);
}

/* Desktop: the links sit in a row, tight and aligned to the right. */
.site-nav .wp-block-navigation__container {
  gap: clamp(1rem, 2vw, 1.75rem);
  justify-content: flex-end;
}

/*
 * Overlay: full screen, opaque, and with the links set large. WordPress puts
 * the panel in the top layer, so only padding and type have to be adjusted.
 */
.site-nav .wp-block-navigation__responsive-container.is-menu-open {
  padding: clamp(1.25rem, 5vw, 2.5rem);
  background: var(--wp--preset--color--base);
}

.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  align-items: flex-start;
  gap: clamp(1rem, 4vw, 1.75rem);
  width: 100%;
  padding-block-start: clamp(3rem, 10vh, 5rem);
}

.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  padding-block: 0.25rem;
  font-size: clamp(1.5rem, 7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
}

.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after {
  height: 3px;
}

/* Mobile: the block collapses to a button; keep it 44px and quiet. */
.site-nav .wp-block-navigation__responsive-container-open,
.site-nav .wp-block-navigation__responsive-container-close {
  min-width: 44px;
  min-height: 44px;
  color: var(--wp--preset--color--ink);
}

@media (max-width: 600px) {
  .site-header__brand {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav .wp-block-navigation-item__content::after {
    transition: none;
  }
}

.site-footer {
  /* Bottom padding keeps the credit off the lower edge of the viewport. */
  padding-block: clamp(3rem, 8vh, 5rem) clamp(1.75rem, 4vh, 2.5rem);
  background: var(--wp--preset--color--night);
  color: var(--wp--preset--color--base);
}

/*
 * Sticky footer: the page column always fills the viewport, so on short pages
 * such as the contact page the footer sits at the bottom instead of leaving a
 * white gap under it. The main column is the one that grows.
 */
.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.wp-site-blocks > main {
  flex: 1 0 auto;
}

.wp-block-site-title__title a {
  text-decoration: none;
}

/* Long words and URLs must not break the layout. */
.entry-content,
.wp-block-post-content {
  overflow-wrap: break-word;
}

/*
 * CJK typography. Japanese and Korean do not separate words with spaces, so
 * line breaking needs stricter rules and a slightly larger body size. The font
 * stack already falls back to system CJK faces; no remote webfont is loaded.
 */
:lang(ja) {
  line-break: strict;
  word-break: normal;
}

:lang(ko) {
  word-break: keep-all;
}

/* ---------------------------------------------------------------------------
 * Showcase: hero manifesto, works grid, single work and the image viewer.
 * Everything below is layout and interaction; colours and sizes stay tokens.
 * ------------------------------------------------------------------------ */

/* Hero: the manifesto at display size. */
.showcase-hero {
  padding-block: clamp(3rem, 12vh, 9rem);
  background: var(--wp--preset--color--surface);
}

.showcase-hero__inner {
  /* Not flex: WordPress centres the children of a constrained layout with
     auto margins, so a flex column would centre the short eyebrow too. */
  display: block;
}

.showcase-hero__eyebrow {
  margin: 0 0 clamp(1rem, 3vw, 2rem);
  color: var(--wp--preset--color--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.showcase-hero__title {
  margin: 0 0 clamp(1rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
  /* The display size is fluid, but never wider than the viewport. */
  overflow-wrap: break-word;
}

.showcase-hero__lede {
  margin: 0;
  max-width: 40rem;
  color: var(--wp--preset--color--muted);
}

/* Sections that hold a grid. */
.showcase-section {
  padding-block: clamp(2.5rem, 8vh, 6rem);
}

.showcase-section__link {
  margin: 0;
}

/*
 * Chinese, Japanese and Korean need their own rhythm: no negative tracking
 * (the glyphs already fill their box) and more line height, because the
 * characters are square and full of strokes.
 */
:lang(zh) .showcase-hero__title,
:lang(ja) .showcase-hero__title,
:lang(ko) .showcase-hero__title,
:lang(zh) .showcase-single__title,
:lang(ja) .showcase-single__title,
:lang(ko) .showcase-single__title {
  letter-spacing: 0;
  line-height: 1.18;
}

:lang(zh) .showcase-hero__lede,
:lang(ja) .showcase-hero__lede,
:lang(ko) .showcase-hero__lede {
  line-height: 1.9;
}

/* Services: three columns of plain text. */
.showcase-services {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
}

.showcase-services__columns h3 {
  margin-block: 0 0.5rem;
  font-weight: 700;
  line-height: 1.25;
}

/* Timeline: one entry per row, separated by a hairline. */
.showcase-timeline {
  margin-block-start: clamp(2.5rem, 8vh, 5rem);
}

.showcase-timeline__item {
  padding-block: clamp(1rem, 3vh, 1.75rem);
  border-block-start: 1px solid var(--wp--preset--color--surface);
}

.showcase-timeline__date {
  margin: 0 0 0.5rem;
  color: var(--wp--preset--color--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.showcase-timeline__item p:last-child {
  margin: 0;
  max-width: 44rem;
}

.showcase-closing {
  margin-block-start: clamp(2rem, 6vh, 4rem);
}

/* Works grid: three columns on desktop, one on a phone. */.wp-block-post-template.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 900px) {
  .wp-block-post-template.showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .wp-block-post-template.showcase-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Work card. */
.work-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.work-card__media {
  margin: 0;
  overflow: hidden;
  background: var(--wp--preset--color--surface);
}

.work-card__media a {
  display: block;
}

.work-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 220ms ease;
}

.work-card:hover .work-card__media img,
.work-card__media a:focus-visible img {
  transform: scale(1.03);
}

.work-card__title {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
}

.work-card__title a {
  color: var(--wp--preset--color--ink);
  text-decoration: none;
  transition: color 160ms ease;
}

.work-card__title a:hover,
.work-card__title a:focus-visible {
  color: var(--wp--preset--color--accent);
}

.work-card__meta,
.showcase-single__meta {
  /* The meta sits at the bottom so every card in a row aligns. */
  margin: auto 0 0;
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.work-card__meta a {
  color: inherit;
  text-decoration: none;
}

/* Archive head and pagination. */
.showcase-archive {
  padding-block: clamp(2rem, 6vh, 4rem);
}

.showcase-archive__head {
  margin-block-end: clamp(1.5rem, 4vh, 3rem);
}

.showcase-archive__head .wp-block-query-title,
.showcase-archive__title {
  margin: 0;
  font-size: var(--wp--preset--font-size--headline);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.showcase-pagination {
  margin-block-start: clamp(2rem, 5vh, 4rem);
}

/* Single work. */
.showcase-single {
  padding-block: clamp(2rem, 6vh, 4rem);
}

.showcase-single__head {
  display: block;
  margin-block-end: clamp(1.5rem, 5vh, 3rem);
}

.showcase-single__title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

.showcase-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-end: clamp(1rem, 3vw, 2rem);
}

.showcase-single__cover {
  margin: 0;
}

/*
 * The cover shows the whole piece. `object-fit: cover` cropped Behance boards
 * into a strip that read as three unrelated photos.
 */
.showcase-single__cover img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 68vh;
  margin-inline: auto;
}

/* Standard page. */
.page-standard {
  padding-block: clamp(2rem, 6vh, 4rem);
}

.page-standard__title {
  margin-block: 0 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/*
 * Photos: never taller than the viewport. A poster at full width can be three
 * times taller than the screen, which turns one image into several scrolls.
 */
.wp-block-post-content .wp-block-image img,
.entry-content .wp-block-image img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  margin-inline: auto;
}

/* Images inside a work are clickable: the viewer opens from them. */
.entry-content .wp-block-image img,
.wp-block-post-content .wp-block-image img {
  cursor: zoom-in;
}

/* ---------------------------------------------------------------------------
 * Image viewer. A native dialog on the top layer: no dependencies, Escape and
 * focus return come from the browser.
 * ------------------------------------------------------------------------ */

.dteatro-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(9 9 12 / 94%);
  color: #fff;
}

.dteatro-viewer::backdrop {
  background: rgb(9 9 12 / 94%);
}

.dteatro-viewer__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: clamp(1rem, 4vw, 3rem);
}

.dteatro-viewer__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.dteatro-viewer__close,
.dteatro-viewer__prev,
.dteatro-viewer__next {
  position: absolute;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 2px;
  background: rgb(9 9 12 / 60%);
  color: #fff;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.dteatro-viewer__close {
  top: 1rem;
  right: 1rem;
}

.dteatro-viewer__prev {
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
}

.dteatro-viewer__next {
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
}

.dteatro-viewer__close:hover,
.dteatro-viewer__prev:hover,
.dteatro-viewer__next:hover {
  background: rgb(9 9 12 / 85%);
}

.dteatro-viewer__close:focus-visible,
.dteatro-viewer__prev:focus-visible,
.dteatro-viewer__next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.dteatro-viewer__counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--wp--preset--font-size--small);
  letter-spacing: 0.1em;
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .work-card__media img {
    transition: none;
  }

  .work-card:hover .work-card__media img,
  .work-card__media a:focus-visible img {
    transform: none;
  }
}


/* ---------------------------------------------------------------------------
 * Footer: brand, menu, contact and languages on a dark ground.
 * ------------------------------------------------------------------------ */

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.site-footer__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer__title a {
  color: inherit;
  text-decoration: none;
}

.site-footer__tagline {
  margin: 0 0 1.5rem;
  max-width: 22rem;
  font-size: var(--wp--preset--font-size--small);
  opacity: 0.7;
}

.site-footer__label {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}

.site-footer__label--spaced {
  margin-block-start: 1.75rem;
}

.site-footer__list,
.site-footer__social,
.site-footer__langs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: var(--wp--preset--font-size--small);
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--wp--preset--color--accent);
}

.site-footer__social a,
.site-footer__langs a {
  opacity: 0.75;
}

.site-footer__langs a.is-current {
  color: var(--wp--preset--color--accent);
  opacity: 1;
}

.site-footer__pending {
  opacity: 0.55;
  font-style: italic;
}

.site-footer__legal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1.5rem;
  margin-block-start: clamp(2.5rem, 7vh, 4.5rem);
  padding-block-start: 1.5rem;
  /* La raya: en el portal de referencia es dorada, aqui es naranja. */
  border-block-start: 2px solid var(--wp--preset--color--accent);
  font-size: var(--wp--preset--font-size--small);
  opacity: 0.72;
}

.site-footer__legal p {
  margin: 0;
}

.site-footer__legal-links {
  text-align: right;
}

.site-footer__sep {
  opacity: 0.4;
  padding-inline: 0.35rem;
}

.site-footer__credit {
  grid-column: 1 / -1;
  text-align: center;
  opacity: 0.75;
}

.site-footer__credit a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-weight: 700;
}

.site-footer__credit-icon {
  width: 1em;
  height: 1em;
  flex: none;
}

@media (max-width: 600px) {
  .site-footer__legal {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__legal-links {
    text-align: left;
  }
}

/* ---------------------------------------------------------------------------
 * Header language selector.
 * ------------------------------------------------------------------------ */

.site-header__end {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

/* Language selector: a button that drops the list of languages. */
.site-langs {
  position: relative;
  margin: 0;
}

.site-langs__summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--wp--preset--color--surface);
  border-radius: 2px;
  color: var(--wp--preset--color--ink);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  list-style: none;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease;
}

.site-langs__summary::-webkit-details-marker {
  display: none;
}

.site-langs__summary:hover,
.site-langs[open] .site-langs__summary {
  border-color: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--accent);
}

.site-langs__flag {
  font-size: 1rem;
  line-height: 1;
}

.site-langs__caret {
  width: 0;
  height: 0;
  border-inline: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6;
  transition: transform 180ms ease;
}

.site-langs[open] .site-langs__caret {
  transform: rotate(180deg);
}

.site-langs__list {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 25;
  width: 12rem;
  margin: 0;
  padding: 0.4rem;
  border: 1px solid var(--wp--preset--color--surface);
  border-radius: 2px;
  background: var(--wp--preset--color--base);
  box-shadow: 0 18px 40px rgb(21 16 12 / 14%);
  list-style: none;
}

.site-langs__list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-radius: 2px;
  color: var(--wp--preset--color--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.site-langs__list a:hover,
.site-langs__list a:focus-visible {
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--accent);
}

.site-langs__list a.is-current {
  color: var(--wp--preset--color--accent);
  font-weight: 800;
}

/*
 * On a phone the bar keeps the selector out of the way. The mobile menu gets
 * its own copy (see ui.js) and the footer still has one.
 */
@media (max-width: 782px) {
  .site-header__end > .site-langs {
    display: none;
  }
}

/* Copy of the selector inside the mobile menu: closed until it is tapped. */
.site-langs--menu {
  display: block;
  width: 100%;
  margin-block-start: 1.75rem;
}

.site-langs--menu .site-langs__summary {
  justify-content: space-between;
  width: 100%;
}

.site-langs--menu .site-langs__list {
  position: static;
  width: 100%;
  margin-block-start: 0.4rem;
  box-shadow: none;
}

/*
 * The copy exists for the mobile menu only. Above the breakpoint the header
 * shows its own selector, so the copy stays out of the way.
 */
@media (min-width: 783px) {
  .site-langs--menu {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
 * Floating actions: WhatsApp and back to top.
 * ------------------------------------------------------------------------ */

.dteatro-actions {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.dteatro-actions__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 10px 24px rgb(21 16 12 / 22%);
  transition: transform 180ms ease, background-color 180ms ease;
}

.dteatro-actions__button:hover {
  transform: translateY(-2px);
}

.dteatro-actions__button--whatsapp {
  background: var(--wp--preset--color--accent);
  color: #fff;
}

.dteatro-actions__button--whatsapp:hover {
  background: var(--wp--preset--color--accent-deep);
}

.dteatro-actions__button--top {
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--ink);
  border: 1px solid var(--wp--preset--color--surface);
}

.dteatro-actions__button--top[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .dteatro-actions__button {
    transition: none;
  }
}

/*
 * Back to top: a small dance on hover. Six pixels and a quarter turn, not a
 * jump: the button is a tool, not a toy.
 */
@keyframes dteatro-dance {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-3px) rotate(-7deg);
  }

  50% {
    transform: translateY(-6px) rotate(0deg) scale(1.06);
  }

  75% {
    transform: translateY(-3px) rotate(7deg);
  }
}

.dteatro-actions__button--top:hover svg,
.dteatro-actions__button--top:focus-visible svg {
  animation: dteatro-dance 700ms ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .dteatro-actions__button--top:hover svg,
  .dteatro-actions__button--top:focus-visible svg {
    animation: none;
  }
}

/*
 * Sentinel that tells the script when the visitor has scrolled. It needs a
 * real size: an element with no area never leaves the viewport.
 */
[data-dteatro-sentinel] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Language loader: the page is covered while the language changes and the
 * Dteatro symbol dances in the middle.
 * ------------------------------------------------------------------------ */

.dteatro-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  /* Con algo de fondo se ve que la pagina sigue ahi detras. */
  background: rgb(21 16 12 / 86%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.dteatro-loader.is-visible {
  opacity: 1;
  visibility: visible;
}

.dteatro-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.dteatro-loader__logo {
  width: clamp(140px, 24vw, 240px);
  height: auto;
  animation: dteatro-loader-dance 900ms ease-in-out infinite;
}

.dteatro-loader__text {
  margin: 0;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.8;
}

@keyframes dteatro-loader-dance {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg) scale(1);
  }

  25% {
    transform: translateY(-14px) rotate(4deg) scale(1.05);
  }

  50% {
    transform: translateY(-4px) rotate(-3deg) scale(0.98);
  }

  75% {
    transform: translateY(-12px) rotate(3deg) scale(1.04);
  }
}

/* While the language loads, the page cannot be scrolled. */
.is-loading-language {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .dteatro-loader__logo {
    animation: none;
  }
}
