/* Ashe. Los roles de color se resuelven según el esquema de cada superficie. */
:root {
  color-scheme: light dark;
  --plum: #241c28;
  --plum-raised: #2f2433;
  --plum-line: #574653;
  --plum-hover: #51404d;
  --ivory: #f8f6f2;
  --paper: #fff;
  --ink: #25212a;
  --burgundy: #713746;
  --burgundy-hover: #582a37;
  --apricot: #e8b698;
  --on-plum: #fff;
  --on-plum-muted: #ded0d4;

  --canvas: light-dark(var(--ivory), var(--plum));
  --surface: light-dark(var(--paper), var(--plum-raised));
  --surface-alt: light-dark(#f0ece8, #3a2e3d);
  --surface-hover: light-dark(#e9e1dc, #493a4b);
  --text: light-dark(var(--ink), #faf0ed);
  --text-secondary: light-dark(#5c535c, #ded0d4);
  --text-muted: light-dark(#675e65, #c4b5bf);
  --line: light-dark(#ded8d3, #594b59);
  --control-line: light-dark(#81767d, #ae98a7);
  --action: light-dark(var(--burgundy), var(--apricot));
  --action-hover: light-dark(var(--burgundy-hover), #f3cbb5);
  --action-soft: light-dark(#f4e9e8, #49313e);
  --on-action: light-dark(var(--paper), var(--plum));
  --focus-ring: light-dark(var(--burgundy), var(--apricot));

  --success: light-dark(#315946, #b9e3ca);
  --success-soft: light-dark(#e6efe9, #293c34);
  --warning: light-dark(#724319, #f7d6a2);
  --warning-soft: light-dark(#fff0d3, #44331e);
  --info: light-dark(#23526a, #beddf2);
  --info-soft: light-dark(#e7f0f7, #293946);
  --danger: light-dark(#8a2f36, #ffc3c5);
  --danger-soft: light-dark(#fbe9e5, #4a3039);
  --success-fill: #315946;
  --danger-fill: #8a2f36;
  --whatsapp-fill: #17623e;
  --whatsapp-hover: #104d30;
  --pedidosya-brand: #fa0050;
  --uber-brand: #06c167;

  /* Superficies fijas de foto, iluminación de la portada vigente e impresión. */
  --catalog-card: light-dark(var(--paper), #f1ece5);
  --photo-surface: light-dark(#eee6dc, #c1ac9c);
  --photo-highlight: light-dark(#faf4ec, #e2d2bc);
  --stage-paper: #efddc8;
  --stage-ink: #312227;
  --stage-muted: #473738;
  --mask-opaque: #000;
  --print-ink: #111;
  --print-line: #444;

  /* Escena cinematográfica: ciruela profunda con luz lateral cálida y un rebote bajo en damasco.
     El plano de las fotos es marfil en los dos temas: la foto oficial lleva fondo blanco. */
  --stage: #1a131e;
  --stage-glow: rgb(232 182 152 / .30);
  --stage-rebound: rgb(232 182 152 / .14);
  --photo-plane: #f3eee7;
  --photo-plane-edge: #e6ddd1;
  --contact-shadow: rgb(36 28 40 / .24);
  --on-photo: #25212a;

  --scrim: rgb(36 28 40 / .58);
  --surface-glass: rgb(255 255 255 / .12);
  --shadow-low: 0 4px 12px rgb(36 28 40 / .12);
  --shadow-float: 0 10px 28px rgb(36 28 40 / .20);
  --shadow-drawer: -12px 0 36px rgb(36 28 40 / .20);

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --r-1: 6px;
  --r-2: 8px;
  --r-3: 12px;
  --r-4: 16px;
  --r-pill: 999px;
  --t-13: .8125rem;
  --t-14: .875rem;
  --t-16: 1rem;
  --t-22: 1.375rem;
  --t-32: 2rem;
  --t-48: 3rem;
  --font-display: 'Ashe Display', 'Barlow Condensed', sans-serif;
  --font-sans: 'Ashe Sans', 'DM Sans', system-ui, sans-serif;
  --font-mono: ui-monospace, monospace;
  --container-max: 1180px;
  --content-gutter: clamp(var(--s-4), 4vw, 40px);
  --z-decoration: 0;
  --z-local: 1;
  --z-menu: 35;
  --z-float: 45;
  --z-header: 50;
  --z-overlay: 60;
  --z-drawer: 70;
  --z-dialog: 90;
  --z-feedback: 100;
  --z-toast: 110;
  --dur-press: 120ms;
  --dur-ui: 200ms;
  --dur-panel: 340ms;
  --dur-fly: 520ms;
  --ease-out: cubic-bezier(.215, .61, .355, 1);
  --ease-cine: cubic-bezier(.22, .8, .24, 1);
}

html[data-theme="light"] { color-scheme: only light; }
html[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) { color-scheme: dark; }
}
html:has(> head > #tema-solar[content="light"]) { color-scheme: only light; }
html:has(> head > #tema-solar[content="dark"]) { color-scheme: dark; }

/* El navegador conserva sus colores de sistema en versiones sin light-dark(). */
@supports not (color: light-dark(white, black)) {
  html {
    --canvas: Canvas; --surface: Canvas; --surface-alt: ButtonFace; --surface-hover: ButtonFace;
    --text: CanvasText; --text-secondary: CanvasText; --text-muted: CanvasText;
    --line: GrayText; --control-line: GrayText; --action: LinkText; --action-hover: LinkText;
    --on-action: Canvas; --action-soft: ButtonFace; --focus-ring: Highlight;
    --success: CanvasText; --warning: CanvasText; --info: CanvasText; --danger: CanvasText;
    --success-soft: ButtonFace; --warning-soft: ButtonFace; --info-soft: ButtonFace; --danger-soft: ButtonFace;
    --catalog-card: var(--paper); --photo-surface: var(--stage-paper); --photo-highlight: var(--ivory);
  }
}

html {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--text);
  accent-color: var(--action);
}
::selection { background: var(--apricot); color: var(--plum); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
:where(.sx-header, .page-header, .login-header, .app-header, .panel-header) :focus-visible {
  outline-color: var(--apricot);
}
:where(.theme-menu fieldset, .site-menu-panel) :focus-visible { outline-color: var(--focus-ring); }
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { --dur-press: 0ms; --dur-ui: 0ms; --dur-panel: 0ms; --dur-fly: 0ms; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  button:active { transform: none; }
}

/* Texto disponible para tecnologías de asistencia. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
