/* GoCampingNow — default theme "Waymark" v1.0
   Names follow Material Design 3 roles; values are ours (Foundations §02/§11).
   One fully self-contained platform theme: tokens for both modes + the part
   overrides. Mode is set by [data-mode] on <html> ("system" resolves to light or
   dark in the app shell) so Shadow DOM inherits it. Themes live in the database
   and are served from /api/themes/active.css — this file is the seed and the
   fallback. */

:root {
  /* type */
  --md-sys-font-family:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* the only font token a listing design may override */
  --gcn-font-family-heading: Archivo, var(--md-sys-font-family);

  --md-sys-typescale-display-small-size: 36px;
  --md-sys-typescale-display-small-weight: 700;
  --md-sys-typescale-headline-small-size: 26px;
  --md-sys-typescale-headline-small-weight: 700;
  --md-sys-typescale-title-medium-size: 18px;
  --md-sys-typescale-title-medium-weight: 600;
  --md-sys-typescale-body-large-size: 17px;
  --md-sys-typescale-body-large-weight: 400;
  --md-sys-typescale-body-medium-size: 16px;
  --md-sys-typescale-body-medium-weight: 400;
  --md-sys-typescale-label-large-size: 15px;
  --md-sys-typescale-label-large-weight: 600;
  --md-sys-typescale-label-small-size: 13px;
  --md-sys-typescale-label-small-weight: 600;

  /* space */
  --gcn-space-1: 4px;
  --gcn-space-2: 8px;
  --gcn-space-3: 12px;
  --gcn-space-4: 16px;
  --gcn-space-6: 24px;
  --gcn-space-8: 32px;
  --gcn-touch-min: 44px;

  /* shape — default preset "rounded" */
  --md-sys-shape-corner-small: 6px;
  --md-sys-shape-corner-medium: 10px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-full: 999px;

  /* motion */
  --gcn-motion-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --gcn-motion-exit: cubic-bezier(0.3, 0, 0.8, 0.15);
  --gcn-dur-short: 120ms;
  --gcn-dur-medium: 240ms;
  --gcn-dur-long: 320ms;
  --gcn-dur-dwell: 5000ms;
}

[data-mode='light'] {
  --md-sys-color-surface: #fcfaf7; /* warm paper */
  --md-sys-color-surface-container-low: #f5f1eb;
  --md-sys-color-surface-container-high: #ebe5dc;
  --md-sys-color-surface-variant: #e4ddd2;
  --md-sys-color-on-surface: #1c1917; /* 16.79:1 on surface */
  --md-sys-color-on-surface-variant: #57504a; /*  7.60:1 on surface, 6.33:1 on -high */
  --md-sys-color-outline: #8a827a; /*  3.63:1 — UI strokes only */
  --md-sys-color-outline-variant: #d6cfc5; /* dividers */
  --md-sys-color-primary: #9a3d18; /*  6.60:1 on surface */
  --md-sys-color-on-primary: #ffffff; /*  6.87:1 on primary */
  --md-sys-color-primary-container: #fbe4d8;
  --md-sys-color-on-primary-container: #48180a; /* 12.19:1 on primary-container */
  --md-sys-color-secondary: #2c5542; /*  8.11:1 on surface */
  --md-sys-color-on-secondary: #ffffff; /*  8.45:1 on secondary */
  --md-sys-color-secondary-container: #d9e7df;
  --md-sys-color-on-secondary-container: #12291f; /* 12.07:1 */
  --md-sys-color-error: #b3261e; /*  6.27:1 on surface */
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #f7d9d6;
  --md-sys-color-on-error-container: #7a1912;
  --md-sys-color-success: #1f6b3a; /*  6.26:1 on surface */
  --md-sys-color-on-success: #ffffff;
  --md-sys-color-inverse-surface: #1c1917;
  --md-sys-color-inverse-on-surface: #f2ece4;
  --md-sys-color-inverse-primary: #f0a078;
  --md-sys-color-scrim: rgb(28 25 23 / 0.48);
  --md-sys-elevation-level1: 0 1px 2px rgb(28 25 23 / 0.1), 0 1px 3px 1px rgb(28 25 23 / 0.06);
  --md-sys-elevation-level2: 0 2px 4px rgb(28 25 23 / 0.12), 0 3px 8px 2px rgb(28 25 23 / 0.08);
  --md-sys-elevation-level3: 0 4px 8px rgb(28 25 23 / 0.14), 0 8px 20px 4px rgb(28 25 23 / 0.1);
  color-scheme: light;
}

