/*
 * Girdek design tokens.
 *
 * This file is the single source of truth for every visual value in the
 * public site. It is plain CSS (no preprocessor, no Tailwind `@theme`) so the
 * tokens are available in the browser exactly as authored and can be consumed
 * both by hand-written component CSS and by the Tailwind theme extension in
 * `theme/static_src/tailwind.config.js`.
 *
 * Rules of the design system:
 * - Never hard-code a colour, font size, radius, shadow or duration in a
 *   component file. Reference a token from this file instead.
 * - Breakpoints are exposed as custom properties for documentation and for
 *   container-query/meta use, but `@media` conditions must use the literal
 *   pixel value because CSS custom properties are not valid in media queries.
 *   Keep the literals in sync with `tailwind.config.js`.
 */
:root {
  color-scheme: light;

  /* -----------------------------------------------------------------------
   * Brand palette
   * -------------------------------------------------------------------- */
  --color-bg: #F0EBE7;
  --color-bg-mobile: #FAF2EB;
  --color-bg-subtle: #E7E0DA;
  --color-primary: #163E3D;
  --color-primary-hover: #0F2E2D;
  --color-primary-active: #0A2322;
  --color-primary-soft: #DCE7E4;
  --color-primary-contrast: #FFFFFF;
  --color-on-primary-muted: color-mix(in srgb, var(--color-primary-contrast) 80%, transparent);
  --color-on-primary-subtle: color-mix(in srgb, var(--color-primary-contrast) 60%, transparent);
  --color-white: #FFFFFF;
  --color-white-rgb: 255 255 255;
  --color-black: #000000;
  --color-black-rgb: 0 0 0;
  --color-text: #111111;
  --color-text-muted: #57514D;
  --color-border: #D6CEC7;
  --color-border-strong: #B9AFA6;

  /* Feedback colours keep AA contrast on the cream surface. */
  --color-state-error: #A12B22;
  --color-state-success: #24614A;
  --color-state-warning: #7A5200;
  --color-state-info: var(--color-primary);

  /* Translucent surfaces used by the floating header over the hero. */
  --color-surface-translucent: color-mix(in srgb, var(--color-bg) 82%, transparent);
  --color-overlay-border: color-mix(in srgb, var(--color-border) 70%, transparent);

  /* Footer surfaces match the translucent layers in the design. */
  --color-footer-bg: #F0EBE73D;
  --color-footer-newsletter-bg: #CCCAC352;

  /* Aliases used by existing templates and Tailwind utilities. */
  --color-surface: var(--color-bg);
  --color-ink: #080808;
  --color-ink-soft: #1F1915;
  --color-muted: var(--color-text-muted);
  --color-line: var(--color-border);
  --color-brand-50: var(--color-primary-soft);
  --color-brand-600: var(--color-primary);
  --color-brand-700: var(--color-primary);
  --color-brand-800: var(--color-primary-hover);

  /* -----------------------------------------------------------------------
   * Typography
   * -------------------------------------------------------------------- */
  --font-family-display: "Satoshi", "Satoshi Fallback", "Satoshi", "Manrope",
    "Manrope Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-family-body: "Satoshi", "Satoshi Fallback", "Satoshi", "Manrope",
    "Manrope Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-body: 400;
  --font-weight-heading: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;

  /* Desktop design sizes: h1 72px, h2 48px, body 20px. The `-fluid`
   * variants clamp down gracefully on small screens while reaching the
   * designed size from the `lg` breakpoint upwards. */
  --font-size-h1: 72px;
  --font-size-h1-fluid: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  --font-size-h2: 48px;
  --font-size-h2-fluid: clamp(2rem, 1.35rem + 2.6vw, 3rem);
  --font-size-h3: 32px;
  --font-size-h4: 24px;
  --font-size-body: 20px;
  --font-size-body-fluid: 16px;
  --font-size-body-sm: 16px;
  --font-size-caption: 14px;
  --font-size-overline: 12px;

  --line-height-h1: 1.05;
  --line-height-h2: 1.1;
  --line-height-h3: 1.2;
  --line-height-heading: 1.2;
  --line-height-body: 1.5;
  --line-height-body-sm: 1.55;
  --line-height-caption: 1.45;
  --line-height-overline: 1.2;

  --letter-spacing-h1: -0.03em;
  --letter-spacing-h2: -0.02em;
  --letter-spacing-h3: -0.01em;
  --letter-spacing-body: 0;
  --letter-spacing-overline: 0.12em;

  /* -----------------------------------------------------------------------
   * Spacing (4px base scale measured from the design)
   * -------------------------------------------------------------------- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-32: 128px;
  --space-section: clamp(4rem, 8vw, 7.5rem);

  /* Layout containers */
  --container-max: 80rem; /* 1280px */
  --container-wide: 90rem; /* 1440px */
  --container-gutter: clamp(1rem, 3vw, 2rem);
  --measure-body: 68ch;

  /* -----------------------------------------------------------------------
   * Legal document pages (privacy, cookies, terms)
   * -------------------------------------------------------------------- */
  --document-max-width: 800px;
  --font-size-document-title: 32px;
  --font-size-document-title-lg: 56px;
  --font-size-document-lead: 18px;
  --font-size-document-heading: 22px;
  --font-size-document-heading-lg: 26px;
  --font-size-document-body: 17px;
  --font-size-document-caption: 15px;
  --line-height-document-title: 1.15;
  --line-height-document-heading: 1.25;
  --line-height-document-lead: 1.5;
  --line-height-document-body: 1.6;
  --letter-spacing-document-badge: 0.5px;
  --color-black-10: color-mix(in oklab, var(--color-black) 10%, transparent);
  --color-black-16: color-mix(in oklab, var(--color-black) 16%, transparent);
  --color-black-50: color-mix(in oklab, var(--color-black) 50%, transparent);
  --color-black-80: color-mix(in oklab, var(--color-black) 80%, transparent);
  --color-dashed-line: rgba(0, 0, 0, 0.4);
  --color-document-ink: #080808;

  /* -----------------------------------------------------------------------
   * Radii: the design uses fully rounded, 100px pill controls.
   * -------------------------------------------------------------------- */
  --radius-pill: 100px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* -----------------------------------------------------------------------
   * Borders and elevation
   * -------------------------------------------------------------------- */
  --border-width: 1px;
  --border-width-strong: 2px;
  --shadow-sm: 0 1px 2px rgb(22 62 61 / 0.08);
  --shadow-md: 0 12px 32px -16px rgb(22 62 61 / 0.24);
  --shadow-lg: 0 24px 64px -24px rgb(22 62 61 / 0.28);
  --blur-backdrop: 16px;

  /* -----------------------------------------------------------------------
   * Motion
   * -------------------------------------------------------------------- */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
  --duration-marquee: 32s;
  --easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --easing-emphasised: cubic-bezier(0.2, 0, 0, 1.2);

  /* -----------------------------------------------------------------------
   * Media ratios used by the layout-kit cards and team portraits.
   * -------------------------------------------------------------------- */
  --aspect-card: 4 / 3;
  --aspect-landscape: 16 / 9;
  --aspect-portrait: 4 / 5;

  /* Component sizing that is not part of the spacing scale. */
  /* Desktop header geometry (matched to the production design). */
  --header-logo-width: 139px;
  --header-logo-height: 23px;
  --header-logo-offset-y: 11%;
  --header-nav-gap: 20px;
  --header-action-gap: 16px;
  --header-group-padding: 32px;
  --header-overlay-top: 52px;
  --header-overlay-inline: 56px;
  --header-overlay-padding-block: 12px;
  --header-overlay-padding-inline: 16px;
  --header-inner-padding-block: 20px;
  --header-inner-padding-inline: 24px;
  --header-panel-offset: 20px;
  --header-panel-radius: 12px;
  --header-panel-min-width: 200px;
  --header-panel-padding: 8px;
  --header-panel-shadow: 0 8px 32px rgb(0 0 0 / 0.15);
  --header-language-offset: 12px;
  --header-language-padding: 4px;
  --header-language-item-padding-block: 6px;
  --header-language-item-padding-inline: 12px;
  --header-trigger-gap: 6px;
  --header-phone-icon-size: 18px;
  --header-phone-height: 44px;
  --header-chevron-size: 16px;
  --header-cta-height: 40px;
  --header-cta-padding-block: 7px;
  --header-cta-padding-inline: 19px;
  --header-cta-font-size: 16px;
  --header-overlay-surface: oklab(0.999994 0.0000455678 0.0000200868 / 0.1);
  --header-hover-surface: oklab(0 0 0 / 0.05);
  --header-hover-surface-inverse: oklab(0.999994 0.0000455678 0.0000200868 / 0.1);

  /* Mobile header geometry (measured from the design at 375px and 768px). */
  --header-mobile-bar-block: 16px;
  --header-mobile-bar-inline: 14px;
  --header-mobile-logo-width: 97px;
  --header-mobile-logo-height: 16px;
  --header-mobile-control-width: 37px;
  --header-mobile-control-height: 40px;
  --header-mobile-control-gap: 8px;
  --header-mobile-icon-size: 18px;
  --header-mobile-phone-icon-size: 20px;
  --header-mobile-panel-padding-block: 28px;
  --header-mobile-panel-padding-inline: 16px;
  --header-mobile-panel-padding-bottom: 32px;
  --header-mobile-panel-gap: 48px;
  --header-mobile-link-font-size: 24px;
  --header-mobile-sublink-font-size: 16px;
  --header-mobile-phone-font-size: 20px;
  --header-mobile-close-font-size: 18px;
  --header-mobile-panel-cta-height: 51px;
  --header-mobile-panel-cta-font-size: 18px;
  --header-mobile-panel-cta-padding-block: 11px;
  --header-mobile-panel-cta-padding-inline: 19px;

  --modal-max-width: 36rem;
  --partner-logo-max-width: 10rem;
  --translate-hover: -2px;
  --opacity-decorative: 0.35;
  --opacity-backdrop: 0.72;

  /* -----------------------------------------------------------------------
   * Breakpoints (also mirrored in tailwind.config.js for @media rules)
   * -------------------------------------------------------------------- */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  --breakpoint-3xl: 1920px;

  /* -----------------------------------------------------------------------
   * Layers
   * -------------------------------------------------------------------- */
  --z-base: 0;
  --z-header: 20;
  --z-overlay: 40;
  --z-mobile-menu: 50;
  --z-skip-link: 100;

}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0.01ms;
    --duration-base: 0.01ms;
    --duration-slow: 0.01ms;
  }
}
