:root {
  --coral: #f7704a;
  --coral-dark: #e85a33;
  --lavender: #7b61e8;
  --lavender-soft: #ede8ff;
  --canvas: #f7f5f3;
  --surface: #ffffff;
  --ink: #1d1b1a;
  --muted: #6f6964;
  --line: #e9e5e2;
  --radius: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141211;
    --surface: #1f1d1c;
    --ink: #f3efec;
    --muted: #a8a29e;
    --line: #35322f;
    --lavender-soft: #3a3361;
  }
}

* {
  box-sizing: border-box;
}

/* Sin esto, reglas como `display: grid` o `inline-block` pisan el atributo
   `hidden` y los elementos ocultos se siguen viendo. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--coral-dark);
}

.wrap {
  width: min(100% - 32px, 720px);
  margin-inline: auto;
}

/* Un solo idioma a la vez; el idioma lo decide site.js */
[data-lang] {
  display: none;
}
html[lang="en"] [data-lang="en"],
html[lang="es"] [data-lang="es"] {
  display: revert;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--coral);
  color: #fff;
}

.hero {
  padding: 40px 0 24px;
  text-align: center;
}

.hero .logo {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(247, 112, 74, 0.35);
}

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 24px 0 12px;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 34em;
  margin: 0 auto 28px;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 15px 28px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 10px 24px rgba(247, 112, 74, 0.35);
}

.btn.secondary {
  background: var(--lavender-soft);
  color: var(--lavender);
  box-shadow: none;
}

.btn[aria-disabled="true"] {
  background: var(--line);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

.features {
  display: grid;
  gap: 14px;
  margin: 36px 0;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.emoji {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 6px;
}

footer.site {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

footer.site a {
  color: var(--muted);
}

/* Política de privacidad */
.doc h1 {
  font-size: 2rem;
  margin-top: 8px;
}

.doc h2 {
  margin: 28px 0 6px;
  font-size: 1.2rem;
}

.doc p,
.doc li {
  color: var(--ink);
}

.doc .meta {
  color: var(--muted);
}

/* Página de invitación */
.invite {
  text-align: center;
  padding: 24px 0 8px;
}

.invite .tile {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 28px;
  background: var(--lavender-soft);
  display: grid;
  place-items: center;
  font-size: 2.6rem;
}

.invite .title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.invite .actions {
  display: grid;
  gap: 12px;
  margin: 22px auto 0;
  max-width: 340px;
}

.invite .steps {
  text-align: left;
  margin: 28px auto 0;
  max-width: 420px;
  color: var(--muted);
}

.code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ink);
}

.notice {
  margin: 20px auto 0;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
}
