:root {
  --black: #000000;
  --field: #2a2a2a;
  --line: #2a2a2a;
  --white: #ffffff;
  --dim: #bdbdbd;
  --muted: #8a8a8a;
  --c1: #ff4f9a;
  --c2: #e15cff;
  --c3: #7a7dff;
  --c4: #3ec6ff;
  --c5: #3ee08a;
  --c6: #e7f25a;
  --c7: #ff6a3d;
  --spectrum: linear-gradient(90deg, var(--c1) 0%, var(--c2) 16%, var(--c3) 33%, var(--c4) 50%, var(--c5) 66%, var(--c6) 82%, var(--c7) 100%);
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--c1);
  color: var(--black);
}

.stage {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--black);
}

.brand {
  grid-column: 2;
  grid-row: 1;
  padding: 22px 28px 0;
  background: var(--black);
}

.brand h1 {
  margin: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.spectrum {
  height: 3px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--spectrum);
}

.langs {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.langs a {
  color: var(--muted);
  text-decoration: none;
}

.langs a.is-current {
  color: var(--white);
}

.arte-1 { color: var(--c1); }
.arte-2 { color: var(--c2); }
.arte-3 { color: var(--c3); }
.arte-4 { color: var(--c4); }
.arte-5 { color: var(--c5); }
.arte-6 { color: var(--c6); }
.arte-7 { color: var(--c7); }
.arte-8 { color: var(--c1); }
.arte-9 { color: var(--c2); }
.arte-10 { color: var(--c3); }

.mosaic {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: var(--black);
}

.tile {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #111;
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 36px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tile-arquitectura { grid-column: 1; grid-row: 1 / span 2; }
.tile-musica { grid-column: 2; grid-row: 1; }
.tile-danza { grid-column: 3; grid-row: 1; }
.tile-libros { grid-column: 4; grid-row: 1; }
.tile-pintura { grid-column: 2; grid-row: 2; }
.tile-escultura { grid-column: 3; grid-row: 2; }
.tile-cine { grid-column: 4; grid-row: 2; }

.gate {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  overflow: auto;
  padding: 18px 28px 28px;
  background: var(--black);
  color-scheme: dark;
}

.switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 22px;
  background: #121212;
  border-radius: 999px;
}

.switch-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--white);
  transition: transform 0.35s ease;
}

.switch.is-register .switch-glider {
  transform: translateX(100%);
}

.switch [role="tab"] {
  position: relative;
  z-index: 1;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
}

.switch [role="tab"][aria-selected="true"] {
  color: var(--black);
}

.gate-form h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.lede {
  margin: 8px 0 20px;
  color: var(--dim);
  font-size: 15px;
}

.field {
  margin-bottom: 14px;
}

.field label,
.disciplines legend {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.control {
  position: relative;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #6e6e6e;
  border-radius: 14px;
  background: var(--field);
  color: var(--white);
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}

.field input:focus {
  outline: none;
  border-color: var(--white);
  background: var(--field);
}

.field input[aria-invalid="true"] {
  border-color: var(--c1);
  background: var(--field);
}

.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--white);
  caret-color: var(--white);
  box-shadow: 0 0 0 1000px var(--field) inset;
}

.field select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #6e6e6e;
  border-radius: 14px;
  background: var(--field);
  color: var(--white);
  font-size: 16px;
}

.field select:disabled {
  opacity: 0.6;
}
  outline: none;
  border-color: var(--white);
}

.field select[aria-invalid="true"] {
  border-color: var(--c1);
}

.control-handle span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.control-handle input {
  padding-left: 36px;
}

.reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field:has(.reveal) input {
  padding-right: 92px;
}

.hint,
.error {
  margin: 6px 0 0;
  font-size: 13px;
}

.hint {
  color: var(--muted);
}

.error {
  color: #ff9ec4;
}

.error:empty {
  display: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 16px;
  color: var(--dim);
  font-size: 14px;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--c1);
}

.disciplines {
  min-inline-size: 0;
  margin: 4px 0 16px;
  padding: 0;
  border: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.chip-spectator span {
  border-color: var(--white);
  color: var(--white);
}

.chip:has(input:checked) span {
  color: var(--black);
  border-color: transparent;
  background: var(--white);
}

.chip input:focus-visible + span,
.switch [role="tab"]:focus-visible,
.reveal:focus-visible,
.submit:focus-visible,
.swap a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.submit:hover {
  background: #e8e8e8;
}

.status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--c1);
  background: #101010;
  color: var(--white);
  font-size: 14px;
  line-height: 1.45;
}

.swap {
  margin: 16px 0 0;
  color: var(--dim);
  font-size: 14px;
  text-align: center;
}

.swap a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--c1);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile img {
    transition: transform 0.6s ease;
  }

  .tile:hover img {
    transform: scale(1.045);
  }
}

@media (max-width: 1080px), (max-height: 700px) and (max-width: 1200px) {
  .stage {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }

  .brand {
    order: 1;
    padding: calc(16px + env(safe-area-inset-top)) 20px 8px;
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
  }

  .brand img {
    width: min(100%, 220px);
  }

  .mosaic {
    order: 2;
    display: flex;
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    height: auto;
    padding: 0 0 0 16px;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    scrollbar-width: none;
  }

  .mosaic::-webkit-scrollbar {
    display: none;
  }

  .tile {
    flex: 0 0 auto;
    width: 46vw;
    max-width: 200px;
    aspect-ratio: 3 / 4;
    height: auto;
    scroll-snap-align: start;
    grid-column: auto;
    grid-row: auto;
  }

  .tile:last-child {
    margin-right: 20px;
  }

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

  .gate {
    order: 3;
    overflow: visible;
    padding: 18px 20px calc(28px + env(safe-area-inset-bottom));
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
  }
}

.missing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 32px 24px;
  background: var(--black);
}

.missing img {
  width: min(100%, 280px);
  height: auto;
}

.missing h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.missing a {
  color: var(--white);
  width: fit-content;
  border-bottom: 1px solid var(--c1);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .switch-glider,
  .tile img {
    transition: none;
  }
}
