/* METASURFACE design tokens. The only file that holds raw colour values. */
:root {
  /* Brand ink + paper, sampled from the company profile */
  --ink-950: #121212;
  --ink-900: #1a1918;
  --ink-700: #35322d;
  --paper-50: #fbfaf7;
  --paper-100: #f3f2ed;
  --paper-200: #e9e7df;
  --white: #ffffff;
  --copper-700: #7a400a;
  --copper-600: #94500f;
  --bronze-400: #c69255;
  --brass-300: #e8b067;
  --brass-200: #f2c78d;

  /* Roles */
  --color-primary: var(--copper-600);
  --color-primary-hover: var(--copper-700);
  --color-primary-active: #633306;
  --color-on-primary: var(--white);
  --color-accent: var(--bronze-400);

  --surface-base: var(--paper-100);
  --surface-raised: var(--white);
  --surface-tint: var(--paper-200);
  --surface-inverse: var(--ink-950);
  --surface-inverse-raised: var(--ink-900);

  --border-hairline: #d6d2c7;
  --border-control: #7f7b72;
  --border-inverse: #383633;

  --text-primary: #161513;
  --text-secondary: #46433d;
  --text-muted: #5e5a52;
  --text-accent: var(--copper-600);
  --text-inverse: #f3f2ed;
  --text-inverse-secondary: #c9c6bd;
  --text-inverse-muted: #a5a198;

  --nav-hover-bg: #f6eee3;

  --focus-ring: #1d5f96;
  --focus-ring-inverse: var(--brass-200);
  --scrim: rgb(18 18 18 / 0.72);
  /* Shades laid over the hero photograph so the headline stays readable */
  --shade-strong: rgb(18 18 18 / 0.9);
  --shade-mid: rgb(18 18 18 / 0.66);
  --shade-soft: rgb(18 18 18 / 0.24);

  --success-fg: #1c5534;  --success-bg: #e3f0e6;
  --warning-fg: #664600;  --warning-bg: #fbefcf;
  --error-fg: #8c1c13;    --error-bg: #fbe6e3;
  --info-fg: #1b4666;     --info-bg: #e2edf5;

  /* Type: Poppins, as set in the company profile */
  --font-sans: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Marcellus", "Poppins", Georgia, serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.1875rem;
  --text-xl: clamp(1.3125rem, 1.2rem + 0.5vw, 1.5625rem);
  --text-2xl: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --text-3xl: clamp(2.125rem, 1.4rem + 3vw, 3.75rem);
  --leading-tight: 1.18;
  --leading-snug: 1.35;
  --leading-body: 1.65;
  --measure: 66ch;
  --tracking-display: -0.005em;
  --tracking-label: 0.14em;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* 4 / 8 spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-section: clamp(var(--space-8), 8vw, 7.5rem);

  --container: 78rem;
  --gutter: var(--space-4);
  --header-height: 4.5rem;
  --touch: 2.75rem; /* 44px */

  /* Square-cut, like the material it sells */
  --radius-sm: 2px;
  --radius-md: 4px;
  --rule: 1px;
  --rule-accent: 3px;
  --shadow-overlay: 0 24px 60px rgb(18 18 18 / 0.28);

  --duration-fast: 140ms;
  --duration-base: 220ms;
  --duration-slow: 560ms;
  --shadow-lift: 0 8px 18px rgb(18 18 18 / 0.18);
  --shadow-header: 0 6px 18px rgb(18 18 18 / 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Reading direction: 1 left to right, -1 right to left. Used by sideways nudges. */
:root { --dir: 1; }
[dir="rtl"] {
  --dir: -1;
  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "El Messiri", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  /* Letter spacing breaks joined Arabic letters */
  --tracking-display: 0;
  --tracking-label: 0;
  --leading-tight: 1.35;
  --leading-snug: 1.5;
  --leading-body: 1.8;
}

@media (min-width: 48rem) { :root { --gutter: var(--space-5); } }
@media (min-width: 64rem) { :root { --gutter: var(--space-7); } }
/* The menu takes its own row until there is room for one line */
@media (min-width: 64rem) and (max-width: 79.99rem) { :root { --header-height: 7.75rem; } }
