/* Alijaj Hauswartung — design tokens (custom properties only).
   Base values are for 1440. Type and spacing steps change at three breakpoints
   (max-width 1199 → «992» step, 991 → «768» step, 767 → «390» step) only here.
   Sources of every value: docs/design-system.md. */

:root {
  /* ---------- colour: brand, measured on the live site or the logo ---------- */
  --ah-color-blue: #214099;          /* site H1, footer, logo bar 2 */
  --ah-color-blue-mid: #4B5EAA;      /* site hover/accents, logo bars 1 and 3 */
  --ah-color-blue-light: #707EBF;    /* site links/menu; 3.87:1 on white: never text below 24 px */
  --ah-color-navy-logo: #22227C;     /* logo outline and wordmark */
  --ah-color-orange: #FF6E2F;        /* site floating button: the one action colour */
  --ah-color-text: #444444;          /* site body text */

  /* ---------- colour: derived (reason per value in docs/design-system.md) ---------- */
  --ah-color-navy: #14234F;          /* headings, label on orange, hero shade */
  --ah-rgb-navy: 20 35 79;           /* channels of --ah-color-navy for translucent shades */
  --ah-color-primary-hover: var(--ah-color-navy);        /* primary button hover: navy fill, white label 15.18:1; step vs orange 5.4:1 */
  --ah-color-navy-deep: #08102A;                        /* navy darkened ~45 %: the primary button's pressed fill */
  --ah-color-primary-pressed: var(--ah-color-navy-deep); /* white label 18.79:1; fill step vs hover 1.24:1 + 1 px inset ring */
  --ah-color-primary-hover-on-dark: #FFAB85;   /* round 1: primary hover on dark grounds stays orange: fill step 1.52:1 vs the orange default, navy label 8.25:1 */
  --ah-color-visited: #5A2D82;       /* round 1: visited text links, violet-navy: 9.85:1 on white, 9.11:1 on tint */
  --ah-color-muted: #5C6272;         /* secondary text (addresses, meta) */
  --ah-color-white: #FFFFFF;
  --ah-color-blue-pale: #D5DAF0;     /* round 1 (revision 1): logo bar 7; secondary text on the brand blue: 6.0:1 on #214099 */
  --ah-color-blue-deco: #2B4BA5;     /* round 3: the logo's bars drawn on the hero's brand blue: one step lighter than #214099 (1.2:1), decoration only */
  --ah-color-ring-pressed: rgb(255 255 255 / 0.6);   /* r2 B3: the 1 px inset ring of a pressed button */
  --ah-color-rule-on-blue: rgb(255 255 255 / 0.22);   /* revision 1: 1 px rules on the brand blue (footer): decorative */
  --ah-color-tint: #F4F6FB;          /* tinted section ground */
  --ah-color-tint-strong: #E8ECF7;   /* pressed fill of the secondary button on dark */
  --ah-color-rule: #DCE1EE;          /* 1 px rules and tile borders (decorative) */
  --ah-color-border-input: #6B7385;  /* form field border: 4.76:1 on white (non-text ≥ 3:1) */
  --ah-color-error: #B42318;         /* form error text and border */
  --ah-color-disabled-bg: #E3E6EE;
  --ah-color-disabled-text: #5F6678;

  /* semantic */
  --ah-color-heading: var(--ah-color-navy);
  --ah-color-link: var(--ah-color-blue);
  --ah-color-link-hover: var(--ah-color-navy);
  --ah-color-focus: var(--ah-color-blue);
  --ah-color-focus-on-dark: var(--ah-color-white);
  --ah-focus-color: var(--ah-color-focus);     /* switched to white inside dark grounds */

  /* ---------- type ---------- */
  --ah-font: "Source Sans 3", "Source Sans 3 Fallback", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ah-fw-light: 300;     /* v5: the variable file ships 200-900; 300 = the label part of an inline heading */
  --ah-fw-regular: 400;
  --ah-fw-semibold: 600;
  --ah-fw-bold: 700;
  --ah-fw-heavy: 800;     /* v5: display, H2, figures, phone */

  --ah-fs-h1: 3.75rem;    --ah-lh-h1: 1.05;  --ah-ls-h1: -0.02em;     /* 60 */
  --ah-fs-h1-hero: clamp(2.375rem, 4.1vw, 3.625rem); --ah-lh-h1-hero: 1; --ah-ls-h1-hero: -0.025em;   /* v5: 38 at 390, 55 at 1200, 64 from 1391; 2 lines from 1200, 3 at 390 */
  --ah-fs-h1-inner: 3rem; --ah-lh-h1-inner: 1.08; --ah-ls-h1-inner: -0.02em;   /* 48: the H1 of inner pages (.ah-pagehead only); the hero keeps --ah-fs-h1 */
  --ah-fs-h2: 2.75rem;    --ah-lh-h2: 1.08;  --ah-ls-h2: -0.02em;     /* v5: 44 (36 at 991 and below, 30 on phones), weight 800 */
  --ah-fs-h3: 1.625rem;   --ah-lh-h3: 1.15;  --ah-ls-h3: -0.01em;     /* v5: 26 (22 on phones): card title */
  --ah-fs-h3-feature: 2.5rem;                                         /* v5: 40 (30 on phones): the 24 h tile title */
  --ah-slope: 0.371;   /* r2: the logo's bar-top slope (bars 2-7), unitless */
  --ah-fs-intro-label: clamp(1.5rem, 2.5vw, 2.25rem);   /* r2 fix 4.3: the light label is the smaller type (36 at 1440, 24 on phones), the claim leads */
  --ah-fs-intro-claim: clamp(1.75rem, 3.05vw, 2.75rem);   /* 44 at 1440, 28 on phones, weight 800 */
  --ah-lh-intro: 1.3;
  --ah-figbar-1: 320px;   --ah-figbar-2: 251px;   --ah-figbar-3: 182px;   /* the three Warum bars' heights (the logo's falling ratio); smaller below 1200 and 768 */
  --ah-fs-figure: 5rem;   --ah-lh-figure: 0.9; --ah-ls-figure: -0.035em;   /* v5: 96 (64 on phones): the Warum numerals */
  --ah-fs-phone-xl: 3.5rem; --ah-lh-phone-xl: 1; --ah-ls-phone-xl: -0.02em; /* v5: 56 (36 on phones): the phone in the 24 h tile */
  --ah-fs-lede-hero: 1.375rem; --ah-lh-lede-hero: 1.45;               /* v5: 22 (18 on phones) */
  --ah-fs-list: 1rem;     --ah-lh-list: 1.45;                         /* v5: 16: card bullets */
  --ah-fs-h4: 1.25rem;    --ah-lh-h4: 1.3;   --ah-ls-h4: 0em;         /* 20 */
  --ah-fs-numeral: 4.5rem; --ah-lh-numeral: 1; --ah-ls-numeral: -0.02em; /* 72 */
  --ah-fs-fact: 1.375rem; --ah-lh-fact: 1.25;                         /* 22 */
  --ah-hit-pad: calc((2.75rem - var(--ah-fs-fact) * var(--ah-lh-fact)) / 2);   /* padding that lifts one fact line to a 44 px hit area (follows the fact size at each width) */
  --ah-fs-lead: 1.25rem;  --ah-lh-lead: 1.55;                         /* 20 */
  --ah-fs-body: 1.125rem; --ah-lh-body: 1.55;                         /* 18 */
  --ah-fs-small: 1rem;    --ah-lh-small: 1.5;                         /* 16 at every width (labels, errors, hints) */
  --ah-fs-label: 0.875rem; --ah-lh-label: 1.3; --ah-ls-label: 0.12em; /* 14 */
  --ah-fs-ui: 1.0625rem;  --ah-lh-ui: 1.2;                            /* 17: nav, buttons */
  --ah-measure: 31em;     /* ≤ 75 characters per line for body text (measured in the phase-2 plan) */
  --ah-measure-lead: 28em; /* lead text and Style Guide notes: 31em gave 79–81 characters */

  /* ---------- spacing: fixed steps ---------- */
  --ah-space-4: 0.25rem;
  --ah-space-8: 0.5rem;
  --ah-space-12: 0.75rem;
  --ah-space-16: 1rem;
  --ah-space-20: 1.25rem;
  --ah-space-24: 1.5rem;
  --ah-space-32: 2rem;
  --ah-space-40: 2.5rem;
  --ah-space-48: 3rem;
  --ah-space-64: 4rem;
  --ah-space-80: 5rem;
  --ah-space-96: 6rem;

  /* spacing: responsive steps */
  --ah-section-y: 7rem;          /* 112 */
  --ah-gutter: 2.5rem;           /* 40 */
  --ah-gutter-sm: 1.25rem;       /* 20: the 390 value, also used by Style Guide device frames */
  --ah-container: 80rem;         /* 1280 content width */
  --ah-text-left: max(var(--ah-gutter), calc(50% - 40rem));   /* left edge of the content column; % resolves where it is used (hero shade stops) */
  --ah-grid-gap: 2rem;           /* 32 */
  --ah-head-gap: 4rem;           /* section head → content, 64 */
  --ah-col-gap: 6rem;            /* gap between the two columns of a split layout, 96 */
  --ah-strip-y: 4rem;            /* vertical padding of the numerals proof strip, 64 */

  /* ---------- header ---------- */
  --ah-header-h-lg: 4.5rem;      /* 72 (round 2, Mert: header shorter and smaller; was 96) */
  --ah-header-h-sm: 4rem;        /* 64 (round 2; was 72) */
  --ah-logo-h-lg: 5.5rem;        /* 88 (revision 1: the supplied logo is the header logo; 80 px before): wordmark 8.3 px high */
  --ah-logo-h-sm: 4rem;          /* 64 (revision 1; 56 px before): wordmark 6.1 px high */
  --ah-header-h: var(--ah-header-h-lg);
  --ah-footer-row: 2.75rem;      /* footer row pitch (44 px): address lines, contact lines and links share it */
  --ah-logo-h: var(--ah-logo-h-lg);
  --ah-lockup-mark-h: 2.25rem;   /* lock-up (iii), round 2: bars mark 36 px high, live wordmark in ONE line beside it */
  --ah-lockup-fs: 1rem;          /* wordmark 16 px Source Sans 600 caps (round 4: compact, one line) */
  --ah-lockup-gap: 0.75rem;
  --ah-lockup-ls: 0.06em;
  --ah-icon-btn: 3rem;           /* round call / burger buttons */
  --ah-bar-gap: 0.75rem;         /* gap between logo, call and burger in the compact header */

  /* reference logo sizing (round 1): defaults; each logo class sets its own fill and natural height, each kind its visible height */
  --ah-logo-h-ref: 2.5rem;       /* fix round 3: height of a trimmed reference logo; each mark overrides it */
  --ah-logo-visible: 2.5rem;
  --ah-logo-fill: 1;
  --ah-logo-ar: 1.5;
  --ah-ref-k: 1;                 /* round 2: scale of the logo wall's marks (0.78 on phones, so the widest mark fits a half-width cell) */

  /* ---------- the signature device: the logo's seven bars (fills sampled from the logo, docs/design-system.md) ---------- */
  --ah-color-map-dot: var(--ah-bar-2);
  --ah-map-context: var(--ah-color-tint);                                                  /* r2 fix 3: the stylised SVG map: municipalities that are not served */
  --ah-map-served: color-mix(in srgb, var(--ah-color-blue) 32%, var(--ah-color-white));      /* served municipalities (mid) */
  --ah-map-seat: color-mix(in srgb, var(--ah-color-blue) 58%, var(--ah-color-white));        /* Uster, the seat (darkest) */
  --ah-map-water: color-mix(in srgb, var(--ah-color-blue) 20%, var(--ah-color-white));       /* Zürichsee, Greifensee, Pfäffikersee (lightest) */
  --ah-text-halo: 0 0 2px var(--ah-color-white), 0 0 4px var(--ah-color-white), 0 0 6px var(--ah-color-white);   /* map names read on every tone */   /* r2 A5: place markers of the name map */
  --ah-bar-1: #4C5EAB; --ah-bar-2: #224198; --ah-bar-3: #4C5EAB; --ah-bar-4: #707EBD;
  --ah-bar-5: #99A6D6; --ah-bar-6: #AFBDE1; --ah-bar-7: #D5DAF0;
  --ah-hero-panel-w: clamp(26.75rem, 44vw, 39.6rem);   /* round 4: the roof photo panel about 6 % wider (the largest that keeps the H1 on 2 lines at 1280 and 1440), 634 px at 1440, flush right (was 599) */
  /* v5: the hero photo is cut into the logo's seven bars: gable (44 deg) on bar 1, tops of bars 2-7 falling at slope 0.371. y = % of the panel height.
     desk = 634:640 (from 1200; y of the 490:576 polygon x 1.1638, same pixel slopes), mob = 390:340 (below 576), tab = the mob polygon with every top y x 0.645 for a 16:9 panel (576-1199): the same pixel angles. */
  --ah-roof-desk: polygon(0% 100%, 0% 13.54%, 12.19% 0.81%, 12.19% 100%, 14.64% 100%, 14.64% 0%, 26.82% 4.93%, 26.82% 100%, 29.27% 100%, 29.27% 6.18%, 41.46% 11.1%, 41.46% 100%, 43.91% 100%, 43.91% 12.36%, 56.09% 17.28%, 56.09% 100%, 58.54% 100%, 58.54% 18.53%, 70.73% 23.46%, 70.73% 100%, 73.18% 100%, 73.18% 24.7%, 85.36% 29.64%, 85.36% 100%, 87.81% 100%, 87.81% 30.87%, 100% 35.82%, 100% 100%);   /* r2 fix 6: cut for a 599:550 panel (the 600:640 polygon with every top y x 640/550, same pixel slopes) */
  --ah-roof-mob: polygon(0% 100%, 0% 15.11%, 12.97% 0.86%, 12.97% 100%, 14.51% 100%, 14.51% 0%, 27.47% 5.52%, 27.47% 100%, 29.01% 100%, 29.01% 6.44%, 41.98% 11.96%, 41.98% 100%, 43.52% 100%, 43.52% 12.88%, 56.48% 18.4%, 56.48% 100%, 58.02% 100%, 58.02% 19.32%, 70.99% 24.84%, 70.99% 100%, 72.53% 100%, 72.53% 25.76%, 85.49% 31.27%, 85.49% 100%, 87.03% 100%, 87.03% 32.2%, 100% 37.71%, 100% 100%);
  --ah-roof-tab: polygon(0% 100%, 0% 9.75%, 12.97% 0.55%, 12.97% 100%, 14.51% 100%, 14.51% 0%, 27.47% 3.56%, 27.47% 100%, 29.01% 100%, 29.01% 4.15%, 41.98% 7.71%, 41.98% 100%, 43.52% 100%, 43.52% 8.31%, 56.48% 11.87%, 56.48% 100%, 58.02% 100%, 58.02% 12.46%, 70.99% 16.02%, 70.99% 100%, 72.53% 100%, 72.53% 16.61%, 85.49% 20.17%, 85.49% 100%, 87.03% 100%, 87.03% 20.77%, 100% 24.32%, 100% 100%);
  --ah-step-1: 4.5rem; --ah-step-2: 3.5rem; --ah-step-3: 2.5rem; --ah-step-4: 1.5rem;   /* heights of the four bars above the «Warum» points, descending like the logo */

  /* ---------- shape (revision 1, 19.10.2026: rounder; three radii, was one 4 px + the round buttons) ---------- */
  --ah-radius: 0.5rem;           /* 8: fields, checkboxes, small boxes, dropdown */
  --ah-radius-lg: 1.25rem;       /* 20: photos, tiles, panels */
  --ah-radius-round: 999px;      /* buttons and the round icon buttons */
  --ah-border: 1px;
  --ah-shadow-1: 0 0.25rem 1rem rgb(var(--ah-rgb-navy) / 0.10);   /* scrolled header */
  --ah-shadow-2: 0 1rem 2.5rem rgb(var(--ah-rgb-navy) / 0.18);    /* floating: badge, dropdown */
  --ah-focus-width: 3px;
  --ah-focus-offset: 3px;

  /* ---------- motion ---------- */
  --ah-dur-fast: 160ms;          /* hover colour, underline, arrow nudge */
  --ah-dur-base: 240ms;          /* header shadow, dropdown */
  --ah-dur-slow: 600ms;          /* photo zoom on hover */
  --ah-dur-enter: 700ms;         /* hero text rise, once on load */
  --ah-ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ah-ease-standard: ease;
  --ah-rise: 0.75rem;            /* enter distance, ≤ 16 px */

  /* ---------- icon masks (the «check» icon of the icon set, for CSS-drawn list bullets and checkboxes) ---------- */
  --ah-mask-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E");
}

