/* ==========================================================================
   UT-Systems site core — shared by every UT-Systems product website.
   Header, mobile menu, footer, buttons, layout width, type tokens.
   Source of truth: the header/footer of www.ut-systems.com (assets/css/main.css).
   Copy this file unchanged into a product site; set the --ut-* tokens per product
   in the product's own stylesheet (see "Product tokens" below).
   ========================================================================== */

/* ---------- Fonts (self-hosted; adjust the url() paths to where the site serves them) ---------- */
@font-face {
  font-family: "Geist";
  src: url("/media/fonts/geist.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/media/fonts/geist-mono.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/media/fonts/newsreader-italic.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Layout: identical on every site */
  --ut-max: 1440px;
  --ut-gutter: clamp(16px, 4vw, 56px);
  --ut-col-gap: clamp(16px, 2vw, 32px);
  --ut-header-h: 72px;
  --ut-measure: 40rem; /* max width of running text */

  --ut-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ut-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ut-serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --ut-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ut-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Product tokens — DARK defaults (ut-systems blue). Every product overrides these. */
  --ut-bg: #050914;
  --ut-bg-raise: #0a1226;
  --ut-footer-bg: #03060e;
  --ut-line: rgba(148, 178, 255, 0.12);
  --ut-line-strong: rgba(148, 178, 255, 0.26);
  --ut-text: #eaf0ff;
  --ut-text-soft: #aab6d6;
  --ut-text-mute: #7584a8;
  --ut-accent: #2f6bff;          /* button fill, links */
  --ut-accent-hi: #5b8cff;       /* gradient start / hover */
  --ut-accent-lo: #0b3fc2;       /* gradient end */
  --ut-accent-ink: #ffffff;      /* text on the accent */
  --ut-accent-2: #5cc8ff;        /* second accent: underline, focus ring, numbers */
  --ut-glow: rgba(47, 107, 255, 0.35);  /* mesh blobs / mobile menu glow */
  --ut-header-scrolled: rgba(5, 9, 20, 0.62);
  --ut-glass: rgba(255, 255, 255, 0.06);
  --ut-glass-line: rgba(255, 255, 255, 0.14);
  --ut-italic-grad: linear-gradient(100deg, #b7d6ff 0%, #5b8cff 40%, #7ee0ff 70%, #b7d6ff 100%);
}

/* Light products (stepdok, Watchbird) set this on <html> and override the tokens. */
:root.ut-light {
  color-scheme: light;
  --ut-glass: rgba(0, 0, 0, 0.04);
  --ut-glass-line: rgba(0, 0, 0, 0.12);
}

/* ---------- Layout primitive ---------- */
.ut-wrap,
.ut-header,
.ut-header *,
.ut-mobile-nav,
.ut-mobile-nav *,
.ut-footer,
.ut-footer *,
.ut-btn {
  box-sizing: border-box;
}
.ut-wrap {
  width: 100%;
  max-width: var(--ut-max);
  margin-inline: auto;
  padding-inline: var(--ut-gutter);
}

.ut-label {
  font-family: var(--ut-mono);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ut-text-mute);
}

/* Serif italic accent word in headlines ("ohne", "selbst", "faster") */
.ut-it {
  font-family: var(--ut-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  padding: 0.12em 0.16em 0.3em 0.1em;
  margin: -0.12em -0.1em -0.3em -0.1em;
  background: var(--ut-italic-grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ut-shimmer 7s ease-in-out infinite alternate;
}
@keyframes ut-shimmer {
  to {
    background-position: 100% 0;
  }
}

/* ---------- Buttons ---------- */
.ut-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ut-text);
  color: var(--ut-bg);
  font-family: var(--ut-sans);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.3s var(--ut-ease-out), color 0.3s var(--ut-ease-out),
    box-shadow 0.3s var(--ut-ease-out), transform 0.5s var(--ut-ease-out);
}
.ut-btn svg {
  width: 13px;
  height: 13px;
  flex: none;
  transition: transform 0.35s var(--ut-ease-out);
}
.ut-btn:hover svg.ut-arrow {
  transform: translate(2px, -2px);
}
.ut-btn--primary {
  background: linear-gradient(135deg, var(--ut-accent-hi), var(--ut-accent) 45%, var(--ut-accent-lo));
  color: var(--ut-accent-ink);
  box-shadow: 0 14px 40px -14px var(--ut-accent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.ut-btn--primary:hover {
  box-shadow: 0 18px 50px -12px var(--ut-accent-hi), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.ut-btn--glass {
  background: var(--ut-glass);
  color: var(--ut-text);
  box-shadow: inset 0 0 0 1px var(--ut-glass-line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.ut-btn--glass:hover {
  background: var(--ut-text);
  color: var(--ut-bg);
}
.ut-btn--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* ---------- Header (fixed; transparent over the hero, solid once scrolled) ---------- */
.ut-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  border-bottom: 1px solid transparent;
  font-family: var(--ut-sans);
  color: var(--ut-text);
  transition: background-color 0.4s ease, border-color 0.4s ease;
  /* Slides in from the top once the page has loaded (like www.ut-systems.com) */
  animation: ut-header-in 0.9s var(--ut-ease-out) 0.3s both;
}
@keyframes ut-header-in {
  from {
    transform: translateY(-100%);
  }
}
.ut-header.is-scrolled {
  background: var(--ut-header-scrolled);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--ut-line);
}
/* Sites without JavaScript (stepdok): the scroll state comes from a scroll-driven
   animation where supported, otherwise the header is always solid. */
.ut-header--nojs {
  background: var(--ut-header-scrolled);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--ut-line);
}
@supports (animation-timeline: scroll()) {
  .ut-header--nojs {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom-color: transparent;
    animation: ut-header-in 0.9s var(--ut-ease-out) 0.3s both, ut-header-solid linear both;
    animation-timeline: auto, scroll(root);
    animation-range: normal, 0 24px;
  }
  @keyframes ut-header-solid {
    to {
      background: var(--ut-header-scrolled);
      -webkit-backdrop-filter: blur(16px) saturate(1.3);
      backdrop-filter: blur(16px) saturate(1.3);
      border-bottom-color: var(--ut-line);
    }
  }
}
.ut-header__inner {
  height: var(--ut-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ut-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.015em;
  color: var(--ut-text);
  text-decoration: none;
}
.ut-brand img,
.ut-brand svg {
  display: block;
  height: 24px;
  width: auto;
  transition: transform 0.6s var(--ut-ease-out);
}
.ut-brand:hover img,
.ut-brand:hover svg {
  transform: rotate(-8deg) scale(1.08);
}

.ut-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 14px;
}
.ut-nav a:not(.ut-btn) {
  position: relative;
  color: var(--ut-text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ut-nav a:not(.ut-btn):hover,
.ut-nav a:not(.ut-btn)[aria-current] {
  color: var(--ut-text);
}
.ut-nav a:not(.ut-btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: linear-gradient(90deg, var(--ut-accent-2), var(--ut-accent-hi));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ut-ease-out);
}
.ut-nav a:not(.ut-btn):hover::after,
.ut-nav a:not(.ut-btn)[aria-current]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Mobile menu (full screen, numbered) ---------- */
.ut-menu-toggle {
  display: none;
  position: relative;
  z-index: 61;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ut-glass);
  box-shadow: inset 0 0 0 1px var(--ut-glass-line);
  color: var(--ut-text);
  font-family: var(--ut-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.ut-menu-toggle__bars {
  position: relative;
  width: 16px;
  height: 8px;
}
.ut-menu-toggle__bars::before,
.ut-menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ut-ease-out), top 0.35s var(--ut-ease-out);
}
.ut-menu-toggle__bars::before {
  top: 0;
}
.ut-menu-toggle__bars::after {
  top: 6.5px;
}
.ut-menu-open .ut-menu-toggle__bars::before {
  top: 3.25px;
  transform: rotate(45deg);
}
.ut-menu-open .ut-menu-toggle__bars::after {
  top: 3.25px;
  transform: rotate(-45deg);
}
.ut-menu-open .ut-header {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: none;
}

.ut-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 55;
  padding: calc(var(--ut-header-h) + 24px) var(--ut-gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--ut-sans);
  color: var(--ut-text);
  background:
    radial-gradient(80% 50% at 80% 0%, var(--ut-glow), transparent 70%),
    var(--ut-bg);
  clip-path: circle(0% at calc(100% - 56px) 32px);
  visibility: hidden;
  transition: clip-path 0.7s var(--ut-ease-in-out), visibility 0s linear 0.7s;
}
/* JS sites toggle .ut-menu-open on <body>; the no-JS site opens the menu with #menu (:target). */
.ut-menu-open .ut-mobile-nav,
.ut-mobile-nav:target {
  clip-path: circle(150% at calc(100% - 56px) 32px);
  visibility: visible;
  transition: clip-path 0.8s var(--ut-ease-in-out), visibility 0s;
}
.ut-mobile-nav__close {
  position: absolute;
  top: calc((var(--ut-header-h) - 40px) / 2);
  right: var(--ut-gutter);
}
.ut-mobile-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ut-line);
}
.ut-mobile-nav li {
  border-bottom: 1px solid var(--ut-line);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.6s var(--ut-ease-out);
}
.ut-menu-open .ut-mobile-nav li,
.ut-mobile-nav:target li {
  opacity: 1;
  transform: none;
}
.ut-mobile-nav li:nth-child(1) { transition-delay: 0.2s; }
.ut-mobile-nav li:nth-child(2) { transition-delay: 0.26s; }
.ut-mobile-nav li:nth-child(3) { transition-delay: 0.32s; }
.ut-mobile-nav li:nth-child(4) { transition-delay: 0.38s; }
.ut-mobile-nav li:nth-child(5) { transition-delay: 0.44s; }
.ut-mobile-nav li:nth-child(6) { transition-delay: 0.5s; }
.ut-mobile-nav li a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  font-size: clamp(30px, 8.5vw, 46px);
  font-weight: 520;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--ut-text);
  text-decoration: none;
}
.ut-mobile-nav li a span {
  font-family: var(--ut-mono);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  color: var(--ut-accent-2);
}
.ut-mobile-nav__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Footer ---------- */
.ut-footer {
  position: relative;
  background: var(--ut-footer-bg);
  padding-top: clamp(64px, 10vh, 112px);
  font-family: var(--ut-sans);
  color: var(--ut-text);
  overflow: hidden;
}
.ut-footer__cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--ut-col-gap);
  row-gap: 36px;
  padding-bottom: clamp(56px, 9vh, 96px);
}
.ut-footer__col {
  grid-column: span 2;
}
.ut-footer__col--wide {
  grid-column: span 4;
}
.ut-footer__col ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 15px;
}
.ut-footer__col a {
  color: var(--ut-text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ut-footer__col a:hover {
  color: var(--ut-text);
}
.ut-footer__col--wide p {
  margin: 16px 0 0;
  max-width: 26em;
  color: var(--ut-text-mute);
  font-size: 15px;
}
/* "Ein Produkt von UT-Systems" */
.ut-footer__by {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  font-size: 14px;
  color: var(--ut-text-mute);
}
.ut-footer__by a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ut-text);
  font-weight: 550;
}
.ut-footer__by svg {
  height: 12px;
  width: auto;
  fill: currentColor;
}
.ut-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-block: 18px;
  border-top: 1px solid var(--ut-line);
  font-family: var(--ut-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ut-text-mute);
}
.ut-footer__base a {
  color: var(--ut-text-mute);
  text-decoration: none;
}
.ut-footer__base a:hover {
  color: var(--ut-text);
}
/* Language links: the only language switch on the site */
.ut-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ut-langs a[aria-current] {
  color: var(--ut-text);
}

