/*
 * Design tokens (resources/brand/guia-diseno.md, sections 2 and 3). The only place with colour values
 * for the guest and partner pages: components use the role tokens, never hex values.
 * The theme comes from data-theme on <html>, set by the inline script of layouts/app.
 * Contrast of every role pair is checked by tests/Unit/ThemeContrastTest.php; the pairs below the WCAG
 * minimum are the design team's palette of 2026-11-13, accepted until it is reviewed (docs/decisiones.md).
 */
:root {
    /* Brand (constants) */
    --brand-navy: #293648;
    --brand-blue: #2b92d5;
    --brand-teal: #2cbaa4;
    --brand-aqua: #add9da;
    --brand-ink: #1d262b;
    --brand-blue-deep: #13548a;
    --brand-sky: #37c9ee;
    --brand-mint: #3fd9d7;
    --brand-gradient: linear-gradient(90deg, #293648 0%, #13548a 18%, #2b92d5 36%, #37c9ee 50%, #2cbaa4 64%, #3fd9d7 82%, #add9da 100%);
    --white: #ffffff;
    --qr-dark: #000000;

    /* Role: light theme (default). Palette of the design team, 2026-11-13. */
    --bg: #ffffff;
    --bg-elevated: #ffffff;
    /* Inactive fields (the hotel on the registration form) and relevant information. */
    --bg-muted: #e7f1f7;
    /* White header: it carries the colour logo (navy letters); the dark theme uses the navy one. */
    --bg-header: #ffffff;
    /* All text, and the icons of the language and theme toggles. */
    --text: var(--brand-navy);
    /* Complementary texts: "already registered", terms, privacy notice. */
    --text-muted: #999999;
    --text-on-header: var(--brand-navy);
    /* Input lines and container boxes. */
    --border: #d7e3e6;
    --border-strong: var(--brand-aqua);
    --primary: var(--brand-blue);
    --primary-text: #ffffff;
    --primary-hover: #1f73b0;
    --accent: var(--brand-blue);
    /* Line of the secondary button. */
    --accent-secondary: var(--brand-teal);
    --link: var(--brand-blue);
    --link-hover: #1f73b0;
    /* Line of the selected (active) input and the focus ring. */
    --focus: var(--brand-teal);
    /* Box of the 6-digit code. */
    --code-bg: #e4f4f0;
    /* Partner tiles: white in both themes, like the QR (partner logos are made for white). */
    --tile-bg: #ffffff;
    --tile-text: var(--brand-navy);
    --shadow-tile: 0 2px 8px rgba(41, 54, 72, 0.16);
    /* Behind an open dialog. */
    --backdrop: rgba(41, 54, 72, 0.55);
    --success: #197a6b;
    --success-surface: var(--brand-teal);
    --success-on-surface: var(--brand-navy);
    --success-tint: #dff5f1;
    --error: #b93636;
    /* The guide says #d64545, but white on it is 4.38:1 (< 4.5:1 for the 16 px detail under
       "No disponible"); #c94444, the dark-theme value, gives 4.78:1. */
    --error-surface: #c94444;
    --error-on-surface: #ffffff;
    --error-tint: #fbe4e4;
    --warning: #8a5a00;
    --warning-surface: #e9a23b;
    --warning-on-surface: var(--brand-navy);
    --warning-tint: #fdf0d9;
    --info: var(--brand-blue-deep);
    --info-tint: #e7f1f7;

    /* Typography: the design canvas of 720 px as the mockups show it (about 0.58: 24 pt = 14 px), except
       the inputs, kept at 16 px so iOS does not zoom in on them (decision of 2026-11-13). */
    --font-base: "arponasans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-code: "arpona", Georgia, "Times New Roman", serif;
    --weight-light: 300;
    --weight-medium: 500;
    --text-title: 22px;
    --text-subtitle: 14px;
    --text-body: 14px;
    --text-input: 16px;
    --text-small: 12px;
    --text-button: 14px;
    --text-code: 33px;
    --text-result: 32px;
    /* Titles, buttons and the code at their size (1.0); running text at 1.4. */
    --leading-tight: 1;
    --leading-text: 1.4;
    --radius: 12px;
    --radius-input: 8px;
    --radius-control: 8px;
    /* 44 px: the minimum tap target of the project (the mockups show 40 px buttons). */
    --tap-size: 44px;
    --header-height: 56px;
    --strip-height: 6px;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: var(--brand-navy);
    --bg-elevated: var(--brand-navy);
    --bg-muted: #355060;
    --bg-header: var(--brand-navy);
    --text: #ffffff;
    --text-muted: #b8c4cf;
    --text-on-header: #ffffff;
    --border: #4b5f78;
    --border-strong: #5a7088;
    --primary: var(--brand-blue);
    --primary-text: #ffffff;
    --primary-hover: #1f73b0;
    --accent: var(--brand-mint);
    --accent-secondary: var(--brand-teal);
    --link: #6fd0ee;
    --link-hover: #ffffff;
    --focus: var(--brand-teal);
    --code-bg: #355060;
    --tile-bg: #ffffff;
    --tile-text: var(--brand-navy);
    --shadow-tile: 0 2px 8px rgba(0, 0, 0, 0.45);
    --backdrop: rgba(0, 0, 0, 0.6);
    --success: #4fd1be;
    --success-surface: var(--brand-teal);
    --success-on-surface: var(--brand-navy);
    --success-tint: #1c3f3b;
    --error: #f07070;
    --error-surface: #c94444;
    --error-on-surface: #ffffff;
    --error-tint: #432426;
    --warning: #f2b65a;
    --warning-surface: #e9a23b;
    --warning-on-surface: var(--brand-navy);
    --warning-tint: #3f3220;
    --info: #6fd0ee;
    --info-tint: #1e3550;

    color-scheme: dark;
}