[data-mode='dark'] {
  --md-sys-color-surface: #14120f; /* warm ink */
  --md-sys-color-surface-container-low: #1d1a16;
  --md-sys-color-surface-container-high: #292520;
  --md-sys-color-surface-variant: #332e28;
  --md-sys-color-on-surface: #f2ece4; /* 15.93:1 on surface */
  --md-sys-color-on-surface-variant: #c4baae; /*  9.78:1 on surface, 7.96:1 on -high */
  --md-sys-color-outline: #9a9086; /*  5.97:1 */
  --md-sys-color-outline-variant: #453f38;
  --md-sys-color-primary: #f0a078; /*  8.91:1 on surface */
  --md-sys-color-on-primary: #4a1706; /*  7.06:1 on primary */
  --md-sys-color-primary-container: #5e240d;
  --md-sys-color-on-primary-container: #ffd9c7; /*  9.23:1 */
  --md-sys-color-secondary: #8fd0b0; /* 10.52:1 on surface */
  --md-sys-color-on-secondary: #06281a; /*  8.91:1 on secondary */
  --md-sys-color-secondary-container: #1e4534;
  --md-sys-color-on-secondary-container: #b7e9ce; /*  7.95:1 */
  --md-sys-color-error: #f2b8b5; /* 10.95:1 on surface */
  --md-sys-color-on-error: #601410;
  --md-sys-color-error-container: #4a1512;
  --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-success: #86d6a0; /* 10.81:1 on surface */
  --md-sys-color-on-success: #063a1a;
  --md-sys-color-inverse-surface: #1c1917;
  --md-sys-color-inverse-on-surface: #f2ece4;
  --md-sys-color-inverse-primary: #f0a078;
  --md-sys-color-scrim: rgb(0 0 0 / 0.64);
  /* shadows are near-invisible on ink: layer with surface-container + hairline instead */
  --md-sys-elevation-level1: 0 0 0 1px #453f38;
  --md-sys-elevation-level2: 0 0 0 1px #453f38, 0 2px 6px rgb(0 0 0 / 0.5);
  --md-sys-elevation-level3: 0 0 0 1px #453f38, 0 8px 24px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

/* shape presets a listing design may select */
[data-corner='soft'] {
  --md-sys-shape-corner-small: 12px;
  --md-sys-shape-corner-medium: 18px;
  --md-sys-shape-corner-large: 26px;
}
[data-corner='sharp'] {
  --md-sys-shape-corner-small: 0;
  --md-sys-shape-corner-medium: 2px;
  --md-sys-shape-corner-large: 4px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --gcn-dur-short: 1ms;
    --gcn-dur-medium: 1ms;
    --gcn-dur-long: 1ms;
  }
}

/* Part-level overrides: everything a token cannot express. ::part() only
   punches through ONE shadow boundary, so every rule targets an element that is
   actually in <body>'s light DOM (app-shell, app-router's pages) and relies on
   the exportparts chain documented in CLAUDE.md. The Waymark look is already the
   components' own default; a theme that wants a different signage feel
   (text-transform, borders, shadows) writes its rules here. */
app-shell::part(bar) {
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
app-shell::part(footer) {
  border-top: 1px solid var(--md-sys-color-outline-variant);
}
