/* Tu clóset Myl · Tokens de marca (Manual de identidad · "Un solo hilo")
   Vino #351018 y crema #E1D5C5, con hueso #F2EBE1 y nude #B8948A de apoyo.
   Tipografía Figtree. Forma: redondeada, suave, femenina y cercana. */
:root {
  --vino: #351018;
  --vino-2: #4A1C27;
  --vino-3: #6A2E3B;
  --crema: #E1D5C5;
  --crema-2: #D6C7B3;
  --hueso: #F2EBE1;
  --hueso-2: #EAE0D3;
  --blanco: #FBF8F3;
  --nude: #B8948A;
  --nude-2: #CDB0A6;
  --tinta: #351018;
  --suave: #7C5A5E;
  --linea: #DCCFBF;
  --ok: #4F7A55;
  --warn: #A8742A;
  --bad: #A2343B;

  /* Alias para el panel (hereda la estructura del sistema TWOGEN) */
  --negro: var(--vino);
  --negro-2: var(--vino-2);
  --negro-3: var(--vino-3);
  --hueso-3: var(--linea);
  --dorado: var(--nude);
  --dorado-claro: var(--nude-2);
  --grafito: var(--suave);
  --grafito-claro: #B9A39F;

  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --track-label: 0.22em;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1360px;
  --radius: 999px;
  --r-card: 22px;
  --r-sm: 14px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-weight: 400; font-size: 15.5px; line-height: 1.6;
  background: var(--hueso); color: var(--tinta);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; line-height: 1.08; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--nude); outline-offset: 3px; }
::selection { background: var(--vino); color: var(--crema); }

.label { font-size: 11px; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* Botones: píldora vino; al pasar, un hilo crema la recorre */
.btn {
  --b: var(--vino); --t: var(--crema); --h: var(--vino-3);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  background: var(--b); color: var(--t); border: 1.5px solid var(--b);
  overflow: hidden; isolation: isolate; transition: color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--h); border-radius: inherit; transform: scale(0, 1); transform-origin: left; transition: transform .55s var(--ease); }
.btn:hover::before { transform: scale(1, 1); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled::before { display: none; }
.btn--light { --b: var(--crema); --t: var(--vino); --h: var(--blanco); }
.btn--ghost { --b: transparent; --t: currentColor; --h: rgba(53,16,24,.06); border-color: currentColor; }
.btn--ghost-light { --b: transparent; --t: var(--crema); --h: rgba(225,213,197,.12); border-color: rgba(225,213,197,.6); }
.btn--nude { --b: var(--nude); --t: var(--vino); --h: var(--nude-2); }
.btn--wa { --b: transparent; --t: currentColor; --h: rgba(53,16,24,.06); border-color: currentColor; }
.btn--dark { --b: var(--vino); --t: var(--crema); }
.btn--gold { --b: transparent; --t: var(--vino); border-color: var(--vino); --h: rgba(53,16,24,.06); }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Campos */
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--suave); }
.input {
  width: 100%; min-height: 50px; padding: 12px 18px; border-radius: var(--r-sm);
  background: var(--blanco); border: 1.5px solid var(--linea); color: inherit; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.input:focus { border-color: var(--vino); box-shadow: 0 0 0 4px rgba(53,16,24,.07); }
textarea.input { min-height: 104px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }

/* Aviso */
.toasts { position: fixed; z-index: 400; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 18px;
  background: var(--vino); color: var(--crema); font-size: 14px; box-shadow: 0 18px 40px rgba(53,16,24,.28); animation: toastIn .5s var(--ease);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--nude); flex: none; }
.toast--bad::before { background: #F08A8A; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 900px), (hover: none) {
  input, select, textarea, .input { font-size: 16px !important; }
}
