:root {
  color-scheme: dark;
  --bg: #080a09;
  --panel: rgba(17, 21, 19, 0.78);
  --panel-strong: rgba(23, 28, 25, 0.92);
  --ink: #eef1ec;
  --soft: #b6bbb5;
  --muted: #7f8781;
  --line: rgba(238, 241, 236, 0.22);
  --line-soft: rgba(238, 241, 236, 0.11);
  --accent: #818984;
  --accent-strong: #e5e8e1;
  --accent-soft: rgba(129, 137, 132, 0.22);
  --material-a: rgba(238, 241, 236, 0.22);
  --material-b: rgba(44, 49, 46, 0.76);
  --glow: rgba(200, 207, 199, 0.14);
  --glass: rgba(18, 22, 20, 0.58);
  --glass-strong: rgba(23, 28, 25, 0.74);
  --shadow-deep: 0 44px 90px rgba(0, 0, 0, 0.52);
  --shadow-panel: 0 22px 54px rgba(0, 0, 0, 0.42);
  --shadow-lift: 0 18px 34px rgba(0, 0, 0, 0.34);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--bg);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 78% 18%, var(--glow), transparent 35rem),
    radial-gradient(ellipse at 24% 78%, rgba(255, 255, 255, 0.055), transparent 28rem),
    linear-gradient(135deg, #070908 0%, #0d1110 48%, #171a16 100%);
  color: var(--ink);
  font-family: var(--font);
}

a,
button {
  font: inherit;
}

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

button {
  color: inherit;
}

.portal-home {
  min-height: 100vh;
}

.entry-stage {
  position: relative;
  min-height: 100vh;
  padding: 34px clamp(20px, 4vw, 56px);
  overflow: hidden;
  isolation: isolate;
  perspective: 1500px;
  transform-style: preserve-3d;
}

.entry-stage::before {
  position: absolute;
  inset: 34px clamp(20px, 4vw, 56px);
  z-index: -4;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 72px) 0, 100% 72px, 100% 100%, 0 100%);
  content: "";
}

.entry-stage::after {
  position: absolute;
  inset: 108px clamp(22px, 5vw, 88px) 32px clamp(22px, 5vw, 88px);
  z-index: -5;
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.08));
  box-shadow:
    0 64px 110px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  content: "";
  opacity: 0.58;
  transform: translateZ(-90px) rotateX(2deg);
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  inset: 34px clamp(20px, 4vw, 56px);
  z-index: -3;
  background:
    linear-gradient(90deg, transparent 0 66%, var(--line-soft) 66% calc(66% + 1px), transparent calc(66% + 1px)),
    linear-gradient(180deg, transparent 0 25%, var(--line-soft) 25% calc(25% + 1px), transparent calc(25% + 1px)),
    linear-gradient(180deg, transparent 0 73%, var(--line-soft) 73% calc(73% + 1px), transparent calc(73% + 1px));
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.24;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 17% 25%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(115deg, transparent 0 6px, rgba(255, 255, 255, 0.03) 6px 7px);
  mix-blend-mode: overlay;
}

.portal-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  transform: none;
}

.brand-mark {
  display: block;
  width: clamp(210px, 19vw, 320px);
  margin-top: clamp(26px, 2.2vw, 40px);
  margin-left: clamp(14px, 1.3vw, 24px);
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.5));
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(238, 241, 236, 0.08);
  border-radius: 8px;
  background: rgba(7, 10, 9, 0.24);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(18px);
}

.top-actions a,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.top-actions a {
  padding: 0 14px;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(300px, 0.68fr) minmax(260px, 0.58fr);
  gap: clamp(22px, 3vw, 44px);
  align-items: center;
  min-height: calc(100vh - 250px);
  padding-top: 30px;
}

.workspace.workspace-clean {
  grid-template-columns: minmax(320px, 0.72fr) minmax(520px, 1.28fr);
  gap: clamp(38px, 5vw, 88px);
  align-items: center;
  min-height: calc(100vh - 150px);
  padding: clamp(16px, 3vh, 38px) clamp(10px, 2vw, 34px) 42px;
}

