/* Página de inicio: fondo oscuro con brillo morado y baldosas blancas, al estilo de la
   portada de Proton. Oscuro por defecto; [data-theme="light"] lo pone claro (tema.js). */

:root {
  --fondo: #14121d;
  --brillo: #2d1f6b;
  --texto: #ffffff;
  --suave: #a9a4c6;
  --baldosa: #ffffff;
  --sombra: 0 12px 32px -12px rgb(0 0 0 / .65);
  --acento: #8f7bff;
  --hover: rgb(255 255 255 / .07);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --fondo: #f6f4fc;
  --brillo: #e3dbff;
  --texto: #1c1733;
  --suave: #625c7d;
  --baldosa: #ffffff;
  --sombra: 0 12px 30px -14px rgb(58 38 150 / .35), 0 0 0 1px rgb(40 28 100 / .06);
  --acento: #6d4aff;
  --hover: rgb(28 23 51 / .06);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texto);
  background: radial-gradient(ellipse 70% 60% at 50% 42%, var(--brillo), transparent 72%) var(--fondo);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- barra de arriba: marca y tema ---------- */

.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3vw, 28px) clamp(16px, 4vw, 44px);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.tema {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--acento);
  cursor: pointer;
}
.tema:hover { background: var(--hover); }
.tema:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.tema svg { width: 26px; height: 26px; }

/* ---------- centro: saludo y apps ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 10vh;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5.4vw, 58px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.lema {
  margin: 14px 0 0;
  font-size: clamp(16px, 2.3vw, 25px);
  color: var(--suave);
}
.lema a { color: var(--acento); }

.apps {
  width: 100%;
  margin-top: clamp(40px, 9vh, 88px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 176px));
  justify-content: center;
  gap: clamp(24px, 4vw, 48px) clamp(12px, 4vw, 56px);
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  outline: none;
}

.baldosa {
  width: clamp(96px, 20vw, 148px);
  aspect-ratio: 1;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 28%;
  background: var(--baldosa);
  box-shadow: var(--sombra);
  transition: transform .18s ease, box-shadow .18s ease;
}
.baldosa img { width: 60%; height: auto; }

.app:hover .baldosa,
.app:focus-visible .baldosa {
  transform: translateY(-4px);
  box-shadow: var(--sombra), 0 0 0 3px var(--acento),
              0 0 40px 6px color-mix(in srgb, var(--acento) 45%, transparent);
}
.app:active .baldosa { transform: translateY(-1px) scale(.97); }

.nombre { font-size: clamp(17px, 2vw, 23px); font-weight: 500; }
.que { font-size: clamp(13px, 1.5vw, 15px); line-height: 1.35; color: var(--suave); }

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