/* PRO 1 theme 1.0 - www.pro1.lv. Mobile first, fluid to 4K, light + dark (system default, visitor override).
   System fonts only, no frameworks, inline SVG icons. --accent comes from the theme settings (inline in <head>). */

/* ---------- tokens ---------- */
:root {
  --accent: #ff5b2e; --on-accent: #111316;
  --bg: #f6f6f3; --bg-alt: #ecebe6; --surface: #ffffff; --surface-2: #f1f0ec;
  --ink: #111316; --muted: #5a6068; --line: rgba(17, 19, 22, .11);
  --header-bg: rgba(246, 246, 243, .82);
  --shadow: 0 1px 2px rgba(17, 19, 22, .05), 0 14px 34px -14px rgba(17, 19, 22, .22);
  --hero-bg: #0f1217; --hero-ink: #f4f4f2; --hero-muted: #a9aeb5;
  --radius: 1rem; --gutter: clamp(1rem, 4vw, 3.5rem); --wrap: 86rem; --header-h: 4rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d0f; --bg-alt: #121418; --surface: #16191d; --surface-2: #1c2025;
    --ink: #ecedee; --muted: #9ba1a9; --line: rgba(255, 255, 255, .09);
    --header-bg: rgba(12, 13, 15, .78);
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0d0f; --bg-alt: #121418; --surface: #16191d; --surface-2: #1c2025;
  --ink: #ecedee; --muted: #9ba1a9; --line: rgba(255, 255, 255, .09);
  --header-bg: rgba(12, 13, 15, .78);
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 16px 40px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- base: 16px on a phone, ~24px on 4K ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, .3vw + 12.5px, 24px); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.65 var(--font); overflow-x: hidden; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 3.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; border-radius: .5rem; font-weight: 700; }
.skip:focus { left: .5rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: .35rem; }
.ico { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- wordmark ---------- */
.mark { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.mark img { display: block; height: 2.25rem; width: auto; }
.mark .on-dark { display: none; }

/* ---------- header: sticky ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid var(--line); transition: background .25s, border-color .25s; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.mainnav ul { display: flex; align-items: center; gap: .2rem; }
.mainnav a { display: block; padding: .45rem .75rem; border-radius: .55rem; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600; }
.mainnav a:hover { background: var(--surface-2); }
.mainnav .lang a { color: var(--muted); letter-spacing: .04em; }
.theme-toggle { display: inline-flex; align-items: center; gap: .45rem; margin-left: .35rem; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 2rem; padding: .35rem .75rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; margin-right: -.5rem; color: var(--ink); cursor: pointer; }
.nav-toggle .ico { width: 1.6rem; height: 1.6rem; }

@media (max-width: 47.99rem) {
  .nav-toggle { display: inline-flex; }
  .mainnav { position: absolute; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .mainnav.is-open { display: block; }
  .mainnav ul { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .mainnav a { padding: .85rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .theme-toggle { margin: .9rem 0 0; }
}

/* ---------- hero: a dark rounded panel in both themes, light from the accent and the STAGE blue, no photo (fast) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; width: min(100% - 2 * var(--gutter), var(--wrap)); margin: .25rem auto 0; border-radius: 1.6rem; min-height: clamp(22rem, 54svh, 38rem); background: var(--hero-bg); color: var(--hero-ink); }
.hero::before { content: ""; position: absolute; inset: -35% -15% auto auto; width: min(70rem, 120vw); aspect-ratio: 1; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 80%, transparent), transparent 72%); filter: blur(10px); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(48rem 34rem at 0% 110%, rgba(0, 122, 194, .65), transparent 66%),
  radial-gradient(36rem 26rem at 60% -10%, rgba(255, 170, 60, .28), transparent 62%); }
.hero__inner { width: auto; margin: 0; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.4rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--hero-muted); }
.eyebrow::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 .3rem color-mix(in srgb, var(--accent) 22%, transparent); }
.wordmark { margin: 0 0 1.6rem; line-height: 0; }
.wordmark img { display: block; width: clamp(12rem, 30vw, 26rem); height: auto; }
.lead { font-size: clamp(1.2rem, 2.2vw, 2rem); line-height: 1.3; max-width: 30ch; color: var(--hero-ink); margin: 0 0 2rem; }
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.3rem; border-radius: 2rem; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); }

/* ---------- sections ---------- */
.sec { padding-block: clamp(3.5rem, 9vw, 8rem); }
.sec--alt { background: var(--bg-alt); }
.sec__head { margin-bottom: clamp(1.8rem, 4vw, 3rem); max-width: 48rem; }
.sec__head h2 { margin-bottom: .35em; }
.sec__sub { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* ---------- brand cards ---------- */
.brands { display: grid; gap: clamp(.9rem, 1.6vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }
.brand { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.brand:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.brand__logo { display: grid; place-items: center; aspect-ratio: 16 / 8; padding: 1.4rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.brand__logo img { width: auto; max-width: 78%; max-height: 4.6rem; object-fit: contain; }
.brand__logo .on-dark { display: none; }
@media (max-width: 40rem) { .brand__logo { aspect-ratio: auto; min-height: 7.5rem; padding: 1.4rem 1.6rem; } .brand__logo img { max-height: 3.6rem; max-width: 70%; } }
.brand__wordmark { font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; }
.brand__body { display: flex; flex-direction: column; gap: .25rem; padding: 1.15rem 1.25rem 1.3rem; flex: 1; }
.brand__name { margin: 0; }
.brand__line { color: var(--muted); }
.brand__host { margin-top: auto; padding-top: .9rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.brand:hover .brand__host { color: var(--ink); }
.brand__host .ico { transition: transform .2s; color: var(--accent); }
.brand:hover .brand__host .ico { transform: translate(2px, -2px); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo .on-light, :root:not([data-theme="light"]) .mark .on-light { display: none; }
  :root:not([data-theme="light"]) .brand__logo .on-dark, :root:not([data-theme="light"]) .mark .on-dark { display: block; }
  :root:not([data-theme="light"]) .brand__logo.is-invertible img { filter: invert(1) hue-rotate(180deg); }
}
:root[data-theme="dark"] .brand__logo .on-light, :root[data-theme="dark"] .mark .on-light { display: none; }
:root[data-theme="dark"] .brand__logo .on-dark, :root[data-theme="dark"] .mark .on-dark { display: block; }
:root[data-theme="dark"] .brand__logo.is-invertible img { filter: invert(1) hue-rotate(180deg); }

/* ---------- about + text pages ---------- */
.about { display: grid; gap: 1rem 4rem; }
@media (min-width: 60rem) { .about { grid-template-columns: minmax(14rem, 1fr) 2fr; align-items: start; } }
.prose { max-width: 68ch; font-size: 1.08rem; }
.about .prose { font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.55; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: .6rem; }
.page-head { padding: clamp(2.5rem, 6vw, 5rem) 0 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.page-head + .sec { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.error { min-height: 60svh; display: grid; align-items: center; }
.error .eyebrow { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 5vw, 4rem); font-size: .92rem; }
.foot { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .foot { grid-template-columns: 1fr auto; align-items: start; } }
.foot__brand p { color: var(--muted); margin: .6rem 0 0; }
.mark--foot img { height: 2.6rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot__links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot__links a:hover { color: var(--ink); }
.foot__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.2rem 0 1.6rem; color: var(--muted); font-size: .85rem; }
.powered { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); text-decoration: none; font-size: .78rem; letter-spacing: .03em; }
.powered:hover { color: var(--ink); }
.powered__mark { display: block; height: 1.25rem; width: auto; }
.foot__bottom p { margin: 0; }

/* ---------- motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .nav-toggle, .theme-toggle, .hero::before, .hero::after { display: none !important; }
  .hero { min-height: 0; margin: 0; border-radius: 0; background: none; color: #000; }
  .wordmark img { filter: brightness(0); }
  body { background: #fff; color: #000; }
}
