@font-face {
  font-family: "Golos Text";
  src: url("assets/golos-text.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #13213a;
  --quiet: #42536c;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --wash: #e8eef8;
  --line: #cdd7e8;
  --link: #1a4c97;
  --night: #101f3a;
  --night-deep: #0d1a31;
  --night-line: #3c516e;
  --night-text: #f7f9ff;
  --night-muted: #c9d6eb;
  --ice: #b9d7ff;
  --focus: #285cc4;
  font: 100%/1.55 "Golos Text", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf3ff;
  --quiet: #bfcee5;
  --paper: #112038;
  --surface: #182944;
  --wash: #1b2d4a;
  --line: #405475;
  --link: #bad7ff;
  --focus: #b9d7ff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.25rem; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.masthead :focus-visible, .contact :focus-visible { outline-color: var(--ice); }
::selection { color: #10203a; background: #b9d7ff; }
.shell { width: min(100% - 6rem, 1220px); margin-inline: auto; }

.skip-link {
  position: fixed; top: .8rem; left: .8rem; z-index: 5;
  transform: translateY(-180%); padding: .7rem 1rem;
  color: var(--ink); background: var(--surface);
}
.skip-link:focus { transform: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0;
}

.masthead, .contact { color: var(--night-text); background: var(--night); }
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  min-height: 75px; border-bottom: 1px solid var(--night-line);
}
.identity { font-size: 1rem; font-weight: 700; text-decoration: none; }
.site-header nav { display: flex; gap: clamp(.85rem, 3.2vw, 2.4rem); align-items: center; }
.site-header nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--night-muted); font-size: .9rem; text-decoration: none; white-space: nowrap;
}
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--night-text); text-decoration: underline; }
.hero {
  min-height: 560px; display: grid; grid-template-columns: 1fr 1.15fr;
  align-items: center; gap: clamp(2rem, 6vw, 5.5rem); padding-block: 52px 62px;
}
.hero-copy { min-width: 0; }
.hero h1, .portfolio-hero h1 {
  font-weight: 750; font-size: clamp(2.6rem, 5vw, 4.65rem);
  line-height: 1.01; letter-spacing: -.041em; text-wrap: balance;
}
.hero-copy > p, .portfolio-hero > p {
  color: var(--night-muted); margin-top: 1.35rem; max-width: 51ch; font-size: clamp(1rem, 1.35vw, 1.15rem);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem .8rem; }
