/* AI Verstas — site styles. Fonts are self-hosted (SIL OFL), no third-party requests. */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #F3F1EC;
  --fg: #16150F;
  --accent: #B8321A;
  --accent-ink: #F3F1EC;
  --line: rgba(22, 21, 15, 0.16);
  --muted: rgba(22, 21, 15, 0.62);
  --hover: rgba(22, 21, 15, 0.035);
  --pad-x: clamp(16px, 5vw, 72px);
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14140F;
    --fg: #F1EFE8;
    --accent: #F0583C;
    --accent-ink: #14140F;
    --line: rgba(241, 239, 232, 0.17);
    --muted: rgba(241, 239, 232, 0.64);
    --hover: rgba(241, 239, 232, 0.04);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
img, svg { display: block; max-width: 100%; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.label { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px var(--pad-x); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.brand-mark { width: 9px; height: 9px; background: var(--accent); }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); }
.nav a { padding: 4px 0 2px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav .lang { padding: 7px 12px 6px; border: 1px solid var(--line); }
.nav .lang:hover { border-color: var(--accent); }
@media (max-width: 640px) { .nav .sec { display: none; } }

/* Sections */
.section { padding: clamp(56px, 9vh, 120px) var(--pad-x); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; margin-bottom: clamp(28px, 5vh, 56px); color: var(--muted); }

/* Hero */
.hero { padding-top: clamp(48px, 10vh, 132px); padding-bottom: clamp(48px, 9vh, 110px); }
.hero .section-head { margin-bottom: 0; }
.hero h1 { margin-top: clamp(36px, 8vh, 112px); font-size: clamp(64px, 15vw, 248px); line-height: 0.86; letter-spacing: -0.045em; font-weight: 600; }
.hero h1 span { display: block; }
.hero-foot { margin-top: clamp(32px, 6vh, 72px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 4vw, 64px); align-items: end; }
.lede { max-width: 30ch; font-size: clamp(21px, 2.3vw, 30px); line-height: 1.32; letter-spacing: -0.015em; text-wrap: pretty; }
.shapes { display: flex; gap: 14px; align-items: center; }
.shapes span { width: clamp(44px, 7vw, 96px); height: clamp(44px, 7vw, 96px); display: block; }
.shapes .sq { border: 1px solid var(--fg); }
.shapes .ci { border-radius: 50%; background: var(--accent); }
.shapes .ln { height: 1px; background: var(--fg); }

/* Work grid */
.work { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--bg); padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; justify-content: space-between; gap: 36px; min-height: 300px; transition: background 180ms ease; }
.card:hover { background: color-mix(in srgb, var(--bg), var(--fg) 3.5%); }
.card.feature { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 4vw, 64px); }
.card h2, .card h3 { margin-top: 16px; font-weight: 600; letter-spacing: -0.03em; }
.card.feature h2 { font-size: clamp(36px, 4.6vw, 72px); overflow-wrap: anywhere; line-height: 0.94; letter-spacing: -0.035em; }
.card h3 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.02; }
.card p { margin-top: 18px; max-width: 46ch; color: var(--muted); text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; list-style: none; padding: 0; }
.tags li { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line); padding: 8px 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.live { color: var(--accent); }
.status.dev { color: var(--muted); }
.status.dev::before { background: transparent; border: 1px solid currentColor; }

.figure { position: relative; min-height: 240px; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.figure span { position: absolute; display: block; }
.fig-orbit .o1 { width: 64%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--fg); }
.fig-orbit .o2 { width: 40%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--fg); }
.fig-orbit .o3 { width: 15%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); transition: transform 600ms cubic-bezier(.2,.7,.2,1); }
.fig-orbit .ax { left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.card.feature:hover .fig-orbit .o3 { transform: translateX(110%); }

.glyph { display: flex; gap: 10px; align-items: center; }
.glyph span { display: block; width: 38px; height: 38px; }
.g-route .a { border-radius: 50%; border: 1px solid var(--fg); }
.g-route .b { width: 56px; height: 1px; background: var(--fg); }
.g-route .c { border-radius: 50%; background: var(--accent); }
.g-box .a { border: 1px solid var(--fg); }
.g-box .b { border: 1px solid var(--fg); transform: rotate(45deg) scale(0.82); }
.g-box .c { width: 9px; height: 38px; background: var(--accent); }

/* Services */
.rows { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); padding: clamp(22px, 3.5vw, 40px) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(14px, 3vw, 48px); align-items: baseline; }
.row h3 { font-size: clamp(30px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.03em; font-weight: 600; }
.row p { max-width: 46ch; color: var(--muted); text-wrap: pretty; }

/* About */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(32px, 5vw, 88px); align-items: start; }
.about .big { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.38; letter-spacing: -0.015em; max-width: 34ch; text-wrap: pretty; }
.about .big + p { margin-top: 26px; }
.about p:not(.big) { color: var(--muted); max-width: 54ch; text-wrap: pretty; }
.facts { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { text-align: right; }

/* Contact */
.contact { border-bottom: 0; padding-bottom: clamp(64px, 11vh, 140px); }
.contact .lede { max-width: 40ch; margin-bottom: clamp(24px, 4vh, 44px); }
.mail { display: inline-block; font-size: clamp(30px, 7.4vw, 108px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 600; border-bottom: 2px solid transparent; transition: color 180ms ease, border-color 180ms ease; overflow-wrap: anywhere; }
.mail:hover { border-bottom-color: var(--accent); }

/* Footer */
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 24px var(--pad-x) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a:hover { color: var(--accent); }

/* Legal pages */
.legal { border-bottom: 0; }
.legal > * { max-width: 760px; }
.legal h1 { font-size: clamp(40px, 7vw, 84px); line-height: 0.95; letter-spacing: -0.035em; font-weight: 600; margin-top: 20px; }
.legal .intro { margin-top: 28px; font-size: clamp(19px, 2vw, 22px); line-height: 1.45; letter-spacing: -0.01em; }
.legal h2 { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 22px; letter-spacing: -0.015em; font-weight: 600; }
.legal p, .legal ul { margin-top: 14px; color: var(--muted); }
.legal p.intro { color: var(--fg); }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal b { color: var(--fg); font-weight: 600; }
.legal a { color: var(--fg); border-bottom: 1px solid var(--accent); }
.legal a:hover { color: var(--accent); }

/* 404 */
.notfound h1 { font-size: clamp(96px, 22vw, 320px); line-height: 0.85; letter-spacing: -0.05em; font-weight: 600; color: var(--accent); }
.notfound p { margin-top: 24px; font-size: clamp(19px, 2vw, 24px); }
.notfound a { border-bottom: 1px solid var(--accent); }
