:root {
  color-scheme: dark;
  --bg: #050608;
  --ink: #f4f1e9;
  --muted: #a8abb2;
  --soft: #d7d0bf;
  --panel: rgba(13, 15, 18, 0.78);
  --panel-solid: #0d0f12;
  --line: rgba(244, 241, 233, 0.12);
  --gold: #c8a96a;
  --gold-2: #f2d58a;
  --mint: #22e6b2;
  --blue: #7bb7ff;
  --rose: #ff6f91;
  --paper: #f6edd8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(200, 169, 106, 0.08), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(34, 230, 178, 0.1), transparent 28rem),
    linear-gradient(180deg, #050608 0%, #08090b 42%, #060708 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.vc-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 8, 0.82);
  backdrop-filter: blur(20px);
}

.vc-brand,
.vc-header nav,
.hero-actions,
.terminal-top,
.terminal-note,
.portfolio-head,
.filter-group,
.view-switch,
.project-links,
.flag-row,
.compliance-strip {
  display: flex;
  align-items: center;
}

.vc-brand {
  gap: 12px;
  color: var(--paper);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(200, 169, 106, 0.72);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, rgba(242, 213, 138, 0.24), rgba(255, 255, 255, 0.02));
  color: var(--gold-2);
  font-size: 0.72rem;
}

.vc-header nav {
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.language-toggle {
  display: inline-flex;
  min-width: 72px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}

.cz-flag {
  display: grid;
  position: relative;
  width: 25px;
  height: 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff 0 50%, #d7141a 50% 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.cz-flag i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 48%;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: #11457e;
}

.header-cta,
.primary-action,
.secondary-action,
.filter,
.view-btn,
.language-toggle,
.terminal-note button,
.project-card button,
.project-link,
.dialog-close,
.stage-pill {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 850;
  letter-spacing: 0;
}

.header-cta,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-color: rgba(242, 213, 138, 0.74);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #11100d;
}

.secondary-action,
.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.vc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(28px, 5vw, 82px);
  min-height: calc(100svh - 72px);
  align-items: center;
  padding: clamp(58px, 8vw, 108px) clamp(18px, 5vw, 76px);
}

.hero-copy {
  max-width: 1080px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--gold-2);
  font-size: 0.76rem;
  font-weight: 920;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1020px;
  margin-bottom: 22px;
  color: var(--paper);
  font-size: clamp(3.35rem, 8.7vw, 8.9rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 16px;
  color: var(--paper);
  font-size: clamp(2rem, 4.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 10px;
  color: var(--paper);
  font-size: 1.28rem;
  line-height: 1.1;
}

.hero-lead,
.model-copy p,
.mandate-grid p,
.project-card p,
.compliance-strip p,
.legal,
.detail-body p,
.meta-list dd,
.stage-pill span {
  color: var(--muted);
  line-height: 1.62;
}

.hero-lead {
  max-width: 760px;
  color: var(--soft);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.deal-terminal {
  overflow: hidden;
  border: 1px solid rgba(242, 213, 138, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), transparent),
    rgba(9, 10, 12, 0.82);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.terminal-top,
.terminal-note {
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 880;
  text-transform: uppercase;
}

.terminal-top span:first-child {
  color: var(--gold-2);
}

.terminal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}

.terminal-grid article {
  min-height: 150px;
  padding: 22px;
  background: rgba(10, 12, 15, 0.96);
}

.terminal-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--paper);
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 1;
}

.terminal-grid span {
  color: var(--muted);
  font-weight: 760;
}

.terminal-note {
  border-bottom: 0;
}

.terminal-note button {
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}

.featured-section,
.model,
.portfolio {
  padding: clamp(58px, 8vw, 110px) clamp(18px, 5vw, 76px);
}

.section-label {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(260px, 0.42fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 26px;
}

.featured-rail {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(230px, 0.72fr));
  gap: 14px;
}

.featured-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b0d10;
  isolation: isolate;
}

.featured-card:first-child {
  grid-row: span 2;
  min-height: 560px;
}

.featured-card img,
.project-visual img,
.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  filter: saturate(1.02) contrast(1.05);
}

.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.86)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), transparent);
}

.featured-card-content {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
}

.featured-card .status {
  margin-bottom: 14px;
}