.hero-copy {
  min-width: 0;
  max-width: 760px;
  transform: translateZ(54px);
}

.eyebrow,
.panel-caption,
.board-head,
.group-title {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 18px 0 28px;
  font-size: clamp(42px, 5.7vw, 86px);
  font-weight: 430;
  line-height: 0.92;
  letter-spacing: 0;
}

.heritage-title {
  display: grid;
  gap: clamp(8px, 1.2vw, 18px);
  max-width: 680px;
  margin: 0 0 clamp(26px, 3vw, 42px);
  line-height: 0.94;
}

.history-age,
.history-subtitle {
  display: block;
}

.history-age {
  color: var(--ink);
  font-size: clamp(58px, 7vw, 112px);
  font-weight: 460;
  letter-spacing: -0.055em;
}

.history-subtitle {
  max-width: 620px;
  color: var(--soft);
  font-size: clamp(30px, 3.35vw, 56px);
  font-weight: 390;
  letter-spacing: -0.035em;
}

.heritage-presence {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 1.4;
}

.heritage-presence strong {
  color: var(--accent-strong);
  font-weight: 520;
}

.selected-lockup {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  width: min(100%, 700px);
  min-height: 98px;
  margin-bottom: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-shadow: 0 22px 36px rgba(0, 0, 0, 0.54);
}

.selected-prefix {
  color: var(--muted);
  font-size: clamp(38px, 4.8vw, 76px);
  line-height: 0.9;
}

.selected-company {
  display: block;
  color: var(--accent-strong);
  font-size: clamp(44px, 5.2vw, 84px);
  font-weight: 480;
  line-height: 0.9;
  transform-origin: left center;
  animation: settle 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.workspace-clean .company-note {
  max-width: 570px;
  min-height: 0;
  margin-bottom: 34px;
  font-size: clamp(15px, 1vw, 18px);
  line-height: 1.58;
}

.workspace-clean .primary-action {
  --accent: #6f767a;
  min-width: 190px;
  border-color: rgba(166, 173, 176, 0.48);
  background:
    linear-gradient(180deg, rgba(151, 158, 162, 0.3), rgba(80, 86, 90, 0.18)),
    rgba(67, 73, 77, 0.72);
  color: #ecefed;
}

.history-emblem {
  width: min(300px, 64%);
  margin-top: clamp(34px, 4vh, 54px);
  opacity: 0.68;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.34));
  transform: translateZ(24px);
}

.history-emblem img {
  display: block;
  width: 100%;
  height: auto;
}

.heritage-photo {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(100%, 1100px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow:
    0 36px 78px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(238, 241, 236, 0.14);
  transform: translateZ(46px);
}

.heritage-photo::after {
  position: absolute;
  inset: 0 0 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.22);
  content: "";
  pointer-events: none;
}

.heritage-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  object-fit: contain;
}

.heritage-caption {
  display: block;
  margin: 11px 2px 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-align: right;
  text-transform: uppercase;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.58);
}

.company-note {
  max-width: 580px;
  min-height: 48px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  padding: 0 20px;
}

.primary-action {
  border-color: color-mix(in srgb, var(--accent) 70%, white 12%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 38%, rgba(255, 255, 255, 0.08)), color-mix(in srgb, var(--accent) 20%, transparent)),
    color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--ink);
}

.primary-action.disabled {
  pointer-events: none;
  color: var(--muted);
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
}

.runtime-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.runtime-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(8, 12, 10, 0.38);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
  font-size: 12px;
  text-transform: uppercase;
}

.company-selector,
.operations-board {
  min-width: 0;
  border: 1px solid rgba(238, 241, 236, 0.14);
  border-top-color: rgba(238, 241, 236, 0.28);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), transparent 45%),
    linear-gradient(180deg, var(--glass-strong), rgba(11, 15, 13, 0.5));
  box-shadow:
    var(--shadow-panel),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(1.12);
  transform-style: preserve-3d;
}

