/* thmg.pl - style */

@font-face { font-family: Heros; src: url(pliki/fonty/heros-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Heros; src: url(pliki/fonty/heros-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Heros Cn"; src: url(pliki/fonty/heros-cn-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* zmienne */
:root {
    --bg: #ffffff;
    --bg-2: #f2f3f7;
    --ink: #0e1122;
    --text: #3b3f52;
    --muted: #686d84;
    --cobalt: #1d2db8;
    --cobalt-2: #3546d8;
    --signal: #ffc400;
    --navy: #0a0f2c;
    --navy-2: #131b47;
    --on-dark: #e7e9f6;
    --on-dark-2: #a6abc9;
    --rule: rgba(14, 17, 34, .13);
    --grid: rgba(29, 45, 184, .08);
    --stage: #05081a;

    --wrap: 1440px;
    --pad: clamp(16px, 4vw, 64px);
    --gap: clamp(16px, 2.2vw, 32px);
    --head: 72px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --sans: Heros, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --cond: "Heros Cn", "Arial Narrow", Heros, sans-serif;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0a0f2c;
    --bg-2: #10173d;
    --ink: #f1f2fa;
    --text: #c8cbe0;
    --muted: #9399bb;
    --cobalt: #9ba7ff;
    --cobalt-2: #c0c7ff;
    --navy-2: #151d4d;
    --rule: rgba(231, 233, 246, .13);
    --grid: rgba(155, 167, 255, .07);
    color-scheme: dark;
}

/* baza */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 16px); scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 400 1.0625rem/1.6 var(--sans);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; }
h1, h2, h3 { color: var(--ink); font-weight: 700; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
.ico-s { display: inline-block; width: 14px; height: 14px; margin-left: 4px; vertical-align: -1px; stroke-width: 2; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; background: var(--signal); color: #000; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* linki z zoltym podkresleniem */
.ul { position: relative; display: inline-block; padding-bottom: 5px; font-weight: 700; text-decoration: none; }
.ul::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--signal); transition: background-color .2s; }
.ul:hover::after { background: currentColor; }

/* siatka kolumn (6 linii jak w layoucie) */
.grid-lines { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.grid-lines i, .hero-lines i {
    position: absolute; top: 0; bottom: 0; width: 1px;
    left: calc(max(0px, (100% - var(--wrap)) / 2) + var(--pad) + (min(100%, var(--wrap)) - 2 * var(--pad)) * var(--n) / 6);
    background: var(--grid);
}
.grid-lines i:nth-child(1), .hero-lines i:nth-child(1) { --n: 0; }
.grid-lines i:nth-child(2), .hero-lines i:nth-child(2) { --n: 1; }
.grid-lines i:nth-child(3), .hero-lines i:nth-child(3) { --n: 2; }
.grid-lines i:nth-child(4), .hero-lines i:nth-child(4) { --n: 3; }
.grid-lines i:nth-child(5), .hero-lines i:nth-child(5) { --n: 4; }
.grid-lines i:nth-child(6), .hero-lines i:nth-child(6) { --n: 5; }
.grid-lines i:nth-child(7), .hero-lines i:nth-child(7) { --n: 6; left: calc(max(0px, (100% - var(--wrap)) / 2) + min(100%, var(--wrap)) - var(--pad) - 1px); }

main, .foot { position: relative; z-index: 1; }

/* naglowek */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--head); color: #fff; transition: background-color .3s, color .3s, box-shadow .3s; }
.top-in { display: flex; align-items: center; gap: 8px; height: 100%; }
.brand { display: block; margin-right: auto; color: inherit; }
.brand-mark { width: auto; height: 30px; fill: currentColor; }
.nav { display: flex; gap: clamp(20px, 3vw, 44px); margin-right: clamp(12px, 2vw, 28px); }
.nav a { position: relative; padding: 8px 0; text-decoration: none; font-size: .975rem; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; }
.menu-btn { display: none; }
.menu-btn .ico-x { display: none; }

.top.is-solid, .top.menu-open { background: var(--bg); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.top.is-solid .brand, .top.menu-open .brand { color: var(--cobalt); }
[data-theme="dark"] .top.is-solid .brand, [data-theme="dark"] .top.menu-open .brand { color: #fff; }

/* hero */
.hero { position: relative; display: grid; grid-template-rows: 1fr auto; min-height: min(100vh, 1080px); min-height: min(100svh, 1080px); padding-top: var(--head); background: var(--navy); color: var(--on-dark); overflow: hidden; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: 60% 40%; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(90deg, rgba(10, 15, 44, .95) 0%, rgba(10, 15, 44, .86) 34%, rgba(10, 15, 44, .5) 66%, rgba(10, 15, 44, .25) 100%),
        linear-gradient(0deg, rgba(10, 15, 44, .97) 0%, rgba(10, 15, 44, .55) 22%, rgba(10, 15, 44, 0) 45%);
}
.hero-lines { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-lines i { background: rgba(255, 255, 255, .14); }
.hero-in, .hero-areas { position: relative; z-index: 3; }
.hero-in { align-self: center; padding-block: clamp(48px, 10vh, 120px) clamp(32px, 6vh, 72px); }
.hero h1 { max-width: 9.5em; color: #fff; font-size: clamp(3.1rem, 1rem + 7.4vw, 8.75rem); line-height: .9; letter-spacing: -.045em; }
.hero-lead { max-width: 30em; margin-top: clamp(20px, 3vw, 36px); color: rgba(255, 255, 255, .86); font-size: clamp(1.15rem, .95rem + .8vw, 1.6rem); line-height: 1.35; }
.hero-links { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: clamp(28px, 4vw, 48px); color: #fff; font-size: 1.05rem; }

.hero-areas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-bottom: clamp(24px, 4vh, 48px); }
.hero-areas .ico { width: 26px; height: 26px; }
.hero-areas a { display: flex; flex-direction: column; gap: 14px; padding: 22px var(--gap) 0 0; color: #fff; text-decoration: none; font-size: .95rem; line-height: 1.25; border-top: 1px solid rgba(255, 255, 255, .2); }
.hero-areas span { position: relative; align-self: flex-start; padding-bottom: 8px; }
.hero-areas span::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; background: var(--signal); transition: width .3s var(--ease); }
.hero-areas a:hover span::after, .hero-areas a:focus-visible span::after { width: 100%; }

/* jedyna animacja na wejscie: linie siatki "skanuja" hero, potem dochodza skroty.
   naglowek stoi od razu (nie opozniamy LCP) */
@media (prefers-reduced-motion: no-preference) {
    .hero-lines i { transform-origin: top; animation: scan 1.2s var(--ease) both; animation-delay: calc(var(--n) * 80ms); }
    .hero-areas { animation: rise .8s var(--ease) .7s both; }
}
@keyframes scan { from { transform: scaleY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* sekcje */
.intro, .work, .areas, .contact { padding-block: clamp(80px, 11vw, 168px) 0; }
.foot { margin-top: clamp(96px, 12vw, 176px); }

h2 { font-size: clamp(2.1rem, 1.25rem + 2.7vw, 3.75rem); line-height: 1.02; letter-spacing: -.035em; color: var(--cobalt); }
h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -.012em; }
.lead { color: var(--ink); font-size: clamp(1.2rem, 1rem + .7vw, 1.55rem); line-height: 1.4; letter-spacing: -.01em; }

.sec-head { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2 { grid-column: 1 / 4; padding-right: var(--gap); }
.sec-head p { grid-column: 4 / 7; max-width: 34em; color: var(--muted); }

.intro { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.intro h2 { grid-column: 1 / 4; padding-right: var(--gap); }
.intro-text { grid-column: 4 / 7; max-width: 38em; }
.intro-text p + p { margin-top: 1.1em; }

/* filtry */
.filters { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: clamp(36px, 5vw, 56px); padding-top: 18px; border-top: 1px solid var(--rule); }
.filters button { position: relative; padding: 8px 0 12px; color: var(--muted); font-size: .975rem; transition: color .2s; }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"] { font-weight: 700; }
.filters button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.filters button[aria-pressed="true"]::after { transform: scaleX(1); }
.filters .n { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: .8em; }
html:not(.js) .filters { display: none; }
.filter-info { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* kafelki realizacji */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: clamp(48px, 6vw, 88px); }
.proj { position: relative; grid-column: span 2; padding-right: var(--gap); }
.proj-cover { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.proj-cover img { width: 100%; height: 100%; object-fit: cover; }
.proj-cover--dg { display: grid; place-items: center; padding: 4% 5%; }
.proj-text { padding-top: 20px; }
.proj-area { color: var(--muted); font-size: .875rem; }
.proj h3 { margin-top: 6px; }
.proj-link { text-decoration: none; background: linear-gradient(var(--signal), var(--signal)) 0 100% / 0 3px no-repeat; transition: background-size .3s var(--ease); }
.proj-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.proj:hover .proj-link, .proj-link:focus-visible { background-size: 100% 3px; }
.proj-link:focus-visible { outline: none; }
.proj:has(.proj-link:focus-visible) { outline: 2px solid var(--cobalt); outline-offset: 8px; }
.proj-sum { margin-top: 8px; max-width: 34em; }
.proj[data-status]::before { content: attr(data-status); position: absolute; z-index: 1; top: 12px; left: 12px; padding: 3px 9px 4px; background: var(--signal); color: #000; font-size: .8rem; font-weight: 700; }
.proj-more { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; }
.proj-more a { position: relative; z-index: 2; }

/* projekt wyrozniony */
.proj--wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0; color: var(--on-dark-2);
    background: linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0 / calc(100% / 6) 100%, var(--navy); }
[data-theme="dark"] .proj--wide { background-color: var(--navy-2); }
.proj--wide .proj-cover { grid-column: 1 / 5; aspect-ratio: 16 / 10; background: var(--stage); }
.proj--wide .proj-text { grid-column: 5 / 7; display: flex; flex-direction: column; padding: clamp(24px, 3vw, 44px) var(--gap); }
.proj--wide .proj-area { color: var(--on-dark-2); }
.proj--wide h3 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 1.6vw, 2.75rem); letter-spacing: -.03em; }
.proj--wide .proj-sum { color: var(--on-dark); }
.proj--wide .proj-more { margin-top: auto; padding-top: 28px; color: #fff; }

.keyspec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px var(--gap); margin-top: 28px; }
.keyspec div { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .2); }
.keyspec dt { font-size: .85rem; color: var(--on-dark-2); }
.keyspec dd { color: #fff; font: 700 clamp(1.7rem, 1.2rem + 1vw, 2.3rem)/1.1 var(--cond); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* schematy svg */
.dg { width: 100%; height: auto; max-height: 100%; overflow: visible; }
.dg .ln { fill: none; stroke: var(--cobalt); stroke-width: 1.5; }
.dg .bx { fill: var(--bg); stroke: var(--cobalt); stroke-width: 1.5; }
.dg .bx-hi { stroke-width: 2.5; }
.dg .dash { stroke-dasharray: 5 4; }
.dg text { fill: var(--ink); font: 700 14px var(--sans); }
.dg text.sub { fill: var(--muted); font-weight: 400; font-size: 12px; }

/* tresc projektu (bez js widoczna pod kafelkiem, z js w podgladzie) */
.js .proj-body { display: none; }
.proj-body { margin-top: 20px; }
.proj-body > * + * { margin-top: 1em; }
.proj-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-gallery figure { width: 120px; }
.proj-gallery img { width: 120px; height: 90px; object-fit: cover; }
.proj-gallery figcaption { font-size: .75rem; color: var(--muted); }

.spec { width: 100%; font-size: .95rem; line-height: 1.4; }
.spec caption { padding-bottom: 8px; color: var(--muted); font-size: .85rem; text-align: left; }
.spec th, .spec td { padding: 9px 12px 9px 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.spec th { width: 38%; color: var(--muted); font-weight: 400; }
.spec td { color: var(--ink); }
.spec--cols th { width: auto; font-size: .8rem; }
.spec--cols td { font: 700 1.05rem/1.3 var(--cond); }
.spec--cols td:first-child { color: var(--cobalt); }
.tools { font-size: .95rem; }
.tools strong { color: var(--ink); }

/* obszary */
.area-list { border-bottom: 1px solid var(--rule); }
.area { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto 1fr; padding-block: clamp(24px, 3vw, 36px); border-top: 1px solid var(--rule); }
.area h3 { grid-column: 1 / 3; grid-row: 1 / 3; align-self: start; display: flex; align-items: center; gap: 14px; padding-right: var(--gap); }
.area h3 .ico { width: 28px; height: 28px; color: var(--cobalt); }
.area > p:not(.area-tools) { grid-column: 3 / 5; padding-right: var(--gap); color: var(--ink); }
.area-tools { grid-column: 5 / 7; grid-row: 1 / 3; color: var(--muted); font-size: .95rem; }
.area-link { grid-column: 3 / 5; justify-self: start; align-self: start; margin-top: 14px; font-size: .95rem; }

/* kontakt */
.contact { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 56px; align-items: end; }
.contact-main { grid-column: 1 / 4; padding-right: clamp(24px, 4vw, 64px); }
.contact-hints { grid-column: 4 / 7; }
.contact h2 { margin-bottom: 28px; }
.mail { margin-top: 28px; }
.mail a { position: relative; display: inline-block; padding-bottom: 8px; color: var(--cobalt); font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; text-decoration: none; }
.mail a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--signal); }
.mail a:hover { color: var(--cobalt-2); }
.topics-label { margin-top: 36px; color: var(--muted); font-size: .95rem; }
.topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding: 0; list-style: none; }
.topics a { display: block; padding: 10px 16px; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: .95rem; transition: border-color .2s, background-color .2s; }
.topics a:hover { border-color: var(--cobalt); background: var(--bg-2); }
.contact h3 { font-size: 1.05rem; }
.hints { margin-top: 12px; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.hints li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: .975rem; }
.hints strong { color: var(--ink); }

/* stopka */
.foot { background: var(--navy); color: var(--on-dark-2); }
[data-theme="dark"] .foot { background: #070b22; }
.foot-in { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; row-gap: 40px; padding-block: clamp(56px, 7vw, 96px) 40px; }
.foot-logo { grid-column: 1 / 3; width: min(220px, 100%); height: auto; fill: #fff; }
.foot-nav { grid-column: 3 / 7; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-nav a { color: #fff; text-decoration: none; font-size: .95rem; }
.foot-nav a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.foot-meta { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .875rem; }

/* podglad projektu */
.viewer { margin: auto; width: min(1320px, 100vw - 32px); height: min(880px, 100vh - 32px); height: min(880px, 100dvh - 32px); max-width: none; max-height: none; padding: 0; border: 0; background: var(--bg); color: var(--text); overflow: hidden; }
.viewer::backdrop { background: rgba(5, 8, 26, .84); }
.viewer[open] { animation: open-dlg .28s var(--ease); }
@keyframes open-dlg { from { opacity: 0; transform: translateY(10px); } }
.viewer-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 30%, 420px); height: 100%; }
.viewer-media { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; min-height: 0; background: var(--stage); color: var(--on-dark); }
.viewer-stage { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; min-height: 0; padding: 24px 64px; touch-action: pan-y; }
.viewer-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .2s; }
.viewer-img.loading { opacity: .25; }
.viewer-dg { width: 100%; height: 100%; display: grid; place-items: center; padding: 4%; background: var(--bg); }
.viewer-dg .dg { max-width: 760px; max-height: 100%; }
.viewer-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; color: #fff; background: rgba(255, 255, 255, .08); transition: background-color .2s; }
.viewer-nav:hover { background: var(--cobalt); }
.viewer-prev { left: 8px; }
.viewer-next { right: 8px; }
.viewer.one .viewer-nav, .viewer.one .viewer-thumbs, .viewer.one .viewer-count { display: none; }
.viewer-bar { display: flex; align-items: baseline; gap: 16px; padding: 12px 24px; min-height: 48px; border-top: 1px solid rgba(255, 255, 255, .1); }
.viewer-count { flex: none; color: #fff; font: 700 1rem var(--cond); }
.viewer-cap { font-size: .925rem; color: var(--on-dark-2); }
.viewer-thumbs { display: flex; gap: 6px; padding: 0 24px 16px; overflow-x: auto; scrollbar-width: thin; }
.viewer-thumbs button { position: relative; flex: none; width: 76px; height: 56px; opacity: .55; transition: opacity .2s; }
.viewer-thumbs button:hover, .viewer-thumbs button[aria-current="true"] { opacity: 1; }
.viewer-thumbs button[aria-current="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; background: var(--signal); }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.viewer-thumbs .dg { width: 100%; height: 100%; padding: 4px; background: var(--bg); }
.viewer-text { overflow-y: auto; padding: 40px 32px 40px; overscroll-behavior: contain; }
.viewer-area { color: var(--muted); font-size: .875rem; }
.viewer-text h2 { margin-top: 6px; padding-right: 40px; font-size: clamp(1.7rem, 1.3rem + 1vw, 2.3rem); }
.viewer-body { margin-top: 20px; }
.viewer-body > * + * { margin-top: 1em; }
.viewer-body .spec { margin-top: 1.6em; }
.viewer-close { position: absolute; top: 12px; right: 12px; z-index: 2; color: var(--ink); background: var(--bg); }
.viewer-close:hover { color: var(--cobalt); }

/* tablet */
@media (max-width: 1100px) {
    .proj { grid-column: span 3; }
    .proj--wide .proj-cover { grid-column: 1 / -1; }
    .proj--wide .proj-text { grid-column: 1 / -1; }
    .proj--wide .keyspec { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hero-areas { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
    .area h3 { grid-column: 1 / -1; grid-row: auto; margin-bottom: 12px; }
    .area > p:not(.area-tools) { grid-column: 1 / 4; }
    .area-tools { grid-column: 4 / 7; grid-row: 2 / 4; }
    .area-link { grid-column: 1 / 4; }
    .contact-main, .contact-hints { grid-column: 1 / -1; padding-right: 0; }
    .foot-logo { grid-column: 1 / -1; }
    .foot-nav { grid-column: 1 / -1; }
}

/* telefon */
@media (max-width: 860px) {
    :root { --head: 64px; }
    .menu-btn { display: grid; }
    .nav { position: fixed; top: var(--head); left: 0; right: 0; display: none; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--pad) 24px; background: var(--bg); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
    .nav a { padding: 14px 0; font-size: 1.25rem; font-weight: 700; border-bottom: 1px solid var(--rule); }
    .nav a::after { display: none; }
    .top.menu-open .nav { display: flex; }
    .top.menu-open .ico-menu { display: none; }
    .top.menu-open .ico-x { display: block; }
    .brand-mark { height: 26px; }
}

@media (max-width: 700px) {
    body { font-size: 1rem; }
    .grid-lines i:nth-child(2), .grid-lines i:nth-child(3), .grid-lines i:nth-child(5), .grid-lines i:nth-child(6),
    .hero-lines i:nth-child(2), .hero-lines i:nth-child(3), .hero-lines i:nth-child(5), .hero-lines i:nth-child(6) { display: none; }
    .hero h1 { letter-spacing: -.04em; }
    .hero::before { background: linear-gradient(0deg, rgba(10, 15, 44, .97) 0%, rgba(10, 15, 44, .78) 40%, rgba(10, 15, 44, .62) 100%); }
    .hero-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-areas a { padding-top: 16px; gap: 10px; font-size: .9rem; }
    .sec-head h2, .sec-head p, .intro h2, .intro-text { grid-column: 1 / -1; padding-right: 0; }
    .sec-head p, .intro-text { margin-top: 20px; }
    .proj { grid-column: 1 / -1; padding-right: 0; }
    .proj--wide .proj-text { padding: 24px 20px 28px; }
    .proj--wide .keyspec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scrollbar-width: none; }
    .filters::-webkit-scrollbar { display: none; }
    .filters button { flex: none; }
    .area > p:not(.area-tools), .area-tools, .area-link { grid-column: 1 / -1; grid-row: auto; padding-right: 0; }
    .area-tools { margin-top: 10px; }

    .viewer { width: 100vw; height: 100vh; height: 100dvh; }
    .viewer-in { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; min-height: 100%; }
    .viewer { overflow-y: auto; }
    .viewer-media { grid-template-rows: auto auto auto; }
    .viewer-stage { height: 50vh; height: 50svh; padding: 16px 8px; }
    .viewer-nav { top: auto; bottom: 8px; margin: 0; }
    .viewer-text { overflow: visible; padding: 28px 20px 48px; }
    .viewer-close { position: fixed; background: rgba(5, 8, 26, .7); color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