.model {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 76px);
  border-block: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(200, 169, 106, 0.08), rgba(34, 230, 178, 0.04)),
    rgba(255, 255, 255, 0.025);
}

.model-copy {
  max-width: 760px;
}

.mandate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}

.mandate-grid article {
  min-height: 210px;
  padding: 24px;
  background: var(--panel-solid);
}

.mandate-grid span {
  display: block;
  margin-bottom: 28px;
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 940;
}

.portfolio-head {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.portfolio-head h2 {
  max-width: 1080px;
}

.view-switch {
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.view-btn,
.filter,
.stage-pill {
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
}

.view-btn.active,
.filter.active,
.stage-pill.active {
  border-color: rgba(34, 230, 178, 0.44);
  background: rgba(34, 230, 178, 0.12);
  color: var(--mint);
}

.stage-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.stage-pill {
  display: grid;
  min-height: 96px;
  align-content: center;
  justify-items: start;
  gap: 4px;
  text-align: left;
}

.stage-pill strong {
  color: var(--paper);
  font-size: 1.4rem;
}

.portfolio-tools {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) 1fr;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.portfolio-tools label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-tools input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--ink);
  padding: 0 14px;
}

.filter-group {
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.portfolio-grid.compact {
  grid-template-columns: 1fr;
}

.project-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 14, 17, 0.76);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 213, 138, 0.42);
  background: rgba(15, 18, 22, 0.92);
}

.portfolio-grid.compact .project-card {
  grid-template-columns: 300px 1fr;
  min-height: 250px;
}

.project-visual {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  background:
    linear-gradient(135deg, rgba(200, 169, 106, 0.16), rgba(123, 183, 255, 0.08)),
    #0c1014;
}

.portfolio-grid.compact .project-visual {
  min-height: 100%;
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.36));
}

.trade-overlay {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  gap: 3px;
  max-width: min(78%, 270px);
  padding: 11px 13px;
  border: 1px solid rgba(242, 213, 138, 0.52);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(34, 230, 178, 0.12), rgba(242, 213, 138, 0.1)),
    rgba(5, 6, 8, 0.82);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.trade-overlay::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -24px;
  width: 38px;
  height: 2px;
  background: var(--mint);
  box-shadow:
    32px -10px 0 rgba(242, 213, 138, 0.82),
    18px 12px 0 rgba(123, 183, 255, 0.76);
}

.trade-overlay strong {
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 940;
  text-transform: uppercase;
}

.trade-overlay em {
  color: var(--mint);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 820;
}

.project-initial,
.detail-initial {
  display: grid;
  height: 100%;
  min-height: 210px;
  place-items: center;
  color: var(--gold-2);
  font-size: 3.6rem;
  font-weight: 950;
}

.project-content {
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: 22px;
}

.project-actions {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.status-row,
.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status,
.flag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 850;
}

.status {
  border-color: rgba(242, 213, 138, 0.45);
  color: var(--gold-2);
}

.flag {
  color: var(--muted);
}

.flag.capital {
  border-color: rgba(34, 230, 178, 0.42);
  color: var(--mint);
}

.flag.archived {
  border-color: rgba(255, 111, 145, 0.42);
  color: #ff9eb4;
}

.project-card h3 {
  margin-top: 14px;
}

.project-card p {
  margin-bottom: 0;
}

.project-card button {
  width: 100%;
  margin-top: 2px;
  background: rgba(242, 213, 138, 0.1);
  color: var(--gold-2);
}

.empty-results {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.compliance-strip {
  justify-content: space-between;
  gap: 24px;
  margin: clamp(28px, 5vw, 64px) clamp(18px, 5vw, 76px) clamp(62px, 8vw, 110px);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(242, 213, 138, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(242, 213, 138, 0.1), rgba(34, 230, 178, 0.055)),
    rgba(255, 255, 255, 0.035);
}

.compliance-strip p {
  max-width: 920px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 1.08rem;
}

.project-dialog {
  width: min(1080px, calc(100% - 28px));
  max-height: min(880px, calc(100% - 28px));
  overflow: auto;
  border: 1px solid rgba(242, 213, 138, 0.34);
  border-radius: 12px;
  background: #08090b;
  color: var(--ink);
  padding: 0;
}

.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(12px);
}