.company-selector {
  transform: translateZ(72px) rotateY(-2.2deg);
}

.operations-board {
  transform: translateZ(110px) rotateY(-3.5deg) translateY(12px);
}

.panel-caption,
.board-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.company-groups {
  display: grid;
  gap: 18px;
}

.company-group {
  display: grid;
  gap: 8px;
}

.group-title {
  padding-left: 2px;
}

.company-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: center;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(9, 13, 11, 0.46);
  box-shadow:
    0 13px 26px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.company-card span {
  min-width: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.company-card em {
  grid-row: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.company-card b {
  justify-self: end;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.company-card.active {
  border-color: color-mix(in srgb, var(--accent) 72%, white 10%);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 28%, transparent), transparent),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.company-card:not(.planned) b {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 54%, white 12%);
}

.planned {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014)),
    rgba(255, 255, 255, 0.018);
}

.planned b {
  color: #9a8d76;
}

.planned.active {
  color: var(--ink);
}

.operations-board {
  align-self: end;
  margin-bottom: 78px;
  padding-bottom: 18px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  min-height: 56px;
  border-bottom: 1px solid var(--line-soft);
}

.metric-row span {
  color: var(--muted);
  font-size: 14px;
}

.metric-row strong {
  color: var(--accent-strong);
  font-size: clamp(25px, 2.9vw, 40px);
  font-weight: 450;
  line-height: 1;
}

.module-dock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 18px;
}

.module-dock a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.025);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
  font-size: 14px;
}

.material-scene {
  position: absolute;
  right: -16vw;
  bottom: -18vh;
  z-index: -1;
  width: min(58vw, 780px);
  height: min(45vw, 600px);
  opacity: 0.76;
  transform: translateZ(-20px) rotateX(8deg) rotateY(-17deg) rotateZ(-12deg);
  transform-style: preserve-3d;
  pointer-events: none;
}

.material-plane {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--accent) 56%, white 14%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 32%),
    linear-gradient(120deg, var(--material-a), var(--material-b));
  box-shadow:
    0 44px 95px rgba(0, 0, 0, 0.52),
    inset 0 0 34px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
}

.plane-a {
  inset: 18% 0 22% 8%;
}

.plane-b {
  inset: 34% 18% 5% 0;
  opacity: 0.5;
  transform: translateX(-8%) translateZ(44px) rotate(8deg);
}

.plane-c {
  inset: 6% 52% 52% 0;
  opacity: 0.28;
  transform: translateZ(84px) rotate(-7deg);
}

.ghost-word {
  position: absolute;
  right: 12%;
  bottom: 16%;
  color: rgba(255, 255, 255, 0.18);
  font-size: min(12vw, 160px);
  font-weight: 520;
  line-height: 1;
  text-shadow: 0 22px 46px rgba(0, 0, 0, 0.52);
}

body[data-company="interior"] {
  --accent: #a88a5a;
  --accent-strong: #d8c28f;
  --accent-soft: rgba(168, 138, 90, 0.2);
  --material-a: rgba(212, 194, 154, 0.38);
  --material-b: rgba(94, 72, 48, 0.52);
  --glow: rgba(212, 194, 154, 0.18);
}

body[data-company="gaProject"] {
  --accent: #4d8fa8;
  --accent-strong: #9fd0df;
  --accent-soft: rgba(77, 143, 168, 0.2);
  --material-a: rgba(77, 143, 168, 0.36);
  --material-b: rgba(25, 45, 54, 0.7);
  --glow: rgba(77, 143, 168, 0.2);
}

body[data-company="metal"] {
  --accent: #b56a3c;
  --accent-strong: #d8b16a;
  --accent-soft: rgba(181, 106, 60, 0.2);
  --material-a: rgba(192, 160, 96, 0.42);
  --material-b: rgba(84, 43, 27, 0.7);
  --glow: rgba(181, 106, 60, 0.18);
}

