/* Design tokens for SILO, from the SILO stylesheet v1 (July 2026) and the
   Rotterdam brochure (09-11-2026).

   1. --brand-*: the palette, role names with SILO's values.
   2. --theme-*: the semantic layer that components read.

   Layer order is declared once, here, because this is the first stylesheet
   every page loads. Every rule in the project sits in one of these layers. */

@layer reset, tokens, base, components, pages, utilities;

@font-face {
  font-family: Manrope;
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/manrope-latin-wght.woff2?v=72106071') 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: Manrope;
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/manrope-latin-ext-wght.woff2?v=0e728732') 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;
}

@layer tokens {
  :root {
    /* Brand palette (stylesheet page 4, RGB) */
    --brand-color-primary: #303b49; /* PMS 2379 C, dark blue: text, dark panels */
    --brand-color-secondary: #b4d4e7; /* PMS 291 C, light blue: panels */
    --brand-color-accent: #ffad01; /* PMS 7549 C, yellow: stars, numbers, pill outlines */
    --brand-color-contrast: #000;
    --brand-color-dark: #303b49;
    --brand-color-light: #efebe7; /* PMS Warm Gray 1 C, page background */
    --brand-color-cream: #fff0d1; /* PMS 7500 C */
    --brand-color-taupe: #ccbdb5; /* PMS 4745 C */
    --brand-color-white: #fff;

    /* Semantic layer */
    --theme-color-background: var(--brand-color-light);
    --theme-color-surface: var(--brand-color-white);
    --theme-color-panel: var(--brand-color-secondary);
    --theme-color-panel-warm: var(--brand-color-cream);
    --theme-color-dark: var(--brand-color-dark);
    --theme-color-on-dark: var(--brand-color-white);
    --theme-color-text: var(--brand-color-dark);
    --theme-color-text-muted: color-mix(
      in oklab,
      var(--brand-color-dark) 78%,
      var(--brand-color-light)
    );
    --theme-color-border: color-mix(in oklab, var(--brand-color-dark) 28%, transparent);
    --theme-color-border-strong: var(--brand-color-dark);
    --theme-color-primary: var(--brand-color-primary);
    --theme-color-secondary: var(--brand-color-secondary);
    --theme-color-accent: var(--brand-color-accent);
    --theme-color-contrast: var(--brand-color-contrast);
    --theme-color-focus: var(--brand-color-accent);
    --theme-color-parking: var(--brand-color-taupe);
    --theme-color-water: color-mix(
      in oklab,
      var(--brand-color-secondary) 70%,
      var(--brand-color-dark)
    );

    /* Unit type colors, as in the brochure's site plan legend */
    --theme-color-type-a-plus: var(--brand-color-secondary);
    --theme-color-type-a: color-mix(
      in oklab,
      var(--brand-color-secondary) 45%,
      var(--brand-color-white)
    );
    --theme-color-type-b: color-mix(
      in oklab,
      var(--brand-color-dark) 55%,
      var(--brand-color-light)
    );
    --theme-color-type-c: color-mix(
      in oklab,
      var(--brand-color-dark) 85%,
      var(--brand-color-light)
    );
    --theme-color-type-d-plus: color-mix(
      in oklab,
      var(--brand-color-dark) 8%,
      var(--brand-color-light)
    );
    --theme-color-type-d: color-mix(
      in oklab,
      var(--brand-color-dark) 22%,
      var(--brand-color-light)
    );
    --theme-color-type-e: var(--brand-color-white);
    --theme-color-type-f: color-mix(
      in oklab,
      var(--brand-color-secondary) 18%,
      var(--brand-color-white)
    );

    /* Type: Manrope only, as the stylesheet prescribes */
    --theme-font-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    --theme-font-heading: var(--theme-font-body);
    --theme-weight-light: 300;
    --theme-weight-regular: 400;
    --theme-weight-medium: 500;
    --theme-weight-semibold: 600;
    --theme-weight-bold: 700;

    /* Type scale (rem, fluid where it is large) */
    --theme-text-xs: 0.8125rem;
    --theme-text-sm: 0.9375rem;
    --theme-text-md: 1.0625rem;
    --theme-text-lg: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
    --theme-text-xl: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
    --theme-text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
    --theme-text-3xl: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem);
    --theme-text-giant: clamp(10rem, 6rem + 18vw, 22rem);
    --theme-leading-tight: 1.08;
    --theme-leading-snug: 1.3;
    --theme-leading-body: 1.6;

    /* Radius: the brochure is square, pills are the one round shape */
    --theme-radius-sm: 0;
    --theme-radius-md: 0;
    --theme-radius-lg: 0;
    --theme-radius-pill: 62.5rem;
    --theme-border-width: 1px;

    /* Motion */
    --theme-ease-signature: cubic-bezier(0.22, 1, 0.36, 1);
    --theme-duration: 0.3s;

    /* Spacing scale */
    --theme-space-3xs: 0.25rem;
    --theme-space-2xs: 0.5rem;
    --theme-space-xs: clamp(0.75rem, 0.6rem + 0.6vw, 1.125rem);
    --theme-space-sm: clamp(1.25rem, 1rem + 1vw, 2rem);
    --theme-space-md: clamp(2rem, 1.5rem + 2vw, 3.5rem);
    --theme-space-lg: clamp(3rem, 2rem + 4vw, 6rem);
    --theme-space-xl: clamp(4rem, 2.5rem + 6vw, 9rem);

    /* Layout */
    --theme-gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
    --theme-width-content: 76rem;
    --theme-width-text: 38rem;
    --theme-header-height: 4.5rem;
  }
}
