/* The Fruit Juice Proyect: piezas comunes de la marca (colores, letras, botones, campos y movimiento).
   La usan la web pública, entrar/crear cuenta y el portal. Colores sacados del logo (la gota). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fuentes/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fuentes/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Colores de la naranja */
  --zumo: #ff7a1a;          /* el naranja de la marca */
  --pulpa: #ffb04f;         /* zumo claro, brillos */
  --piel: #e2560b;          /* naranja hondo: texto naranja sobre claro, pulsado */
  --albedo: #fff4e6;        /* lo blanco de la naranja: fondos suaves */
  --blanco: #fffcf7;        /* papel */
  --tinta: #1b1411;         /* texto */
  --tinta-2: #51453e;       /* texto secundario */
  --gris: #8a7e76;          /* notas */
  --linea: rgba(27, 20, 17, 0.12);
  --hoja: #2e8b4e;          /* hecho, bien */
  --error: #c2321b;
  --degradado: linear-gradient(140deg, var(--pulpa) 0%, var(--zumo) 52%, var(--piel) 100%);

  /* Letras */
  --titulo: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --texto: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Formas */
  --r-s: 10px;
  --r: 16px;
  --r-l: 28px;
  --sombra: 0 1px 2px rgba(64, 28, 4, 0.06), 0 8px 24px -8px rgba(64, 28, 4, 0.18);
  --sombra-zumo: 0 10px 30px -10px rgba(226, 86, 11, 0.65);

  /* Movimiento */
  --salida: cubic-bezier(0.22, 1, 0.36, 1);
  --rebote: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blanco);
  color: var(--tinta);
  font: 400 17px/1.55 var(--texto);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }

/* Saltar al contenido (teclado) */
.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--tinta); color: var(--blanco); padding: 10px 16px; border-radius: var(--r-s);
}
.saltar:focus { top: 12px; }
.oculto {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--zumo); outline-offset: 3px; border-radius: 6px; }

/* --- Botones ------------------------------------------------------------------------- */
.btn {
  --alto: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--alto); padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 16px/1 var(--texto); text-decoration: none; white-space: nowrap; isolation: isolate; overflow: hidden;
  transition: transform 0.35s var(--rebote), box-shadow 0.35s var(--salida), background-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-zumo { background: var(--degradado); color: #fff; box-shadow: var(--sombra-zumo); }
.btn-zumo::after {          /* brillo que cruza el botón al pasar por encima */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.7s var(--salida);
}
.btn-zumo:hover::after { transform: translateX(120%); }
.btn-zumo:hover { box-shadow: 0 16px 36px -10px rgba(226, 86, 11, 0.75); }
.btn-tinta { background: var(--tinta); color: var(--blanco); }
.btn-tinta:hover { background: #33261f; }
.btn-claro { background: var(--blanco); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn-claro:hover { box-shadow: inset 0 0 0 1.5px var(--tinta); }
.btn-chico { --alto: 42px; padding: 0 18px; font-size: 15px; }
.btn-ancho { width: 100%; }

/* --- Campos ---------------------------------------------------------------------------- */
.campo { display: grid; gap: 7px; }
.campo label { font-weight: 600; font-size: 15px; }
.campo .nota { color: var(--gris); font-size: 14px; }
.entrada {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-s);
  background: #fff; border: 1.5px solid var(--linea); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.entrada:hover { border-color: rgba(27, 20, 17, 0.28); }
.entrada:focus { border-color: var(--zumo); box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.18); }
.entrada[aria-invalid="true"] { border-color: var(--error); }
.aviso-error {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-s); background: #fdeae5; color: #8a2311; font-size: 15px;
}