body[data-company="leather"] {
  --accent: #b47a4d;
  --accent-strong: #d8a66d;
  --accent-soft: rgba(180, 122, 77, 0.18);
  --material-a: rgba(180, 122, 77, 0.4);
  --material-b: rgba(68, 39, 28, 0.76);
  --glow: rgba(180, 122, 77, 0.17);
}

body[data-company="kino"] {
  --accent: #8e1e1b;
  --accent-strong: #c08a42;
  --accent-soft: rgba(142, 30, 27, 0.2);
  --material-a: rgba(142, 30, 27, 0.36);
  --material-b: rgba(4, 4, 4, 0.88);
  --glow: rgba(142, 30, 27, 0.22);
}

body[data-company="building"] {
  --accent: #e3342b;
  --accent-strong: #f15a4e;
  --accent-soft: rgba(227, 52, 43, 0.2);
  --material-a: rgba(227, 52, 43, 0.5);
  --material-b: rgba(185, 186, 179, 0.24);
  --glow: rgba(227, 52, 43, 0.18);
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) {
  .top-actions a:hover,
  .primary-action:hover,
  .secondary-action:hover,
  .company-card:hover,
  .module-dock a:hover {
    border-color: color-mix(in srgb, var(--accent) 75%, white 10%);
    background: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, 0.03));
    box-shadow:
      0 22px 42px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .primary-action:hover,
  .secondary-action:hover,
  .company-card:hover,
  .module-dock a:hover {
    transform: translateY(-2px);
  }
}

.top-actions a:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.company-card:focus-visible,
.module-dock a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 76%, white 14%);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 0.86fr);
  }

  .workspace.workspace-clean {
    grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.18fr);
    gap: clamp(28px, 4vw, 52px);
  }

  .operations-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    grid-column: 1 / -1;
    margin-bottom: 0;
    padding-bottom: 16px;
    transform: translateZ(62px);
  }

  .board-head,
  .module-dock {
    grid-column: 1 / -1;
  }

  .metric-row {
    min-height: 52px;
  }

  .module-dock {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .material-scene {
    width: 70vw;
    opacity: 0.52;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .entry-stage {
    padding: 22px 16px;
  }

  .entry-stage::before,
  .grid-lines {
    inset: 22px 16px;
  }

  .portal-topbar {
    align-items: flex-start;
    transform: none;
  }

  .top-actions {
    display: none;
  }

  .brand-mark {
    width: 215px;
    margin-top: 22px;
    margin-left: 10px;
  }

  .workspace {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
    padding-top: 48px;
  }

  .workspace.workspace-clean {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 48px 0 54px;
  }

  .heritage-photo {
    justify-self: stretch;
    width: 100%;
    margin-top: 18px;
    transform: none;
  }

  .hero-copy,
  .company-selector,
  .operations-board {
    transform: none;
  }

  h1 {
    margin-bottom: 26px;
    font-size: 38px;
    line-height: 1;
  }

  .heritage-title {
    margin-bottom: 24px;
  }

  .history-age {
    font-size: clamp(54px, 18vw, 78px);
  }

  .history-subtitle {
    font-size: clamp(30px, 10vw, 44px);
  }

  .heritage-caption {
    font-size: 10px;
    text-align: left;
  }

  .history-emblem {
    width: min(230px, 66vw);
    margin-top: 34px;
    transform: none;
  }

  .selected-lockup {
    gap: 10px;
    min-height: 92px;
  }

  .selected-prefix,
  .selected-company {
    font-size: 40px;
  }

  .company-note {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .hero-actions,
  .runtime-strip,
  .module-dock {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action {
    min-width: 0;
    padding: 0 10px;
  }

  .panel-caption {
    display: grid;
    gap: 6px;
  }

  .company-card {
    grid-template-columns: 1fr auto;
    min-height: 62px;
  }

  .company-card em {
    grid-column: 1 / -1;
  }

  .operations-board {
    display: block;
    margin-bottom: 0;
  }

  .material-scene {
    right: -28vw;
    bottom: -5vh;
    width: 96vw;
    opacity: 0.34;
  }
}
