Files
gruperly/apps/web/src/index.css
Jose Selesan df510cfe45 fix(web): evitar el zoom residual de iOS al cerrar el teclado
iOS (Safari y standalone) auto-zoomea al enfocar un control de formulario
con font-size < 16px y, al cerrar el teclado, no restaura el scale: la app
quedaba con zoom hasta que el usuario hacía pinch-out o recargaba.

- Input sube a 16px en mobile (text-base sm:text-sm), manteniendo los
  14px de escritorio. iPad queda fuera porque el zoom-on-focus es
  exclusivo de iPhone.
- El prefijo $ de GroupForm sigue el mismo tamaño para no desalinearse.
- Guard en @layer base para textareas/selects/inputs crudos futuros.
2026-09-28 22:57:22 -03:00

183 lines
5.6 KiB
CSS

@import "tailwindcss";
/* Inter variable auto-hospedada. Declaramos solo latin y latin-ext a mano en
lugar de importar el wght.css de @fontsource: ese trae los 7 subsets y el
service worker precachea todo lo emitido, casi 1 MB que nunca se descarga.
El archivo .woff2 sí viene del paquete, con hash y cache immutable. */
@font-face {
font-family: "Inter Variable";
font-style: normal;
font-display: swap;
font-weight: 100 900;
src: url("@fontsource-variable/inter/files/inter-latin-wght-normal.woff2") format("woff2-variations");
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;
}
@font-face {
font-family: "Inter Variable";
font-style: normal;
font-display: swap;
font-weight: 100 900;
src: url("@fontsource-variable/inter/files/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@custom-variant dark (&:where(.dark, .dark *));
@theme inline {
/* Escala de marca (identidad fija, igual a la landing) */
--color-brand-50: var(--brand-50);
--color-brand-100: var(--brand-100);
--color-brand-200: var(--brand-200);
--color-brand-300: var(--brand-300);
--color-brand-400: var(--brand-400);
--color-brand-500: var(--brand-500);
--color-brand-600: var(--brand-600);
--color-brand-700: var(--brand-700);
--color-brand-800: var(--brand-800);
--color-brand-900: var(--brand-900);
--color-brand-950: var(--brand-950);
/* Colores de la gráfica del isotipo/logotipo */
--color-brand-night: var(--brand-night);
--color-brand-celeste: var(--brand-celeste);
--color-brand-cloud: var(--brand-cloud);
/* Tokens semánticos (conmutan con tema claro/oscuro) */
--color-background: var(--background);
--color-surface: var(--surface);
--color-primary: var(--primary);
--color-primary-soft: var(--primary-soft);
--color-foreground: var(--foreground);
--color-accent: var(--accent);
--color-accent-strong: var(--accent-strong);
--color-accent-soft: var(--accent-soft);
--color-accent-fg: var(--accent-fg);
--color-border: var(--border);
--color-on-accent: var(--on-accent);
--color-overlay: var(--overlay);
--color-success: var(--success);
--color-success-soft: var(--success-soft);
--color-warning: var(--warning);
--color-warning-soft: var(--warning-soft);
--color-danger: var(--danger);
--color-danger-soft: var(--danger-soft);
/* Border radius por defecto */
--radius-xl: 0.75rem;
/* Tipografía (igual que la landing) */
/* @fontsource-variable/inter registra la familia como "Inter Variable" */
--font-sans: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
/* Animaciones */
--animate-fade-in: fade-in 0.2s ease-out;
--animate-step-enter: step-enter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes step-enter {
from {
opacity: 0;
transform: translateX(1.5rem);
}
to {
opacity: 1;
transform: translateX(0);
}
}
}
:root {
color-scheme: light;
/* Escala de marca */
--brand-50: #eef4ff;
--brand-100: #dbe6fe;
--brand-200: #bfd3fe;
--brand-300: #93b4fd;
--brand-400: #608afa;
--brand-500: #3b63f5;
--brand-600: #2544ea;
--brand-700: #1d33d8;
--brand-800: #1e2cb0;
--brand-900: #1e2b8b;
--brand-950: #171d54;
--brand-night: #171d54;
--brand-celeste: #93b4fd;
--brand-cloud: #eef4ff;
/* Tema claro */
--background: #ffffff;
--surface: #ffffff;
--primary: #0f172a;
--primary-soft: #f1f5f9;
--foreground: #475569;
--accent: #2544ea;
--accent-strong: #1d33d8;
--accent-soft: #eef4ff;
--accent-fg: #2544ea;
--border: #e2e8f0;
--on-accent: #ffffff;
--overlay: rgb(0 0 0 / 0.2);
--success: #059669;
--success-soft: #ecfdf5;
--warning: #b45309;
--warning-soft: #fffbeb;
--danger: #f43f5e;
--danger-soft: #fff1f2;
}
.dark {
color-scheme: dark;
/* Tema oscuro (paleta slate/brand de la landing) */
--background: #020617;
--surface: #0f172a;
--primary: #f1f5f9;
--primary-soft: #1e293b;
--foreground: #94a3b8;
--accent: #2544ea;
--accent-strong: #1d33d8;
--accent-soft: color-mix(in srgb, var(--brand-500) 15%, transparent);
--accent-fg: #93b4fd;
--border: #1e293b;
--on-accent: #ffffff;
--overlay: rgb(0 0 0 / 0.4);
--success: #34d399;
--success-soft: color-mix(in srgb, var(--success) 15%, transparent);
--warning: #fcd34d;
--warning-soft: color-mix(in srgb, var(--warning) 15%, transparent);
--danger: #fb7185;
--danger-soft: color-mix(in srgb, var(--danger) 15%, transparent);
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-primary antialiased transition-colors;
min-height: 100dvh;
}
/* iOS (Safari y standalone) hace auto-zoom al enfocar un control de
formulario con font-size < 16px, y al cerrar el teclado no restaura el
scale: la app queda con zoom. El `Input` ya sube a 16px en mobile
(`text-base sm:text-sm`); esto es la red de seguridad para textareas,
selects o inputs crudos que se agreguen más adelante.
El 639px calza con el breakpoint `sm` de Tailwind. El `!important` es
a propósito: sin él, una clase `text-sm` en un input futuro ganaría por
especificidad y reintroduciría el bug sin avisar. */
@media (max-width: 639px) {
input,
textarea,
select {
font-size: 16px !important;
}
}
}