/* self-hosted fonts (Clash Display: Fontshare/ITF FFL; Familjen Grotesk: OFL) */
@font-face {
  font-family: 'Clash Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/clash-display-500-0.woff2') format('woff2');
}
@font-face {
  font-family: 'Clash Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/clash-display-600-1.woff2') format('woff2');
}
@font-face {
  font-family: 'Clash Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/clash-display-700-2.woff2') format('woff2');
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-3.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-4.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: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-5.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: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-3.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-4.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: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-5.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: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-3.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-4.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: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/familjen-grotesk-400-5.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;
}

/* theme tokens. every theme is named explicitly, so adding one can't silently
   inherit another's palette. bare :root is "polar day" — the light theme — and
   doubles as the fallback if the pre-paint script never sets [data-theme]. */
:root {
  --df: 'Clash Display';
  color-scheme: light;
  --bg: #FFFFFF;
  --ink: #0B1219;
  --muted: #56616C;
  --dim: #78828C;
  --accent: #0B1219;
  --accent-hov: #2A343E;
  --on-accent: #FFFFFF;
  --line: rgba(11,18,25,.12);
  --line-strong: rgba(11,18,25,.15);
  --panel-bg: rgba(255,255,255,.96);
  --input-bg: rgba(11,18,25,.03);
  --backdrop: rgba(255,255,255,.88);
  --sel-bg: rgba(11,18,25,.85);
  --sel-ink: #FFFFFF;
  --sb-track: #FFFFFF;
  --sb-thumb: #C3CBD3;
  --sb-thumb-hov: #A9B4BE;
  --ok: #1E7A4C;
  --err: #B34A4A;
}
/* the light theme inverted: white ink on black */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --ink: #F5F7F9;
  --muted: #9AA3AC;
  --dim: #78828C;
  --accent: #F5F7F9;
  --accent-hov: #D5DBE1;
  --on-accent: #000000;
  --line: rgba(245,247,249,.14);
  --line-strong: rgba(245,247,249,.18);
  --panel-bg: rgba(8,9,10,.96);
  --input-bg: rgba(245,247,249,.04);
  --backdrop: rgba(0,0,0,.88);
  --sel-bg: rgba(245,247,249,.85);
  --sel-ink: #000000;
  --sb-track: #000000;
  --sb-thumb: #2A2E33;
  --sb-thumb-hov: #3C4249;
  --ok: #8FE0B4;
  --err: #FF9E9E;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: 'Familjen Grotesk', system-ui, sans-serif; }
a { text-decoration: none; color: inherit; }
::selection { background: var(--sel-bg); color: var(--sel-ink); }
html { scrollbar-color: var(--sb-thumb) var(--sb-track); }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--sb-track); }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 6px; border: 2px solid var(--sb-track); }
::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hov); }

#boot { position: fixed; inset: 0; background: var(--bg); z-index: 120; transition: opacity .65s ease; }
#boot.done { opacity: 0; pointer-events: none; }
.cursor-dot { position: fixed; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
  pointer-events: none; z-index: 40; transform: translate(-50%,-50%); transition: opacity .3s; opacity: 0; }

/* theme toggle — the page's only chrome, kept to a single hairline glyph */
.theme-toggle { position: fixed; top: 16px; right: 18px; z-index: 60;
  width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  border: none; background: none; color: var(--dim); cursor: pointer;
  transition: color .2s; -webkit-tap-highlight-color: transparent; }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle:focus-visible { color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 9px; }
/* the glyph names the theme you're in; clicking switches to the other */
.theme-toggle svg { width: 17px; height: 17px; display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon,
:root:not([data-theme="dark"]) .theme-toggle .i-sun { display: block; }

/* the page: one screen. as plain HTML it shows the wordmark as text and each
   logo drawn from its SVG in ink; once app.js has particles running (.gl) they
   draw the word over .fin-word's text, made transparent, and each logo inside
   its .proj-mark box, and the words fade in after them (.live) */
.finale { position: relative; isolation: isolate; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center; }
#stage { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; }
/* letter-spacing stays 0: the particle word is sampled from plain canvas text */
.fin-word { font-family: var(--df), 'Familjen Grotesk', sans-serif; font-weight: 600; line-height: 1;
  font-size: clamp(52px, min(7vw, 10svh), 92px); letter-spacing: 0; }
.gl .fin-word { color: transparent; user-select: none; }
.fin-in { transition: opacity .6s ease, transform .6s ease, visibility 0s; }
.gl .finale:not(.live) .fin-in { opacity: 0; transform: translate3d(0, 12px, 0); visibility: hidden; transition: none; }
.fin-line { margin-top: clamp(10px, 1.6svh, 16px); font-size: 15px; color: var(--muted); }
.fin-svc { margin-top: 7px; font-size: 12.5px; color: var(--dim); letter-spacing: .03em; }
/* one row however many projects there are, each a column up to 180px wide */
.fin-projects { list-style: none; padding: 0; margin-top: clamp(28px, 6svh, 64px);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 180px);
  column-gap: clamp(16px, 3vw, 48px); justify-content: center; }
.proj { display: flex; flex-direction: column; align-items: center; min-width: 0; }
/* the box a logo sits in. app.js sizes every logo to the same area of it; the
   plain version fits each SVG into a wide frame instead (wide logos fill its
   width, square ones its height), which comes out close */
.proj-mark { --mark: clamp(80px, 18svh, 170px); display: grid; place-items: center;
  width: min(var(--mark), 100%); aspect-ratio: 1; flex: none; }
