/* Palette C2 (PLAN.md § Brand). Token names match app/globals.css so the app can take this over. */
:root {
  --fondo: #f4f8f8;
  --superficie: #ffffff;
  --texto: #0f2224;
  --texto-secundario: #4c6265;
  --jade: #0e6e6a;
  --sobre-jade: #ffffff;
  --jade-suave: #d9efee;
  --jade-texto: #0b5652;
  --lima: #b7d43a;
  --rosa: #d6136f;
  --rosa-texto: #a80e58;
  --linea: #dae5e5;
  /* The art's own off-white. The image always sits on it, in both themes. */
  --lienzo: #eeedeb;
  --radio: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0b1718;
    --superficie: #132426;
    --texto: #e6f1f1;
    --texto-secundario: #98b0b2;
    --jade: #4cc9c0;
    --sobre-jade: #0b1718;
    --jade-suave: #173537;
    --jade-texto: #7fdcd5;
    --lima: #c9e35a;
    --rosa: #ff5faa;
    --rosa-texto: #ff8cc2;
    --linea: #2a4243;
  }
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font:
    400 1.0625rem/1.6 "DM Sans",
    system-ui,
    sans-serif;
}

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

a {
  color: var(--jade);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--jade-texto);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- layout ---------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px;
}

.hero {
  flex: 1;
  display: grid;
  gap: 28px;
  align-content: center;
  padding-block: 8px 40px;
}

.art {
  order: -1; /* image above the text on phones */
  justify-self: center;
  width: min(100%, 380px);
  padding: 12px;
  border-radius: 28px;
  background: var(--lienzo);
}
.art img {
  border-radius: 18px;
}

@media (min-width: 900px) {
  .page {
    padding: 32px 32px;
  }
  .hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
  }
  .art {
    order: 0;
    width: 100%;
    max-width: 520px;
    justify-self: end;
    padding: 16px;
    border-radius: 36px;
  }
}

/* ---------- copy ---------- */

.wordmark {
  margin: 0 0 20px;
  font:
    800 1.375rem/1 "Bricolage Grotesque",
    system-ui,
    sans-serif;
  color: var(--jade);
  letter-spacing: -0.01em;
}
.wordmark .dot {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  margin-left: 0.08em;
  border-radius: 50%;
  background: var(--rosa);
}

h1 {
  margin: 0;
  font:
    800 clamp(2.5rem, 5vw + 1.25rem, 4.25rem) / 1.02 "Bricolage Grotesque",
    system-ui,
    sans-serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 .mark {
  background: linear-gradient(transparent 62%, var(--lima) 62%, var(--lima) 92%, transparent 92%);
  padding-inline: 0.04em;
}
@media (prefers-color-scheme: dark) {
  /* Lima behind light text fails contrast; underline it instead. */
  h1 .mark {
    background: none;
    text-decoration: underline var(--lima);
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.12em;
  }
}

.sub {
  margin: 20px 0 0;
  font-size: 1.25rem;
  line-height: 1.45;
  max-width: 30ch;
}

/* Ajo's "working on it" line, rotated by app.js. */
.ajo-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--texto-secundario);
  font-size: 0.9375rem;
}
.ajo-line [data-ajo-line] {
  transition: opacity 0.3s ease;
}
.ajo-line [data-ajo-line].out {
  opacity: 0;
}
.pulse {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lima);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    transform: scale(0.6);
    opacity: 0.5;
  }
}

/* ---------- form ---------- */

.signup {
  margin-top: 32px;
  max-width: 480px;
}
.signup label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 2px solid var(--linea);
  border-radius: var(--radio);
  background: var(--superficie);
  color: var(--texto);
  font: inherit; /* >= 16px: no zoom on iOS */
}
input[type="email"]::placeholder {
  color: var(--texto-secundario);
  opacity: 1;
}
input[type="email"]:focus-visible {
  border-color: var(--jade);
  outline-offset: 1px;
}
input[aria-invalid="true"] {
  border-color: var(--rosa);
}
button {
  flex: 0 0 auto;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radio);
  background: var(--jade);
  color: var(--sobre-jade);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:hover {
  background: var(--jade-texto);
}
button:disabled {
  cursor: progress;
  opacity: 0.75;
}
@media (max-width: 420px) {
  button {
    flex: 1 1 100%;
  }
}

.help {
  margin: 8px 0 0;
  color: var(--texto-secundario);
  font-size: 0.9375rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile:not(:empty) {
  margin-top: 12px;
}

.msg {
  margin: 12px 0 0;
  font-weight: 600;
}
.msg-error {
  color: var(--rosa-texto);
}

.status {
  max-width: 480px;
}
.status:not(:empty) {
  margin-top: 16px;
}
.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--linea);
  border-radius: 20px;
  background: var(--superficie);
}
.card p {
  margin: 0;
}
.card-title {
  font:
    800 1.375rem/1.2 "Bricolage Grotesque",
    system-ui,
    sans-serif;
}
.card-title:focus {
  outline: none;
}
.card-error {
  border-color: var(--rosa);
}
.pose {
  flex: none;
  width: 120px;
}
.pose img {
  border-radius: 12px;
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--linea);
  color: var(--texto-secundario);
  font-size: 0.9375rem;
}
.footer p {
  margin: 0;
}
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- simple pages (gracias, ups, 404, privacidad) ---------- */

.simple {
  flex: 1;
  max-width: 640px;
  padding-block: 24px 48px;
}
.simple h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
}
.simple .pose {
  width: 200px;
  margin-bottom: 24px;
}
.simple h2 {
  margin: 32px 0 8px;
  font:
    800 1.25rem/1.3 "Bricolage Grotesque",
    system-ui,
    sans-serif;
}
.simple p,
.simple li {
  max-width: 65ch;
}
.aviso-borrador {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 2px solid var(--rosa);
  border-radius: var(--radio);
  color: var(--rosa-texto);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .pulse {
    animation: none;
  }
  .ajo-line [data-ajo-line] {
    transition: none;
  }
}

.wordmark a {
  color: inherit;
  text-decoration: none;
}