.hero .actions { margin-top: 1.75rem; }
.hero-copy .hero-note { font-size: .86rem; margin-top: .9rem; }
.portrait {
  border: 1px solid #6e8cba; border-radius: 16px 16px 88px 16px; overflow: hidden;
  box-shadow: 0 22px 40px #0005; background: #233c63;
}
.portrait img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.button {
  display: inline-flex; justify-content: center; gap: .55em; align-items: center; min-height: 48px;
  text-align: center; padding: .7rem 1rem; border: 1px solid transparent;
  border-radius: .55rem; font-size: .92rem; font-weight: 680; text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease;
}
.button-primary { color: #101f3a; background: var(--ice); }
.button-primary:hover { background: #d9e9ff; }
.button-outline { color: var(--night-text); border-color: #7086a7; }
.button-outline:hover { background: #25395a; border-color: #b7c9e5; }
.dialog-inner .button-primary { background: #1d4691; color: #fff; }
.dialog-inner .button-primary:hover { background: #285bab; }
.arrow { display: inline-block; width: .94rem; height: .7rem; position: relative; flex: none; }
.arrow::before, .arrow::after { content: ""; position: absolute; display: block; }
.arrow::before { width: .83rem; height: 1.5px; left: 0; top: calc(50% - .75px); background: currentColor; }
.arrow::after {
  width: .43rem; height: .43rem; right: .07rem; top: calc(50% - .215rem);
  border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}

.section { padding-block: clamp(3.75rem, 7vw, 6.6rem); }
.section-intro { margin-bottom: clamp(1.4rem, 3vw, 2.8rem); }
.section h2, .contact h2 {
  font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.075;
  letter-spacing: -.038em; font-weight: 740; text-wrap: balance;
}
.feature h3 { font-size: clamp(1.17rem, 2vw, 1.48rem); line-height: 1.2; letter-spacing: -.021em; }
.feature p { color: var(--quiet); margin-top: .52rem; max-width: 52ch; }
.text-link { color: var(--link); display: inline-flex; align-items: center; gap: .55em; min-height: 44px; font-weight: 650; }
.split-intro { display: flex; align-items: end; justify-content: space-between; gap: .7rem 1.8rem; }
.split-intro .text-link { flex: none; }
.section-work { background: var(--wash); }
.featured-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.9rem, 2vw, 1.5rem); }
.feature {
  min-width: 0; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; text-decoration: none;
}
.feature:hover h3, .feature:focus-visible h3 { color: var(--link); text-decoration: underline; }
.feature-media { position: relative; flex: none; aspect-ratio: 16 / 9; background: #cfdbed; overflow: hidden; }
.feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.feature-media-wide { background: #eef3f7; }
.feature-media-wide img { object-fit: contain; object-position: center; }
.feature-copy { padding: .95rem 1rem 1.3rem; }
.feature p { font-size: .9rem; }
.feature .feature-estimate { color: var(--ink); font-weight: 650; }
.featured-projects .feature:first-child { grid-column: 1 / -1; }
@media (min-width: 721px) {
  .featured-projects .feature:first-child { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; }
  .featured-projects .feature:first-child .feature-copy { padding: 1.5rem; }
}
.portfolio-hero { padding-block: clamp(2.7rem, 7vw, 5.7rem); }
.portfolio-hero h1 { font-size: clamp(2.55rem, 6vw, 4.8rem); }
.portfolio-hero > p { max-width: 57ch; margin-top: 1rem; }
.construction-links { display: flex; flex-wrap: wrap; gap: 0 1.4rem; margin-top: .55rem; }
.portfolio-main { padding-block: 2.35rem clamp(3.75rem, 7vw, 6rem); }
.filter-bar, .screen-menu { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.6rem; }
.filter-bar button, .screen-menu button {
  min-height: 44px; border: 1px solid var(--line); border-radius: .45rem;
  padding: .42rem .75rem; background: var(--surface); color: var(--ink);
  font-size: .875rem; font-weight: 630;
}
.filter-bar button:hover, .screen-menu button:hover { border-color: var(--link); color: var(--link); }
.filter-bar button[aria-pressed="true"], .screen-menu button[aria-pressed="true"] {
  background: var(--night); color: #fff; border-color: #5b79a5;
}
:root[data-theme="dark"] :is(.filter-bar,.screen-menu) button[aria-pressed="true"] {
  background: var(--ice); color: var(--night-deep);
}
.case-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.project-card {
  min-width: 0; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); border-radius: .75rem;
}
.project-link { display: block; height: 100%; text-decoration: none; }
.project-link:focus-visible { outline-offset: -3px; }
.project-link:hover .project-name, .project-link:focus-visible .project-name { text-decoration: underline; color: var(--link); }
.project-cover { aspect-ratio: 2 / 1; overflow: hidden; background: var(--wash); border-bottom: 1px solid var(--line); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.project-cover-contained img { object-fit: contain; object-position: center; }
.project-copy { padding: clamp(.85rem, 2.7vw, 1.3rem); }
.project-card .project-name { font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.14; letter-spacing: -.025em; text-wrap: balance; }
.project-copy p { color: var(--quiet); margin-top: .54rem; max-width: 53ch; }
.project-card-featured { grid-column: 1 / -1; }
@media (min-width: 721px) {
  .project-card-featured .project-link { display: grid; grid-template-columns: 1.55fr 1fr; }
  .project-card-featured .project-cover { border-bottom: 0; border-right: 1px solid var(--line); }
  .project-card-featured .project-copy { align-self: center; padding: 1.5rem; }
  .project-card-featured .project-name { font-size: clamp(1.65rem, 3.25vw, 2.5rem); }
}
.story-heading { margin-block: 1rem 1.5rem; }
.story-heading h1 { font-size: clamp(2rem, 5.2vw, 4.15rem); line-height: 1.05; letter-spacing: -.042em; text-wrap: balance; }
.story-heading p { margin-top: .65rem; color: var(--quiet); font-size: clamp(.98rem, 1.8vw, 1.17rem); }
.story-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2rem;
  margin: 0 0 2.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.1rem 0;
}
.story-facts dt { font-weight: 730; }
.story-facts dd { margin: .3rem 0 0; color: var(--quiet); }
.story-facts:has(+ .case-impact:not([hidden])) { margin-bottom: 1rem; }
.case-impact { margin-bottom: 2.2rem; padding: .8rem 1rem; border-left: 3px solid var(--link); background: var(--wash); }
.case-impact h2 { font-size: 1.08rem; margin-bottom: .2rem; }
.case-impact p { max-width: 75ch; }
.story-related { margin-bottom: 1rem; }
.case-view h2, .case-video h2 { font-size: clamp(1.55rem, 3vw, 2.38rem); margin-bottom: .8rem; }
.case-video { margin-bottom: 2rem; }
.case-video video {
  display: block; width: min(100%, 19.5rem); aspect-ratio: 9 / 16;
  background: var(--wash); border: 1px solid var(--line); border-radius: .65rem;
}
.screen-menu { margin-bottom: .75rem; }
.story-screen { border: 1px solid var(--line); border-radius: .65rem; overflow: hidden; background: var(--surface); }
.story-image-link { display: grid; justify-items: center; background: var(--wash); padding: .65rem; touch-action: pan-y; }
.story-image-link:focus-visible { outline-offset: -4px; }
.story-image-link img { max-height: min(72vh, 740px); width: auto; object-fit: contain; }
.story-screen figcaption { border-top: 1px solid var(--line); padding: 1rem 1.15rem; }
.story-screen figcaption p { margin: .24rem 0 .34rem; color: var(--quiet); max-width: 74ch; }
.story-screen figcaption small { font-size: .78rem; color: var(--quiet); }
.case-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.case-image-grid a { display: block; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); text-decoration: none; }
.case-image-grid a:focus-visible { outline-offset: -3px; }
.case-image-grid a:hover span { text-decoration: underline; }
.case-image-grid img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: var(--wash); }
.case-image-grid span { display: block; padding: .65rem .85rem; font-weight: 650; }
.story-cta { margin-top: 1.55rem; background: #1d4691; color: #fff; }
.story-cta:hover { background: #285bab; }

.contact { padding-block: clamp(2.8rem, 6vw, 5rem) 1.2rem; background: var(--night-deep); }
.contact-main { display: flex; gap: 1.4rem 2rem; justify-content: space-between; align-items: end; }
.contact h2 { font-size: clamp(1.85rem, 3.3vw, 2.95rem); }
.contact-main p { margin-top: .65rem; max-width: 53ch; color: var(--night-muted); }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 0 1.25rem; padding-top: .9rem; margin-top: 2rem;
  border-top: 1px solid var(--night-line); color: var(--night-muted); font-size: .82rem;
}
.footer-links > * { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links button { border: 0; padding: 0; background: none; text-decoration: underline; text-underline-offset: .22em; }
.footer-links a:hover, .footer-links button:hover { color: var(--night-text); }
.toast:empty { display: none; }
.toast {
  position: fixed; bottom: 1rem; left: 50%; z-index: 3; transform: translateX(-50%);
  color: #fff; background: #132544; border: 1px solid #8ea7cb; border-radius: .55rem;
  max-width: calc(100% - 2rem); padding: .72rem 1rem; text-align: center; font-size: .88rem;
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .shell { width: min(100% - 3.5rem, 1220px); }
  .hero { gap: 2rem; min-height: auto; }
  .contact-main { align-items: start; flex-direction: column; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 2rem); }
  .site-header { min-height: 62px; gap: .7rem; }
  .site-header nav { gap: .75rem; }
  .site-header nav a { font-size: .79rem; }
  .identity { font-size: .88rem; }
  .hero { grid-template-columns: 1fr; gap: 1.6rem; padding-block: 2rem 2.15rem; }
  .hero h1 { max-width: 13ch; }
  .hero-copy > p { margin-top: 1rem; }
  .hero .actions { margin-top: 1.15rem; }
  .portrait { border-radius: .55rem .55rem 3rem .55rem; }
  .split-intro { align-items: start; flex-direction: column; }
  .featured-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .case-index, .story-facts, .case-image-grid { grid-template-columns: 1fr; }
  .featured-projects .feature:first-child .feature-media { aspect-ratio: 2 / 1; }
}
@media (max-width: 480px) {
  .site-header { flex-wrap: wrap; gap: 0; padding-block: .55rem .3rem; }
  .site-header nav { flex-basis: 100%; justify-content: space-between; }
}
@media (max-width: 440px) {
  .hero h1 { font-size: clamp(2.1rem, 10.4vw, 2.65rem); }
  .hero .button { flex: 1 1 auto; }
  .featured-projects { grid-template-columns: 1fr; }
  .feature-media { aspect-ratio: 2 / 1; }
  .story-image-link { padding: .3rem; }

}
@media (max-width: 355px) {
  .site-header nav { gap: .55rem; }
  .site-header nav a { font-size: .72rem; }
  .identity { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
