/* deart studio — base.css
   Reset, base typography, links, media, focus and layout container.
   Values come only from tokens.css via var(--...). */

/* ---------- Fonts ---------- */

/* Geist (SIL Open Font License, assets/fonts/OFL.txt), self-hosted variable woff2,
   weights 400–700, Google Fonts subsets. var() does not work inside @font-face, so the
   values below are font metrics, not design values. Font family token: --font-sans. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.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;
}

/* č ć š ž đ and their capitals. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ↗ (service rows on the home page): in the font, but not in the Google subsets above. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/geist-arrow.woff2") format("woff2");
  unicode-range: U+2197;
}

/* Fallback shown until Geist loads: Arial scaled and with Geist's vertical metrics,
   so the swap does not move text (no layout shift). */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 102.5%;
  ascent-override: 98.05%;
  descent-override: 28.78%;
  line-gap-override: 0%;
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

/* ---------- Body & themes ---------- */

body {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background-color: var(--bg);
}

/* Dark sections redefine the tokens; re-apply them so the section actually changes. */
[data-theme="dark"] {
  color: var(--text);
  background-color: var(--bg);
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: inherit;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}

h4,
h5,
h6 {
  font-size: inherit;
  line-height: inherit;
}

/* ---------- Links ---------- */

a {
  color: inherit;
}

/* ---------- Focus ---------- */

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* ---------- Utilities ---------- */

/* Hidden visually, still read by screen readers (e.g. live status text).
   !important: a utility must win over component rules loaded later
   (e.g. the native select under the custom picker keeps .field__control). */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- Layout ---------- */

/* Content width is --container-max; page margins sit outside it as padding. */
.container {
  box-sizing: content-box;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

/* MOTION: page-transition */
/* Cross-document view transition: a short fade between pages where the browser supports
   it; elsewhere nothing happens. The header bar is captured on its own and swapped
   without animation, so it stays still. The name goes on the header bar, not on
   .site-header, so the fixed mobile menu is not captured with it (.site-header__inner is
   also used inside the menu, hence the child selector). Off with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  .site-header > .site-header__inner {
    view-transition-name: site-header;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: var(--dur-base);
    animation-timing-function: var(--ease-out);
  }

  ::view-transition-group(site-header),
  ::view-transition-new(site-header) {
    animation: none;
  }

  ::view-transition-old(site-header) {
    display: none;
  }
}
/* END MOTION: page-transition */
