/* Página de entrada. Mismos tokens que app.css (DESIGN.md): claro y oscuro según el teléfono
   (y el elegido en «Tu cuenta» si la página carga tema.js). */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('fonts/figtree-latin-wght.woff2') format('woff2-variations'), url('fonts/figtree-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --fill: #ebf0f6;
  --border: #e1e8f0;
  --border-strong: #c9d3df;
  --input-border: #7f8ea3;
  --text: #0f2340;
  --muted: #46566b;
  --accent: #1a66cc;
  --accent-hover: #1557b0;
  --accent-text: #ffffff;
  --ring: #1a66cc;
  --ink: #0f2340;
  --ink-text: #ffffff;
  --danger: #b42318;
  --danger-soft: #fde8e5;
  --selection: rgb(26 102 204 / 18%);
  --shadow-float: 0 14px 36px -10px rgb(15 35 64 / 22%), 0 0 0 1px rgb(15 35 64 / 5%);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0a1220;
    --surface: #111b2b;
    --fill: #1c2a40;
    --border: #22324b;
    --border-strong: #34496b;
    --input-border: #5f7493;
    --text: #e8eef6;
    --muted: #a7b4c6;
    --accent: #5d9ff2;
    --accent-hover: #7db2f5;
    --accent-text: #07111f;
    --ring: #7db2f5;
    --ink: #e8eef6;
    --ink-text: #0f2340;
    --danger: #ff8d80;
    --danger-soft: #3a1816;
    --selection: rgb(93 159 242 / 30%);
    --shadow-float: 0 18px 44px -12px rgb(0 0 0 / 65%), 0 0 0 1px rgb(255 255 255 / 6%);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0a1220;
  --surface: #111b2b;
  --fill: #1c2a40;
  --border: #22324b;
  --border-strong: #34496b;
  --input-border: #5f7493;
  --text: #e8eef6;
  --muted: #a7b4c6;
  --accent: #5d9ff2;
  --accent-hover: #7db2f5;
  --accent-text: #07111f;
  --ring: #7db2f5;
  --ink: #e8eef6;
  --ink-text: #0f2340;
  --danger: #ff8d80;
  --danger-soft: #3a1816;
  --selection: rgb(93 159 242 / 30%);
  --shadow-float: 0 18px 44px -12px rgb(0 0 0 / 65%), 0 0 0 1px rgb(255 255 255 / 6%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  accent-color: var(--accent);
}

::selection {
  background: var(--selection);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

.caja {
  width: 100%;
  max-width: 380px;
  padding: 32px 24px 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
}

/* Marca: el monograma «O» en tinta, como en la cabecera del tablero. */
.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.marca::before {
  content: 'O';
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--ink-text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

h1 {
  margin: 20px 0 24px;
  font-size: 26px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

input {
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--selection);
}

button,
.google {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, background-color 0.15s;
}

button {
  margin-top: 8px;
  border: 0;
  background: var(--accent);
  color: var(--accent-text);
}

button:hover {
  background: var(--accent-hover);
}

button:focus-visible,
.google:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

button:active,
.google:active {
  transform: scale(0.98);
}

.google {
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.google:hover {
  background: var(--fill);
}

.o {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.o::before,
.o::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

.error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