.dialog-close {
  position: sticky;
  top: 14px;
  left: calc(100% - 62px);
  z-index: 2;
  width: 44px;
  margin: 14px 14px 0 0;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.6rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 28px;
  padding: 12px clamp(20px, 4vw, 42px) 36px;
}

.detail-image {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(200, 169, 106, 0.16), rgba(123, 183, 255, 0.08));
}

.detail-body h2 {
  font-size: clamp(2.1rem, 5vw, 4.8rem);
}

.project-links {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0 clamp(20px, 4vw, 42px) 42px;
  background: var(--line);
}

.meta-list div {
  padding: 18px;
  background: #0d0f12;
}

.meta-list dt {
  margin-bottom: 8px;
  color: var(--gold-2);
  font-size: 0.74rem;
  font-weight: 920;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-list dd {
  margin: 0;
}

.vc-footer {
  padding: 32px clamp(18px, 5vw, 76px) 48px;
  border-top: 1px solid var(--line);
  background: #030405;
  color: var(--muted);
}

.vc-footer a {
  color: var(--gold-2);
  font-weight: 900;
}

.legal {
  max-width: 1060px;
  margin: 18px 0 0;
  font-size: 0.9rem;
}

.project-brief-page .vc-header {
  position: relative;
}

.brief-shell {
  padding: clamp(46px, 7vw, 92px) clamp(18px, 5vw, 76px) clamp(70px, 9vw, 120px);
}

.brief-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 500px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 620px;
}

.brief-hero h1 {
  max-width: 920px;
}

.starosta-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  align-content: end;
  gap: 10px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgba(242, 213, 138, 0.3);
  border-radius: 10px;
  background:
    linear-gradient(135deg, #fff 0 14%, #d7141a 14% 28%, #11457e 28% 42%, transparent 42%),
    radial-gradient(circle at 72% 24%, rgba(34, 230, 178, 0.34), transparent 18rem),
    linear-gradient(145deg, rgba(242, 213, 138, 0.15), rgba(123, 183, 255, 0.08)),
    #0b0f12;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.starosta-visual::before {
  content: "";
  position: absolute;
  inset: 78px 50px 148px;
  border: 2px solid rgba(242, 213, 138, 0.42);
  clip-path: polygon(50% 0, 100% 28%, 100% 100%, 0 100%, 0 28%);
}

.starosta-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

.starosta-visual span,
.starosta-visual strong,
.starosta-visual i {
  position: relative;
  z-index: 1;
}

.starosta-visual span {
  color: var(--gold-2);
  font-size: clamp(5rem, 11vw, 9rem);
  font-weight: 950;
  line-height: 0.82;
}

.starosta-visual strong {
  color: var(--paper);
  font-size: 1.3rem;
}

.starosta-visual i {
  color: var(--mint);
  font-style: normal;
  font-weight: 850;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 22px;
  background: var(--line);
}

.brief-grid article {
  min-height: 280px;
  padding: 24px;
  background: var(--panel-solid);
}

.brief-grid span {
  display: block;
  margin-bottom: 30px;
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 940;
}

.brief-grid h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.brief-grid p {
  color: var(--muted);
  line-height: 1.62;
}

@media (hover: hover) {
  a:hover,
  button:hover {
    opacity: 0.86;
  }
}

@media (max-width: 1120px) {
  .vc-hero,
  .brief-hero,
  .model,
  .portfolio-tools,
  .detail-hero,
  .section-label {
    grid-template-columns: 1fr;
  }

  .featured-rail,
  .brief-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-card:first-child {
    grid-row: auto;
  }

  .stage-map {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-head,
  .compliance-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .vc-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .vc-header nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .language-toggle {
    flex: 0 0 auto;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 5rem);
  }

  .terminal-grid,
  .featured-rail,
  .brief-grid,
  .mandate-grid,
  .portfolio-grid,
  .portfolio-grid.compact,
  .portfolio-grid.compact .project-card,
  .stage-map,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .project-card,
  .portfolio-grid.compact .project-card {
    min-height: 390px;
  }

  .brief-hero {
    min-height: auto;
  }

  .starosta-visual {
    min-height: 360px;
  }
}