@media screen and (max-width: 1199px) {
  :root {
    --ah-figbar-1: 280px;   --ah-figbar-2: 226px;   --ah-figbar-3: 172px;
    --ah-fs-h1: 3.5rem;    --ah-lh-h1: 1.05;   /* 56 */
    --ah-fs-h1-inner: 2.75rem;                 /* 44 */
    --ah-fs-h3: 1.625rem;                      /* 26 */
    --ah-fs-numeral: 4rem;                     /* 64 */
    --ah-section-y: 6rem;                      /* 96 */
    --ah-col-gap: 4rem;
    --ah-step-1: 3.5rem; --ah-step-2: 2.75rem; --ah-step-3: 2rem; --ah-step-4: 1.25rem;
  }
}

@media screen and (max-width: 991px) {
  :root {
    --ah-fs-figure: 4rem;                      /* 64 */
    --ah-fs-h1: 3rem;      --ah-lh-h1: 1.08;   /* 48 */
    --ah-fs-h1-inner: 2.5rem;                  /* 40 */
    --ah-header-h: var(--ah-header-h-sm);      /* round 1: the compact header (72 px) from 991 px down, not only on phones */
    --ah-logo-h: var(--ah-logo-h-sm);
    --ah-fs-h2: 2.25rem;                       /* 36 */
    --ah-fs-h3: 1.5rem;                        /* 24 */
    --ah-fs-h4: 1.1875rem;                     /* 19 */
    --ah-fs-numeral: 3.5rem;                   /* 56 */
    --ah-fs-fact: 1.25rem;                     /* 20 */
    --ah-fs-lead: 1.1875rem;                   /* 19 */
    --ah-section-y: 5rem;                      /* 80 */
    --ah-gutter: 2rem;                         /* 32 */
    --ah-grid-gap: 1.5rem;                     /* 24 */
    --ah-head-gap: 3rem;                       /* 48 */
    --ah-col-gap: 3rem;
    --ah-strip-y: 3rem;                        /* 48 */
    --ah-step-1: 0.75rem; --ah-step-2: 0.625rem; --ah-step-3: 0.5rem; --ah-step-4: 0.375rem;   /* one column from here: the bars are thin rules */
  }
}

