/*
 * ZO-FING design system
 *
 * application.css  layer order, fonts, design tokens, reset and base typography
 * layout.css       container, header, footer, sections
 * components.css   buttons, eyebrows, cards, lists
 * pages.css        page-specific compositions (hero, services, CV …)
 *
 * The files are linked in this order from the layout. Cascade layers keep
 * precedence predictable regardless of selector specificity.
 *
 * Colours and type follow the company's business card: a blue band with white
 * lettering, light grey card stock, charcoal geometric type and bold condensed
 * capitals. The wordmark (shared/_wordmark) is outlined from Comfortaa.
 */
@layer reset, tokens, base, layout, components, pages, utilities;

/* Fonts: self-hosted (no third-party requests), latin + latin-ext for č, š, ž. */
@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin-wght-normal-791141eb.woff2") format("woff2");
  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: "Urbanist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin-ext-wght-normal-bc0eaccf.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Urbanist";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin-wght-italic-5a58f6e7.woff2") format("woff2");
  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: "Urbanist";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin-ext-wght-italic-4564bef3.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/barlow-semi-condensed-latin-600-normal-cb43fe02.woff2") format("woff2");
  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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/barlow-semi-condensed-latin-ext-600-normal-3869a2fe.woff2") format("woff2");
  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 {
    /* Palette from the business card. --blue-600 is the band blue, deep enough for
       white text (5.6:1); --blue-500 is the card's lighter azure, used for graphics
       only. All text pairings meet WCAG 2.2 AA. */
    --ink: #1e2830;
    --text: #3a454d;
    --muted: #5a6670;
    --navy-950: #0a1c2e;
    --navy-900: #0e2943;
    --blue-700: #1b5f99;
    --blue-600: #236ca6;
    --blue-500: #3e8cc3;
    --blue-300: #8fc5ee;
    --blue-100: #e3eef8;
    --mist: #eef2f4;
    --white: #ffffff;
    --line: #dce3e8;
    --line-strong: #c3cdd4;
    --on-dark: #e6eef5;
    --on-dark-muted: #a8bccd;
    --on-blue-muted: #e3eef8;
    --line-on-dark: rgb(255 255 255 / 0.14);
    --focus: var(--blue-600);

    --font-sans: "Urbanist", "Century Gothic", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-label: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", var(--font-sans);

    --fs-display: clamp(2.375rem, 1.55rem + 3.4vw, 4.25rem);
    --fs-h1: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
    --fs-h2: clamp(1.875rem, 1.45rem + 1.7vw, 2.75rem);
    --fs-h3: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
    --fs-lead: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
    --fs-body: 1.125rem;
    --fs-small: 1rem;
    --fs-xs: 0.875rem;

    --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;
    --section-y: clamp(4rem, 2.5rem + 6vw, 8rem);
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
    --container: 76rem;
    --measure: 68ch;

    --radius-sm: 4px;
    --radius: 8px;
    --header-h: 4.5rem;
    --shadow-sm: 0 1px 2px rgb(14 41 67 / 0.06), 0 1px 1px rgb(14 41 67 / 0.04);
    --shadow: 0 12px 32px -12px rgb(14 41 67 / 0.2);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    color-scheme: light;
  }

  @media (max-width: 56.24em) {
    :root { --header-h: 4rem; }
  }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  ol[role="list"], ul[role="list"] { list-style: none; padding: 0; }
  address { font-style: normal; }
  p, li, dd, h1, h2, h3, h4 { overflow-wrap: break-word; }
}

@layer base {
  /* Keep anchor targets clear of the sticky header. (No smooth scrolling: it
     compounds with Turbo's scroll + focus on cross-page anchor links.) */
  [id] { scroll-margin-top: calc(var(--header-h) + var(--space-5)); }

  body {
    min-height: 100vh;
    background: var(--white);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3, h4 {
    color: var(--ink);
    font-family: var(--font-sans);
    font-weight: 620;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance;
  }

  p { text-wrap: pretty; }

  a {
    color: var(--blue-700);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }
  a:hover { color: var(--ink); text-decoration-thickness: 2px; }

  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
  }

  main:focus { outline: none; }

  abbr[title] { text-decoration: underline dotted; text-underline-offset: 0.2em; cursor: help; }
  cite { font-style: italic; }
  strong { font-weight: 700; color: var(--ink); }

  ::selection { background: var(--blue-100); color: var(--ink); }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .nowrap { white-space: nowrap; }
}
