@font-face {
  font-family: Onest Display;
  src: url("assets/onest-medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbfaf8;
  --ink: #292d27;
  --muted: #585e53;
  --sage: #e7ece2;
  --sage-dark: #405940;
  --line: #deded5;
  --blue: #f1f1eb;
  --peach: var(--paper);
  --radius: 12px;
  --olive-band: #dfe6d6;
  --band-ink: #293b2b;
  --band-muted: #455541;
  --band-line: #adbca4;
  --contact-button-bg: #334b3a;
  --contact-button-ink: #fff;
  --heading-green: #334b3a;
  --revit-ui: #f2f2ed;
  --revit-title: #eaece4;
  --revit-canvas: #fefefd;
  --revit-grid: #d9ded5;
  --art-surface: #fff;
  --shadow: #26282112;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #242522;
  --ink: #f4f1e9;
  --muted: #c5c7be;
  --sage: #38473b;
  --sage-dark: #b8cdb1;
  --line: #4c5148;
  --blue: #30352e;
  --olive-band: #3b5140;
  --band-ink: #faf8f1;
  --band-muted: #e0e8db;
  --band-line: #788e78;
  --contact-button-bg: #e3e9dc;
  --contact-button-ink: #263b2b;
  --heading-green: #c5d5bb;
  --revit-ui: #30342e;
  --revit-title: #383e35;
  --revit-canvas: #2a2e29;
  --revit-grid: #4a5548;
  --shadow: #0004;
}

.header {
  height: 92px;
  gap: clamp(12px, 2vw, 30px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-contact {
  border-color: var(--sage-dark);
  gap: 12px;
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .theme-sun,
[data-theme="dark"] .theme-toggle .theme-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-sun {
  display: block;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--sage);
  color: var(--sage-dark);
}

.desktop-nav a,
.header-contact {
  transition: color .18s ease;
}

.desktop-nav a:hover,
.header-contact:hover {
  color: var(--sage-dark);
}

.revit-hero {
  padding-block: clamp(36px, 4vw, 60px);
  gap: clamp(24px, 3.5vw, 48px);
  grid-template-columns: .86fr 1.14fr;
}

.revit-hero .hero-copy {
  min-width: 0;
}

.section-heading h2,
.ifc-intro h2,
.contact-section h2,
.cottage-intro h1,
.project-header h1,
.fire-hero h1 {
  font-family: Onest Display, Onest, Arial, sans-serif;
  font-weight: 700;
}

.section-heading h2,
.ifc-intro h2,
.cottage-intro h1,
.project-header h1,
.fire-hero h1 {
  color: var(--heading-green);
}

.revit-hero .hero-identity h1 {
  font-size: clamp(40px, 4.35vw, 68px);
}

.section-heading h2,
.journey-section .section-heading h2,
.ifc-intro h2 {
  font-size: clamp(29px, 3.35vw, 46px);
}

.ifc-intro h2,
.creative-section .section-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.035em;
}

.revit-hero .hero-avatar {
  flex-basis: 104px;
  width: 104px;
  height: 134px;
  border: 1px solid #fafafa;
}

.revit-hero .hero-description {
  color: var(--muted);
}

.revit-hero .name-dot {
  color: var(--sage-dark);
}

.revit-hero .availability > span {
  background: var(--sage-dark);
}

.bim-shell {
  --bim-ui: var(--revit-ui);
  --bim-border: var(--line);
  background: var(--paper);
  border-color: var(--line);
  box-shadow: 0 14px 36px var(--shadow);
}

.bim-titlebar {
  background: var(--revit-title);
}

.bim-app-mark {
  background: #405940;
  color: #fff;
}

.bim-properties h2,
.bim-browser-heading,
.bim-project-credit {
  background: var(--paper);
}

.bim-canvas {
  background-color: var(--revit-canvas);
  background-image: radial-gradient(var(--revit-grid) .65px, transparent .65px);
}

.bim-model-caption {
  color: var(--muted);
}

.bim-zoom button {
  background: var(--paper);
}

.bim-views-tree button[aria-pressed="true"] {
  background: var(--sage);
  border-color: var(--line);
  color: var(--sage-dark);
}

.facts.facts-metrics {
  padding-block: 26px;
  padding-inline: clamp(16px, 3vw, 42px);
  background: var(--olive-band);
  border: 0;
  border-radius: var(--radius);
}

.facts-metrics .fact-value {
  color: var(--band-ink);
}

.facts-metrics .fact-label {
  color: var(--band-muted);
}

.ifc-section {
  --ink: var(--band-ink);
  --muted: var(--band-muted);
  --line: var(--band-line);
  --sage-dark: var(--band-muted);
  background: var(--olive-band);
  color: var(--ink);
}

.ifc-intro h2 {
  color: var(--ink);
}

.project-image.cottage-cover,
.project-image.yamskaya-cover,
.project-image.upcoming-cover,
.cottage-cover-figure > a,
.camp-case .camp-models img {
  background: var(--art-surface);
}

.project-image .model-crop,
.project-image .model-crop img {
  mix-blend-mode: normal;
}

[data-theme="dark"] .creative-photo :is(.creative-project-label, .circle-arrow) {
  background: #1e241ee0;
  color: #f5f4ed;
  border: 1px solid #f5f4ed50;
}

.project-image .project-type,
.project-image > .circle-arrow {
  color: #354436;
  background: #fff;
}

.project-card:hover .project-info h3,
.project-card:focus-visible .project-info h3 {
  color: var(--sage-dark);
}

.project-card:hover .circle-arrow,
.project-card:focus-visible .circle-arrow {
  background: #dce9d7;
}

.project-card {
  min-width: 0;
}

.cottage-case .cottage-drawing figcaption,
.cottage-pdf-link,
.fire-result {
  background: var(--paper);
}

.cottage-select-label select,
.cottage-system-buttons button:not([aria-pressed="true"]),
.cottage-modal,
.cottage-modal-tools button,
.fire-case .lightbox {
  background: var(--paper);
  color: var(--ink);
}

.cottage-system-buttons button[aria-pressed="true"] {
  background: var(--sage);
  border-color: var(--sage-dark);
  color: var(--ink);
}

.mini-tags span {
  background: var(--sage);
  color: var(--sage-dark);
}

.yamskaya-case {
  --case-green: var(--sage-dark);
  --case-surface: var(--paper);
}

.fire-case {
  --fire: var(--sage-dark);
  --fire-pale: var(--blue);
}

.bim-sheet-actions,
.bim-sheet-dialog {
  background: var(--paper);
  color: var(--ink);
}

.cottage-pdf-link:hover {
  background: var(--sage);
}

.contact-section {
  background: var(--olive-band);
  color: var(--band-ink);
}

.contact-section > div > p,
.contact-links a > .download-meta {
  color: var(--band-muted);
}

.contact-links a {
  border-color: var(--band-line);
}

.contact-section a:hover {
  color: var(--band-ink);
  text-decoration: underline;
}

.contact-section a:focus-visible {
  outline-color: var(--band-ink);
}

.contact-section .primary {
  background: var(--contact-button-bg);
  color: var(--contact-button-ink);
}

.contact-section .primary:hover {
  color: var(--contact-button-ink);
}

@media (max-width: 1000px) {
  .revit-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 761px) and (max-width: 950px) {
  .desktop-nav {
    gap: 12px;
    font-size: 11px;
  }

  .header-actions,
  .header-contact {
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .header {
    height: 76px;
    gap: 10px;
  }

  .header-actions {
    margin-left: auto;
    gap: 9px;
  }

  .header-contact {
    gap: 6px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .revit-hero {
    padding-block: 28px;
  }

  .revit-hero .hero-identity h1 {
    font-size: clamp(30px, 8.2vw, 56px);
  }

  .revit-hero .hero-avatar {
    flex-basis: 70px;
    width: 70px;
    height: 90px;
  }

  .facts.facts-metrics {
    padding-block: 22px;
  }
}

@media (max-width: 370px) {
  .project-info {
    flex-wrap: wrap;
  }

  .bim-view-tools {
    padding-inline: 5px;
  }

  .bim-view-tools button {
    font-size: 9px;
    padding-inline: 2px;
    gap: 3px;
  }

  .bim-view-tools svg {
    width: 12px;
    height: 12px;
  }
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  min-height: 42px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.language-toggle .language-current {
  color: var(--ink);
  font-weight: 700;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  background: var(--sage);
}

@media (max-width: 760px) {
  .language-toggle {
    min-height: 38px;
    padding-inline: 7px;
  }

  html[lang="en"] .revit-hero .hero-identity h1 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 400px) {
  .header-actions .header-contact {
    display: none;
  }
}