/* ---------- Microsoft Store rating (filled by ut-core.js or at build time) ---------- */
.ut-rating {
  --r: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ut-text-mute);
}
.ut-rating[hidden] {
  display: none;
}
.ut-rating b {
  color: var(--ut-text);
  font-weight: 600;
}
.ut-rating__stars {
  display: inline-block;
  width: 5.6em;
  height: 1em;
  background: linear-gradient(90deg, #ffb547 calc(var(--r) * 20%), var(--ut-line-strong) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 20.9l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E") left center / 1.12em 1em repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 20.9l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E") left center / 1.12em 1em repeat-x;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ut-footer__col {
    grid-column: span 4;
  }
  .ut-footer__col--wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 960px) {
  :root {
    --ut-header-h: 64px;
  }
  .ut-nav {
    display: none;
  }
  .ut-menu-toggle {
    display: inline-flex;
  }
}
@media (max-width: 600px) {
  .ut-footer__col {
    grid-column: span 6;
  }
  .ut-footer__col--wide {
    grid-column: 1 / -1;
  }
  .ut-footer__base {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ut-it,
  .ut-header {
    animation: none;
  }
  @supports (animation-timeline: scroll()) {
    .ut-header--nojs {
      animation: ut-header-solid linear both;
      animation-timeline: scroll(root);
      animation-range: 0 24px;
    }
  }
  .ut-mobile-nav,
  .ut-mobile-nav li {
    transition: none;
  }
}