.proj-mark::before { content: ''; width: 100%; aspect-ratio: 7 / 5; background: var(--ink);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.gl .proj-mark::before { content: none; }
.proj h2 { margin-top: 14px; font-family: var(--df), 'Familjen Grotesk', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.proj p { margin-top: 5px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.proj a { display: inline-block; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.fin-cta { margin-top: clamp(28px, 6svh, 56px); }

/* portrait phones and tablets: the projects stack as rows, logo beside its words */
@media (max-width: 960px) and (orientation: portrait) {
  .finale { padding: 20px 22px; }
  .fin-projects { grid-auto-flow: row; grid-template-columns: minmax(0, 340px); row-gap: 14px; margin-top: 26px; }
  .proj { flex-direction: row; gap: 16px; text-align: left; }
  .proj-mark { --mark: 60px; width: var(--mark); }
  .proj h2 { margin-top: 0; font-size: 17px; }
  .proj p { margin-top: 2px; font-size: 12.5px; }
  .proj a { margin-top: 3px; font-size: 13px; }
  .fin-cta { margin-top: 26px; }
}
/* short portrait screens: drop the services line, then the one-liners */
@media (orientation: portrait) and (max-height: 700px) {
  .fin-svc { display: none; }
}
@media (orientation: portrait) and (max-height: 600px) {
  .proj p { display: none; }
  .proj-mark { --mark: 52px; }
  .fin-word { font-size: 44px; }
}
/* short landscape screens (phones on their side): names and links only */
@media (orientation: landscape) and (max-height: 560px) {
  .fin-svc, .proj p { display: none; }
  .fin-word { font-size: 40px; }
  .proj-mark { --mark: clamp(60px, 19svh, 104px); }
  .proj h2 { margin-top: 8px; }
  .fin-projects { margin-top: 18px; }
  .fin-cta { margin-top: 18px; }
}

.visually-hidden { position: absolute !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; height: 1px !important; width: 1px !important; overflow: hidden !important; }

.cta-btn { cursor: pointer; border: none; border-radius: 12px; padding: 15px 30px;
  background: var(--accent); color: var(--on-accent); font-family: var(--df), 'Familjen Grotesk', sans-serif;
  font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; transition: background .2s, transform .2s; }
.cta-btn:hover, .cta-btn:focus-visible { background: var(--accent-hov); transform: translateY(-2px); outline: none; }

.contact-modal { display: none; position: fixed; inset: 0; z-index: 95; background: var(--backdrop); align-items: center; justify-content: center; padding: 20px; }
.contact-modal.open { display: flex; }
.cpanel { position: relative; width: min(440px, 100%); background: var(--panel-bg); border: 1px solid var(--line-strong); border-radius: 16px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); padding: 30px 30px 28px; }
.cpanel h2 { font-family: var(--df), 'Familjen Grotesk', sans-serif; font-size: 24px; font-weight: 600; letter-spacing: -.02em; padding-bottom: 20px; }
.cclose { position: absolute; top: 26px; right: 22px; width: 36px; height: 36px; border: none; background: none; color: var(--dim);
  font-size: 26px; line-height: 1; cursor: pointer; transition: color .2s; }
.cclose:hover { color: var(--ink); }
.cpanel form { display: grid; gap: 12px; }
.cpanel input[type=text], .cpanel input[type=email], .cpanel textarea { width: 100%; padding: 13px 15px;
  background: var(--input-bg); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--ink); font-family: 'Familjen Grotesk', sans-serif; font-size: 14.5px; transition: border-color .2s; }
.cpanel input:focus, .cpanel textarea:focus { outline: none; border-color: var(--accent); }
.cpanel textarea { resize: vertical; min-height: 110px; }
.csubmit { cursor: pointer; border: none; border-radius: 10px; padding: 13px;
  background: var(--accent); color: var(--on-accent); font-family: 'Familjen Grotesk', sans-serif; font-size: 15px; font-weight: 700; transition: background .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.csubmit svg { width: 15px; height: 15px; }
.csubmit:hover, .csubmit:focus-visible { background: var(--accent-hov); outline: none; }
.csubmit:disabled { opacity: .6; cursor: default; }
.cstatus { font-size: 13px; text-align: center; margin-top: 4px; color: var(--muted); }
.cstatus.ok { color: var(--ok); }
.cstatus.err { color: var(--err); }
.cstatus:empty { display: none; }
/* Google allows hiding the badge when the form carries its notice instead. it has to go:
   the frosted panel (backdrop-filter) becomes the containing block for the badge's
   position:fixed, so it hangs off the panel's edge rather than the viewport's */
.grecaptcha-badge { visibility: hidden; }
.cnote { font-size: 12px; line-height: 1.5; text-align: center; color: var(--dim); }
.cnote a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.cnote a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fin-in { transition: none; }
  .gl .finale:not(.live) .fin-in { transform: none; }
}

/* privacy & terms — a plain reading column; no stage, no chrome */
.legal { max-width: 680px; margin: 0 auto; padding: 48px 24px 64px; }
.legal-home { font-family: var(--df), 'Familjen Grotesk', sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.legal h1 { margin-top: 64px; font-family: var(--df), 'Familjen Grotesk', sans-serif; font-size: clamp(34px, 6vw, 52px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.legal .eff { margin-top: 12px; font-size: 14px; color: var(--dim); }
.legal h2 { margin-top: 44px; font-family: var(--df), 'Familjen Grotesk', sans-serif; font-size: 21px; font-weight: 600; letter-spacing: -.02em; scroll-margin-top: 24px; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: var(--muted); }
.legal p { margin-top: 12px; }
.legal .eff + p { margin-top: 36px; }
.legal ul { margin-top: 12px; padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal p a, .legal li a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.legal p a:hover, .legal li a:hover { text-decoration-color: currentColor; }
.legal-foot { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--dim); }
.legal-foot a:hover { color: var(--ink); }
