/* Landing de TWIRO (/ y /en). Las páginas legales usan styles.css. */
:root {
  --navy: #020a34;
  --ink: #0b1238;
  --text: #f3f1ff;
  --muted: #b9b8f0;
  --cyan: #00deff;
  --violet: #a146fe;
  --pink: #fd2ed5;
  --gold: #fec700;
  --line: rgba(185, 184, 240, 0.18);
  --page: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 8px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* Cielo: halos de color, estrellas y los cuadrados redondeados gigantes del fondo de la app. */
.sky {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.8) 50%, transparent 51%) 0 0 / 310px 270px,
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(255, 255, 255, 0.55) 50%, transparent 51%) 0 0 / 430px 390px,
    radial-gradient(1px 1px at 45% 85%, rgba(190, 200, 255, 0.6) 50%, transparent 51%) 0 0 / 230px 330px,
    radial-gradient(900px 700px at 78% 320px, rgba(139, 92, 246, 0.34), transparent 70%),
    radial-gradient(700px 600px at 8% 620px, rgba(59, 123, 255, 0.2), transparent 70%),
    radial-gradient(900px 700px at 50% 1500px, rgba(59, 123, 255, 0.16), transparent 70%),
    radial-gradient(900px 800px at 50% 100%, rgba(255, 79, 168, 0.16), transparent 70%);
}

.square {
  position: absolute;
  z-index: 0;
  width: var(--side);
  height: var(--side);
  border-radius: 22%;
  background: rgba(150, 165, 255, 0.045);
  pointer-events: none;
}

.bar,
main,
.foot {
  position: relative;
  z-index: 1;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Barra superior */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.wordmark {
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: #fff;
}

/* La i minúscula de punto dorado del logotipo. */
.wordmark .i {
  position: relative;
}

.wordmark .i::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0.13em;
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
}

.bar nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  font-size: 16px;
}

.bar nav a,
.foot a {
  color: var(--muted);
  text-decoration: none;
}

.bar nav a:hover,
.foot a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Portada */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(24px, 5vw, 64px) clamp(56px, 8vw, 112px);
}

.hero h1 {
  font-size: clamp(44px, 7.4vw, 88px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lede {
  max-width: 30em;
  margin-top: 24px;
  font-size: clamp(19px, 2vw, 22px);
  color: var(--muted);
  text-wrap: pretty;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* Botón de tienda con forma de tecla, como los de la app. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 11px 22px 12px 18px;
  border: 1.5px solid rgba(170, 182, 255, 0.3);
  border-radius: 18px;
  background: linear-gradient(180deg, #232d66, #161d48);
  box-shadow: 0 5px 0 #080c26, 0 14px 30px rgba(2, 4, 24, 0.5);
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
  cursor: default;
}

.store svg {
  flex: none;
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.store small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.store b {
  display: block;
  font-size: 20px;
  font-weight: 600;
}

.store[href] {
  border-color: rgba(254, 199, 0, 0.75);
  cursor: pointer;
  transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}

.store[href]:hover {
  background: linear-gradient(180deg, #2b3678, #1a2254);
}

.store[href]:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #080c26, 0 6px 14px rgba(2, 4, 24, 0.5);
}

.note {
  margin-top: 20px;
  font-size: 16px;
  color: var(--muted);
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 13%;
}

.hero-art .nebula {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(150%, 700px);
  max-width: none;
  transform: translate(-50%, -50%) rotate(18deg);
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}

.hero-phone {
  position: relative;
  width: min(100%, 330px);
  transform: rotate(-3deg);
}

.hero-phone .mascot {
  position: absolute;
  left: 46%;
  bottom: calc(100% - 7%);
  z-index: 2;
  width: 40%;
  filter: drop-shadow(0 10px 18px rgba(2, 4, 24, 0.55));
}

/* Teléfono: el marco se mide en cqw para escalar con la celda. */
.shot {
  container-type: inline-size;
}

.phone {
  position: relative;
  z-index: 1;
  padding: 3.4cqw;
  border-radius: 17cqw;
  background: linear-gradient(160deg, #222c5e, #070b25 55%, #1a2150);
  box-shadow:
    inset 0 0 0 1.5px rgba(170, 185, 255, 0.4),
    0 30px 60px rgba(2, 4, 24, 0.7),
    0 0 90px rgba(80, 110, 255, 0.26);
}

.phone img {
  width: 100%;
  border-radius: 13.8cqw;
}

.phone::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 6.2cqw;
  width: 27cqw;
  height: 7.6cqw;
  border-radius: 4cqw;
  background: #000;
  transform: translateX(-50%);
}

/* Recorrido: el tubo de luz va de un núcleo cian a uno rosa rodeando las capturas, como un nivel. */
.tour {
  padding-block: clamp(32px, 6vw, 72px);
}

.tour h2,
.get h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  text-wrap: balance;
}

.tour-scroll {
  margin-top: clamp(28px, 4vw, 48px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.tour-scroll::-webkit-scrollbar {
  display: none;
}

.tour-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 250px);
  gap: 44px;
  width: max-content;
  margin: 0 auto;
  padding: 0 calc(var(--gutter) + 26px) 64px;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  scroll-snap-align: center;
}

.step h3 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.step p {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.35;
  color: var(--muted);
  text-wrap: pretty;
}

.step .shot {
  margin-top: auto;
  padding-top: 56px;
}

.tube {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.tube path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset 2600ms cubic-bezier(0.45, 0.05, 0.3, 1);
}

.core {
  position: absolute;
  z-index: 1;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  pointer-events: none;
}

.core-end {
  opacity: 0.35;
  transform: scale(0.8);
  transition: opacity 400ms ease-out 2300ms, transform 400ms cubic-bezier(0.3, 1.6, 0.5, 1) 2300ms;
}

.lit .core-end {
  opacity: 1;
  transform: scale(1);
}

/* Cierre */
.get {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(16px, 3vw, 40px) clamp(64px, 9vw, 120px);
  text-align: center;
}

.planet {
  position: relative;
  width: min(64vw, 280px);
  margin-top: 84px;
}

.planet .mascot {
  position: absolute;
  left: 50%;
  bottom: 71%;
  width: 46%;
  transform: translateX(-50%);
}

.get h2 {
  margin-top: 28px;
}

.get .lede {
  margin-top: 14px;
}

.get .stores {
  justify-content: center;
}

/* Pie */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding-block: 26px 34px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    padding-top: 90px;
  }

  .hero-phone {
    width: min(68vw, 300px);
  }

  .bar nav a.legal {
    display: none;
  }

  .tour-track {
    margin: 0;
  }
}

@media (max-width: 440px) {
  .store {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tube path,
  .core-end,
  .store[href] {
    transition: none;
  }
}