@media screen and (max-width: 767px) {
  :root {
    --ah-figbar-1: 200px;   --ah-figbar-2: 154px;   --ah-figbar-3: 108px;
    --ah-fs-h1: 2.25rem;   --ah-lh-h1: 1.1;    /* 36 */
    --ah-fs-h1-inner: 2rem; --ah-lh-h1-inner: 1.12;   /* 32 */
    --ah-lh-h1-hero: 1.04;
    --ah-fs-h2: 1.875rem;                      /* 30 */
    --ah-fs-h3: 1.375rem;                      /* 22 */
    --ah-fs-h3-feature: 1.875rem;              /* 30 */
    --ah-fs-figure: 2.75rem;                   /* 44 */
    --ah-fs-intro-label: 1.5rem;
    --ah-fs-intro-claim: 1.75rem;
    --ah-fs-phone-xl: 2.25rem;                 /* 36 */
    --ah-fs-lede-hero: 1.125rem;               /* 18 */
    --ah-fs-h4: 1.125rem;                      /* 18 */
    --ah-fs-numeral: 3rem;                     /* 48 */
    --ah-fs-fact: 1.125rem;                    /* 18 */
    --ah-fs-lead: 1.125rem;                    /* 18 */
    --ah-fs-body: 1.0625rem;                   /* 17 */
    --ah-fs-label: 0.8125rem;                  /* 13 */
    --ah-section-y: 2.75rem;                   /* 44 (fix round 3.1: was 56, the phone page had to stay under 8000 px with 4:3 photos) */
    --ah-gutter: var(--ah-gutter-sm);          /* 20 */
    --ah-grid-gap: 1rem;                       /* 16 */
    --ah-head-gap: 1.5rem;                     /* 24 */
    --ah-col-gap: 2rem;
    --ah-strip-y: 2.5rem;                      /* 40 */
    --ah-radius-lg: 1rem;                      /* 16 on phones */
    --ah-header-h: var(--ah-header-h-sm);
    --ah-logo-h: var(--ah-logo-h-sm);
    --ah-lockup-mark-h: 1.75rem;               /* 28 */
    --ah-lockup-fs: 0.875rem;                  /* 14, two lines on phones */
    --ah-lockup-gap: 0.5rem;
    --ah-lockup-ls: 0.02em;
    --ah-icon-btn: 2.75rem;                    /* 44: still a full touch target */
    --ah-bar-gap: 0.5rem;
    --ah-ref-k: 0.78;
  }
}

