@font-face {
  font-family: 'EurostileBoldExt';
  src: url('fonts/d_eurostileboldextended_2_bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'MicrogrammaNormal';
  src: url('fonts/microgrammanormal.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --bg-black: #000000;
  --gold: #d2ab14;
  --gold-bright: #e2c852;
  --gold-dim: #886808;
  --silver: #d6dadf;
  --silver-bright: #ffffff;
  --gunmetal: #52575e;
  --gunmetal-dark: #25282c;
  --border-steel: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(210, 171, 20, 0.5);
  --text-muted: #7a8088;
  --text-body: #b8bec6;

  /* Procedural metallic textures injected by metal3d.js */
  --tex-silver: linear-gradient(180deg, #f4f6f8 0%, #c6cbd2 35%, #8a9098 55%, #d6dbe0 76%, #6e737a 100%);
  --tex-gold: linear-gradient(180deg, #fff199 0%, #f0c922 30%, #bd8d0b 58%, #e8bc19 80%, #7d5a06 100%);
  --tex-dark: linear-gradient(180deg, #747a82 0%, #4b5057 32%, #2a2d32 58%, #474c52 82%, #1d2024 100%);
  --tex-side-silver: linear-gradient(180deg, #52575e 0%, #2b2f35 55%, #16181c 100%);
  --tex-side-gold: linear-gradient(180deg, #6e540c 0%, #3d2d06 55%, #1c1503 100%);
  --tex-side-dark: linear-gradient(180deg, #2d3036 0%, #191b1f 55%, #0d0e11 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: #000000;
  color: var(--silver);
  font-family: 'MicrogrammaNormal', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: #000000;
}

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

/* =========================================================
   HOME PAGE — FULLSCREEN 3D FLOATING GARAGE MENU
   ========================================================= */

body.page-home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000000;
  position: relative;
}

.home-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1180px;
  perspective-origin: 26% 46%;
  padding: 2rem clamp(1.5rem, 6vw, 6rem);
}

.menu-3d-rig {
  position: relative;
  /* Gentler ~35-40deg perspective angle + unified observer camera sway */
  transform:
    translate3d(calc(var(--shift-x, 5.5vw) + var(--obs-x, 0px)), calc(var(--shift-y, 0px) + var(--obs-y, 0px)), 0px)
    rotateY(calc(17deg + var(--obs-ry, 0deg)))
    rotateX(calc(1.5deg + var(--obs-rx, 0deg)))
    rotateZ(calc(0.8deg + var(--obs-rz, 0deg)));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  user-select: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* =========================================================
   3D EXTRUDED WEATHERED METALLIC TEXT COMPONENT (RETINA CANVAS)
   Zero preserve-3d, zero background-clip: text -> 0% Chrome flicker!
   ========================================================= */

.m3d-row {
  position: relative;
  display: inline-block;
  font-family: 'EurostileBoldExt', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: -0.025em;
  line-height: 0.92;
  cursor: default;
}

/* Stationary outer hit-target; inner .m3d-body holds pre-baked Retina canvas */
.m3d-body {
  position: relative;
  display: inline-block;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.m3d-canvas {
  display: block;
  pointer-events: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.m3d-canvas-dark {
  position: relative;
  opacity: 1;
  transition: opacity 0.16s ease;
}

.m3d-canvas-gold {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.16s ease;
}

/* Tight monolithic vertical stack just like reference screenshot */
.m3d-title {
  font-size: clamp(2.3rem, 7vw, 6.8rem);
  margin-bottom: 0.08em;
  z-index: 3;
}

.m3d-nav-item {
  font-size: clamp(2.05rem, 6.1vw, 5.9rem);
  margin-top: 0.06em;
  cursor: pointer;
  outline: none;
  display: inline-block;
  position: relative;
}

.m3d-nav-item:focus-visible {
  outline: none;
}

/* Active item switches to pre-baked gold canvas & slides slightly forward without shifting hit box */
.m3d-nav-item.is-active {
  z-index: 10;
}

.m3d-nav-item.is-active .m3d-body {
  transform: translate3d(0.08em, -0.02em, 0) scale(1.022);
}

.m3d-nav-item.is-active .m3d-canvas-dark {
  opacity: 0;
}

.m3d-nav-item.is-active .m3d-canvas-gold {
  opacity: 1;
}

/* Smaller 3D headings for inner pages */
.m3d-page-heading {
  font-size: clamp(2rem, 5.2vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

/* =========================================================
   UNIFIED BOTTOM HUD BAR (GRID-STYLE 3D KEYCAPS + BOLD GREY)
   ========================================================= */

.hud-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.85rem clamp(1.25rem, 3.5vw, 2.8rem) 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.88) 55%, #000000 100%);
  pointer-events: none;
  z-index: 40;
}

.hud-prompts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.85rem, 1.8vw, 1.45rem);
}

.hud-item {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.hud-action {
  pointer-events: auto;
  cursor: pointer;
}

.hud-action:hover .hud-label {
  color: #cfd5de;
}

.hud-icon {
  display: inline-block;
  height: 1.24rem;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
}

.hud-icon-enter {
  height: 1.4rem;
}

.hud-label,
.hud-brand {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.62rem, 0.82vw, 0.76rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #848991;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.95);
  line-height: 1;
}

.hud-brand {
  letter-spacing: 0.06em;
  white-space: nowrap;
}

body.cam-exit-forward .hud-bar,
body.cam-exit-back .hud-bar,
body.cam-exit-forward .lang-switch,
body.cam-exit-back .lang-switch {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* =========================================================
   LANGUAGE SWITCHER (HOME PAGE — MATTE GRID PLATES)
   ========================================================= */

.lang-switch {
  position: fixed;
  top: clamp(1rem, 2.6vh, 1.65rem);
  right: clamp(1.25rem, 3.5vw, 2.8rem);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.lang-btn {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.64rem, 0.9vw, 0.78rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.44rem 0.82rem;
  border-radius: 5px;
  cursor: pointer;
  color: #aeb4bc;
  background-color: #212324;
  background-image: var(--plate-dark);
  background-size: 100% 100%;
  border: 1.5px solid #393c3e;
  border-top-color: #5a5e61;
  border-bottom-color: #0e1011;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 3px rgba(0, 0, 0, 0.7),
    0 3px 0 #090a0b,
    0 8px 16px rgba(0, 0, 0, 0.8);
  transition: transform 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.lang-btn:hover {
  color: #eef1f5;
  border-color: #6b7075;
  transform: translateY(-1px);
}

.lang-btn.is-active {
  color: #141004;
  background-color: #c8a00e;
  background-image: var(--plate-gold);
  border-color: #dcc054;
  border-bottom-color: #7c5c03;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 178, 0.36),
    inset 0 -3px 4px rgba(96, 68, 0, 0.55),
    0 3px 0 #4d3501,
    0 8px 18px rgba(0, 0, 0, 0.85);
}

/* =========================================================
   INNER PAGES — SHARED NAVIGATION & LAYOUT (BLACK BG)
   ========================================================= */

body.page-inner {
  background: #000000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-nav-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 1.15rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dfe4ec;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.75);
  transition: color 0.2s ease;
}

.brand-link:hover {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  list-style: none;
}

.nav-links a {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.74rem, 1.1vw, 0.88rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b717a;
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold), var(--gold-dim));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.page-shell {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) 5rem;
  flex: 1;
}

/* Inner Page 3D Hero Header */
.page-hero {
  margin-bottom: clamp(2.2rem, 5vh, 3.6rem);
  padding-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.page-hero-3d-wrap {
  perspective: 900px;
  perspective-origin: 18% 50%;
  padding: 1.5rem 0 0.9rem;
}

.page-hero-3d-rig {
  display: inline-block;
  transform: rotateY(18deg) rotateX(3.5deg) rotateZ(-0.6deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-subtitle {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.65;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
  padding: 0.6rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(58, 62, 68, 0.35), rgba(18, 20, 23, 0.8));
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.back-home-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateX(-3px);
}

/* Modal for Project Detail */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  width: 100%;
  max-width: 640px;
  background: linear-gradient(160deg, #17191d 0%, #090a0c 100%);
  border: 1px solid rgba(235, 195, 30, 0.45);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 36px;
  height: 36px;
  background: #0d0e11;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--silver);
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.modal-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
}

.modal-title {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1rem;
}

.modal-desc {
  font-family: 'MicrogrammaNormal', sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: #b4bac2;
  margin-bottom: 1.5rem;
}

.modal-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.6rem;
}

.modal-spec-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.modal-spec-val {
  font-size: 0.82rem;
  line-height: 1.55;
  letter-spacing: 0.06em;
  color: var(--silver-bright);
}

/* =========================================================
   CONTACTS PAGE — CHANNELS + METALLIC FORM
   ========================================================= */

.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.8rem, 4vw, 3.2rem);
  align-items: start;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(155deg, rgba(42, 46, 52, 0.35) 0%, rgba(12, 13, 16, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #484d55;
  transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.contact-plate:hover {
  border-color: rgba(235, 195, 30, 0.45);
  border-left-color: var(--gold);
  transform: translateX(4px);
}

.contact-plate-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.32rem;
}

.contact-plate-value {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.76rem, 1.1vw, 0.94rem);
  letter-spacing: 0.02em;
  color: var(--silver-bright);
  overflow-wrap: break-word;
}

.contact-plate:hover .contact-plate-value {
  color: var(--gold);
}

.copy-btn {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  background: #0a0b0d;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--silver);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.copy-btn:hover,
.copy-btn.is-copied {
  border-color: var(--gold);
  color: var(--gold);
}

.contact-form-panel {
  background: linear-gradient(160deg, rgba(34, 37, 42, 0.42) 0%, rgba(10, 11, 13, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  padding: clamp(1.5rem, 3.5vw, 2.2rem);
}

.panel-heading {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-bright);
  margin-bottom: 1.4rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-field {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-input,
.form-textarea {
  width: 100%;
  background: #060708;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.92rem;
  padding: 0.82rem 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea {
  min-height: 125px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(235, 195, 30, 0.22);
}

.metal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #080808;
  background: linear-gradient(180deg, #fae05e 0%, #e6ba18 48%, #ba8b08 100%);
  border: 1px solid #ffe97d;
  padding: 0.95rem 1.5rem;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.metal-btn:hover {
  filter: brightness(1.07);
  box-shadow: 0 0 26px rgba(235, 195, 30, 0.28);
  transform: translateY(-1px);
}

.metal-btn:active {
  transform: translateY(1px);
}

.form-status {
  margin-top: 1rem;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  min-height: 1.2em;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.4rem clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555b63;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 860px) {
  .contacts-layout {
    grid-template-columns: 1fr;
  }

  .menu-3d-rig {
    transform:
      translate3d(var(--obs-x, 0px), var(--obs-y, 0px), 0px)
      rotateY(calc(16deg + var(--obs-ry, 0deg)))
      rotateX(calc(3deg + var(--obs-rx, 0deg)))
      rotateZ(calc(-0.6deg + var(--obs-rz, 0deg)));
  }
}

@media (max-width: 560px) {
  .top-nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .hud-bar {
    justify-content: center;
  }

  .hud-brand {
    display: none;
  }
}

/* =========================================================
   LOADING SCREEN — "ЗАГРУЗКА, ПОДОЖДИТЕ" + SPINNING WHEEL
   ========================================================= */

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000000;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 clamp(1.5rem, 5vw, 4.5rem) clamp(1.8rem, 7vh, 4.5rem);
  opacity: 1;
  transition: opacity 0.55s ease;
}

body.is-ready .loader {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: loaderAppear 0.35s ease 0.3s forwards;
}

body.page-home .loader-inner {
  animation-delay: 0s;
}

.loader-text {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.82rem, 1.35vw, 1.12rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #a3a3a3;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.8);
}

.loader-wheel {
  width: clamp(1.15rem, 1.75vw, 1.48rem);
  height: clamp(1.15rem, 1.75vw, 1.48rem);
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(150, 150, 150, 0) 0 16%, #6f6f6f 22%, #a9a9a9 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 43%, #000 45%);
  mask: radial-gradient(circle, transparent 0 43%, #000 45%);
  animation: loaderSpin 0.85s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes loaderAppear {
  to { opacity: 1; }
}

/* =========================================================
   CAMERA FLY TRANSITIONS (PAGE-TO-PAGE)
   ========================================================= */

.cam-fade {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #000000;
  opacity: 0;
  pointer-events: none;
}

body[class*='cam-exit-'] .cam-fade {
  opacity: 1;
  transition: opacity 0.42s ease 0.55s;
}

body[class*='cam-exit-'] {
  pointer-events: none;
}

/* ---- Home rig ---- */
body.cam-anim .menu-3d-rig {
  transition: transform 1.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease !important;
}

body.cam-enter-intro .menu-3d-rig {
  transform: translate3d(12vw, 2vh, -900px) rotateY(48deg) rotateX(4deg) !important;
  opacity: 0;
}

body.cam-enter-back .menu-3d-rig {
  transform: translate3d(-60vw, 4vh, 650px) rotateY(78deg) !important;
  opacity: 0;
}

body.cam-exit-forward .menu-3d-rig {
  transform: translate3d(-60vw, 4vh, 650px) rotateY(78deg) !important;
  opacity: 0;
  transition: transform 1s cubic-bezier(0.55, 0, 0.35, 1), opacity 0.45s ease 0.55s !important;
}

body.cam-exit-forward .home-footer-hint {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ---- Inner page scene ---- */
.page-shell {
  perspective: 1600px;
  perspective-origin: 50% 24%;
}

[data-cam-scene] {
  transform-origin: 50% 260px;
  transform:
    translate3d(var(--obs-x, 0px), var(--obs-y, 0px), 0px)
    rotateY(var(--obs-ry, 0deg))
    rotateX(var(--obs-rx, 0deg))
    rotateZ(var(--obs-rz, 0deg));
  will-change: transform, opacity;
}

body.cam-anim [data-cam-scene] {
  transition: transform 1.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease;
}

body.cam-enter-forward [data-cam-scene] {
  transform: translate3d(42vw, 10vh, -1300px) rotateY(-40deg) rotateX(6deg);
  opacity: 0;
}

body.cam-enter-back [data-cam-scene] {
  transform: translate3d(-42vw, 0, 500px) rotateY(35deg);
  opacity: 0;
}

body.cam-exit-forward [data-cam-scene] {
  transform: translate3d(-42vw, 0, 500px) rotateY(35deg);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.55, 0, 0.35, 1), opacity 0.45s ease 0.5s;
}

body.cam-exit-back [data-cam-scene] {
  transform: translate3d(34vw, 6vh, -1300px) rotateY(-36deg);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.55, 0, 0.35, 1), opacity 0.45s ease 0.5s;
}

/* =========================================================
   BACK BUTTON (PORTFOLIO)
   ========================================================= */

.back-key {
  position: fixed;
  top: clamp(0.85rem, 2vh, 1.25rem);
  left: clamp(0.9rem, 2.4vw, 1.8rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.72rem 0.34rem 0.38rem;
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  color: #cfd4dc;
  background-color: #242625;
  background-image: var(--plate-dark);
  background-size: 100% 100%;
  border: 1.5px solid #3c3f3e;
  border-top-color: #666a69;
  border-bottom-color: #111212;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -3px 4px rgba(0, 0, 0, 0.65),
    0 3px 0 #090a0b,
    0 8px 16px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.back-key-cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.24rem;
  padding: 0 0.28rem;
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.52rem;
  color: #161616;
  background: linear-gradient(180deg, #e6e8ea 0%, #aeb3b8 65%, #7e8388 100%);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.back-key:hover,
.back-key:focus-visible {
  color: #141414;
  background-color: #d9ad0e;
  background-image: var(--plate-gold);
  border-color: #f7e068;
  border-bottom-color: #7d5c03;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 200, 0.75),
    inset 0 -3px 4px rgba(105, 72, 0, 0.55),
    0 3px 0 #593e01,
    0 10px 20px rgba(0, 0, 0, 0.85);
  outline: none;
  transform: translateY(-1px);
}

.back-key:hover .back-key-cap,
.back-key:focus-visible .back-key-cap {
  color: #f6cf14;
  background: #141414;
  box-shadow: none;
}

/* =========================================================
   PORTFOLIO — TWO-STAGE 3D CAMERA STAGE
   VIEW 1: SECTION SHOWCASE BOX (PHOTO 1)
   VIEW 2: SECTION CASES LIST (PHOTO 2)
   ========================================================= */

html.stage-showcase,
body.stage-showcase {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.page-portfolio .page-shell {
  max-width: 1120px;
  padding-top: clamp(2.4rem, 5.5vh, 4.2rem);
  padding-bottom: 6.5rem;
}

.page-portfolio.stage-showcase .page-shell {
  padding-top: 0;
  padding-bottom: 3.2rem;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portfolio-camera-stage {
  position: relative;
  width: 100%;
  min-height: 72vh;
  perspective: 1150px;
  perspective-origin: 50% 42%;
}

.portfolio-view {
  width: 100%;
  transition:
    transform 0.86s cubic-bezier(0.32, 0.04, 0.18, 1),
    opacity 0.52s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

.portfolio-view:not(.is-current) {
  max-height: 82vh;
  overflow: hidden;
}

/* Active view directly in front of the observer camera */
.portfolio-view.is-current {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) rotateY(0deg);
  pointer-events: auto;
  z-index: 5;
}

/* Wall pivoted smoothly off past the left edge when camera turns RIGHT */
.portfolio-view.is-left {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform-origin: 100% 50%;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(-82vw, 0, 140px) rotateY(-62deg);
  pointer-events: none;
  z-index: 1;
  transition:
    transform 0.86s cubic-bezier(0.32, 0.04, 0.18, 1),
    opacity 0.52s ease 0.18s,
    visibility 0s linear 0.86s;
}

/* Wall waiting on the right side of the room before camera turns RIGHT to face it */
.portfolio-view.is-right {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform-origin: 0% 50%;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(82vw, 0, 140px) rotateY(62deg);
  pointer-events: none;
  z-index: 1;
  transition:
    transform 0.86s cubic-bezier(0.32, 0.04, 0.18, 1),
    opacity 0.52s ease 0.18s,
    visibility 0s linear 0.86s;
}

/* ---- Shared 3D Section Headers ---- */
.grid-head {
  position: relative;
  perspective: 950px;
  perspective-origin: 26% 50%;
  z-index: 3;
}

/* Clean separation so 3D headings NEVER touch or overlap the tray or cases */
.showcase-head {
  margin-bottom: clamp(1.35rem, 2.8vh, 2.1rem);
  padding-left: 0.35rem;
}

.cases-head {
  margin-bottom: clamp(2.1rem, 4.2vh, 3.1rem);
  padding-left: 0.35rem;
}

.grid-head-rig {
  display: inline-block;
  transform: rotateY(11deg) rotateX(5deg);
  transform-origin: left center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.m3d-grid-heading {
  font-size: clamp(2.15rem, 5.8vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.015em;
}

.m3d-counter {
  font-size: clamp(1rem, 2.3vw, 1.65rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

/* ---- VIEW 1: SECTION SWITCHER + SMOOTH CAMERA-PAN SHOWCASE TRACK ---- */
.showcase-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.sec-arrow,
.sec-tab {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.64rem, 0.95vw, 0.76rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.5rem 0.95rem;
  border-radius: 5px;
  cursor: pointer;
  color: #cfd4dc;
  background-color: #242625;
  background-image: var(--plate-dark);
  background-size: 100% 100%;
  border: 1.5px solid #3c3f3e;
  border-top-color: #666a69;
  border-bottom-color: #111212;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -3px 4px rgba(0, 0, 0, 0.65),
    0 4px 0 #0a0b0c,
    0 8px 18px rgba(0, 0, 0, 0.75);
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.sec-arrow {
  padding: 0.5rem 0.76rem;
}

.sec-arrow:hover,
.sec-tab:hover {
  color: #ffffff;
  border-color: rgba(246, 207, 20, 0.65);
  transform: translateY(-1px);
}

.sec-tab.is-active {
  color: #141414;
  background-color: #d9ad0e;
  background-image: var(--plate-gold);
  border-color: #f7e068;
  border-bottom-color: #7d5c03;
  box-shadow:
    inset 0 2px 1px rgba(255, 252, 200, 0.75),
    inset 0 -4px 4px rgba(105, 72, 0, 0.58),
    0 4px 0 #593e01,
    0 10px 22px rgba(0, 0, 0, 0.8);
}

.open-section-btn {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.66rem, 0.95vw, 0.78rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.52rem 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  color: #141414;
  background-color: #d9ad0e;
  background-image: var(--plate-gold);
  border: 1.5px solid #f7e068;
  border-bottom-color: #7d5c03;
  box-shadow:
    inset 0 2px 1px rgba(255, 252, 200, 0.75),
    inset 0 -4px 4px rgba(105, 72, 0, 0.58),
    0 4px 0 #593e01,
    0 10px 22px rgba(0, 0, 0, 0.8);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.open-section-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Smooth horizontal camera-pan viewport across physical section boxes (wide gap, ZERO collision!) */
.showcase-viewport {
  width: 100%;
  overflow: visible;
  padding: clamp(1rem, 3vh, 2.2rem) 0 1rem;
}

.showcase-track {
  display: flex;
  gap: 48vw;
  width: 100%;
  transform: translate3d(calc(var(--active-sec, 0) * -100% - var(--active-sec, 0) * 48vw), 0, 0);
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.showcase-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.45s ease, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.showcase-slide.is-current {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* During camera turn into Cases, keep non-active showcase boxes completely invisible so nothing flies across the lens */
#viewShowcase.is-left .showcase-slide:not(.is-current) {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}

/* Deep 3D Rounded Yellow Section Plate (text-only monumental GRID block, zero inner clutter!) */
.tray-wrap {
  perspective: 1150px;
  perspective-origin: 46% 18%;
  padding: 0.8rem 0 3.2rem;
}

.tray-rig {
  transform: rotateX(10deg) rotateY(7deg);
  transform-origin: 50% 42%;
}

.tray-3d {
  position: relative;
  cursor: pointer;
  outline: none;
}

.tray-face {
  position: relative;
  z-index: 2;
  min-height: clamp(230px, 36vh, 330px);
  padding: clamp(2.6rem, 4.8vw, 3.8rem) clamp(2rem, 4.2vw, 3.4rem);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background-color: #c8a00e;
  background-image:
    var(--plate-gold),
    linear-gradient(180deg, #d8b824 0%, #c69f0e 52%, #ab8506 100%);
  background-size: 100% 100%;
  border: 2px solid #d9bf54;
  border-bottom-color: #8f6c04;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 175, 0.34),
    inset 0 -3px 0 rgba(95, 68, 0, 0.42),
    -1.6px 1.2px 0 #c29a0b,
    -3.2px 2.4px 0 #b89109,
    -4.8px 3.6px 0 #ad8708,
    -6.4px 4.8px 0 #a37e07,
    -8px 6px 0 #987506,
    -9.6px 7.2px 0 #8e6d05,
    -11.2px 8.4px 0 #846404,
    -12.8px 9.6px 0 #7a5c03,
    -14.4px 10.8px 0 #705403,
    -16px 12px 0 #654b02,
    -17.6px 13.2px 0 #5a4202,
    -19.2px 14.4px 0 #4f3901,
    -20.8px 15.6px 0 #443001,
    -22.4px 16.8px 0 #382701,
    -32px 34px 52px rgba(0, 0, 0, 0.9);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease;
}

.tray-3d:hover .tray-face,
.tray-3d:focus-visible .tray-face {
  transform: translate3d(6px, -6px, 0) scale(1.012);
  filter: brightness(1.03);
}

.tray-sec-meta {
  position: absolute;
  top: clamp(1.3rem, 2.4vw, 1.85rem);
  left: clamp(2rem, 4.2vw, 3.4rem);
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.74rem, 1.15vw, 0.96rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(24, 18, 2, 0.72);
  text-shadow: 0 1px 0 rgba(255, 240, 155, 0.3);
}

.tray-sec-title {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(2.1rem, 5.4vw, 4.55rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #141004;
  text-shadow: 0 2px 0 rgba(255, 240, 160, 0.28);
  padding: 0.2rem 0;
}

.tray-grid {
  display: grid;
  width: 100%;
  height: clamp(260px, 42vh, 390px);
  gap: clamp(0.65rem, 1.3vw, 1rem);
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
}

.tray-grid[data-count='1'] {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.tray-grid[data-count='2'] {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
}

.tray-grid[data-count='3'] {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
}

.tray-grid[data-count='4'] {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.tray-grid[data-count='5'] {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.tray-grid[data-count='5'] .tray-tile:nth-child(-n + 3) {
  grid-column: span 2;
}

.tray-grid[data-count='5'] .tray-tile:nth-child(n + 4) {
  grid-column: span 3;
}

.tray-grid[data-count='6'] {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.tray-tile {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 48%, #15171a 0%, #07080a 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 3px 0 rgba(88, 64, 0, 0.58), 0 6px 14px rgba(0, 0, 0, 0.34);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.tray-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tray-tile.is-cutout {
  padding: clamp(0.18rem, 0.5vw, 0.38rem);
}

.tray-tile.is-cutout img {
  width: 96%;
  height: 96%;
  max-width: 98%;
  max-height: 98%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6));
}

.tray-tile.is-cutout.tray-zoom img {
  width: 98%;
  height: 98%;
  transform: scale(1.12);
}

.tray-tile.is-cutout.tray-everest {
  padding: clamp(0.45rem, 1.1vw, 0.85rem);
}

.tray-tile.is-cutout.tray-everest img {
  width: 90%;
  height: 82%;
  object-fit: contain;
}

.tray-tile.is-cutout.tray-cover {
  padding: 0;
}

.tray-tile.is-cutout.tray-cover img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center 48%;
  transform: scale(1.06);
}

.tray-tile.is-cutout.tray-mrtips {
  padding: 0;
  background: radial-gradient(circle at 50% 48%, #2e1c16 0%, #0e0a09 100%);
}

.tray-tile.is-cutout.tray-mrtips img {
  width: 100%;
  height: 124%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center 46%;
  transform: translateY(3%);
}

.tray-tile.tray-focus-car img {
  object-position: 34% 72%;
  transform: scale(1.05);
}

.tray-tile:hover,
.tray-tile.is-active {
  transform: translateY(-4px) scale(1.025);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px #141414, 0 12px 22px rgba(0, 0, 0, 0.55);
  z-index: 3;
}

.tray-caption {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.85rem;
  font-family: 'MicrogrammaNormal', sans-serif;
  font-size: clamp(0.76rem, 1.1vw, 0.92rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfd4dc;
}

.tray-caption strong {
  font-family: 'EurostileBoldExt', sans-serif;
  color: var(--gold);
  font-size: clamp(0.78rem, 1.15vw, 0.96rem);
  letter-spacing: 0.08em;
}

/* ---- VIEW 2: DEEP ROUNDED 3D CASE BLOCKS (PER-CARD PERSPECTIVE -> ZERO BOTTOM TILT DISTORTION!) ---- */
.offers-stage {
  padding: 0.4rem 1.4rem 3.2rem 1.8rem;
}

.offers {
  display: flex;
  flex-direction: column;
  gap: 2.15rem;
}

/* Stationary hit-target wrapper with its OWN centered local perspective so ALL cards share the exact same clean 3D angle! */
.offer {
  position: relative;
  cursor: pointer;
  outline: none;
  perspective: 1180px;
  perspective-origin: 18% 50%;
}

.offer.is-active {
  z-index: 6;
}

/* Visual 3D rounded matte case shell inside the stationary wrapper */
.offer-face {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 196px;
  padding: 1.15rem 1.45rem 1.2rem;
  border-radius: 22px;
  background-color: #242625;
  background-image:
    var(--plate-dark),
    linear-gradient(180deg, #323539 0%, #232528 52%, #191b1d 100%);
  background-size: 100% 100%;
  border: 1.5px solid #45494e;
  border-top-color: #62676d;
  /* Deep, smooth, matte 3D rounded extrusion carved in 1 single GPU layer (zero Z-fighting!) */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -3px 4px rgba(0, 0, 0, 0.55),
    -1.5px 1px 0 #4b4f56,
    -3px 2px 0 #44484e,
    -4.5px 3px 0 #3d4147,
    -6px 4px 0 #373a40,
    -7.5px 5px 0 #32353a,
    -9px 6px 0 #3a3e44,
    -10.5px 7px 0 #40444b,
    -12px 8px 0 #383c42,
    -13.5px 9px 0 #30343a,
    -15px 10px 0 #292c32,
    -16.5px 11px 0 #23262b,
    -18px 12px 0 #1d2024,
    -19.5px 13px 0 #181a1e,
    -21px 14px 0 #131518,
    -22.5px 15px 0 #0e1013,
    -28px 24px 36px rgba(0, 0, 0, 0.92);
  transform: rotateY(10deg) rotateX(3deg);
  transform-origin: left center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.16s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.offer-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
  z-index: -1;
  border-radius: 0 20px 20px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
}

.offer-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) brightness(1.08);
  opacity: 0.28;
  transition: opacity 0.22s ease, filter 0.22s ease;
}

/* Transparent cut-out PNGs float natively on the matte plate with zero box edges */
.offer-media.is-cutout {
  width: 45%;
  -webkit-mask-image: none;
  mask-image: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.45rem 1.05rem;
}

.offer-media.is-cutout img {
  width: auto;
  height: auto;
  max-width: 96%;
  max-height: 94%;
  object-fit: contain;
  filter: none;
  opacity: 0.78;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.offer-media.is-cutout.is-dual .offer-img-dark {
  position: relative;
  opacity: 0.84;
}

.offer-media.is-cutout.is-dual .offer-img-active {
  position: absolute;
  top: 50%;
  right: 1.05rem;
  left: auto;
  bottom: auto;
  transform: translateY(-50%);
  max-width: calc(96% - 1.05rem);
  max-height: calc(100% - 0.9rem);
  padding: 0;
  filter: none;
  opacity: 0;
}

.offer-media.is-cutout.media-logo-lg img {
  width: 78%;
  max-width: 260px;
  height: auto;
}

.offer.is-active .offer-media.is-cutout img {
  filter: drop-shadow(0 6px 12px rgba(45, 32, 0, 0.38));
  mix-blend-mode: normal;
  opacity: 0.96;
}

.offer.is-active .offer-media.is-cutout.is-dual .offer-img-dark {
  opacity: 0;
}

.offer.is-active .offer-media.is-cutout.is-dual .offer-img-active {
  opacity: 0.96;
}

/* Pre-graded Race Driver: GRID Duotone Graphic cards (Silver-Grey on dark, Saleen S7R Yellow on active!) */
.offer-media.is-duotone {
  width: 58%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.72) 26%, #000 44%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.72) 26%, #000 44%);
}

.offer-media.is-duotone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  mix-blend-mode: normal;
  transition: opacity 0.2s ease;
}

.offer-media.is-duotone .offer-img-dark {
  opacity: 0.88;
}

.offer-media.is-duotone .offer-img-active {
  opacity: 0;
}

.offer.is-active .offer-media.is-duotone .offer-img-dark {
  opacity: 0;
}

.offer.is-active .offer-media.is-duotone .offer-img-active {
  filter: none;
  mix-blend-mode: normal;
  opacity: 0.96;
}

.offer-media.media-focus-car img {
  object-position: 28% 74%;
}

/* ALL text inside case blocks strictly uses site fonts: EurostileBoldExt & MicrogrammaNormal */
.offer-title {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(1.35rem, 3.3vw, 2.45rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #edf0f4;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.48rem;
  max-width: 78%;
}

.offer-sub {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfd4dc;
  margin-bottom: 0.4rem;
}

.offer-line {
  font-family: 'MicrogrammaNormal', sans-serif;
  font-size: clamp(0.76rem, 1.15vw, 0.95rem);
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b4bac4;
  max-width: 56%;
}

.offer-score {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.72rem;
}

.offer-year-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.76rem, 1.15vw, 0.92rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: #161616;
  background: linear-gradient(180deg, #e5e8ec 0%, #b4bac2 72%, #8c929a 100%);
  border: 2px solid #1a1a1a;
  box-shadow: 0 0 0 1.5px #c8cdd4;
}

/* Selected case — matte ~10% darker racing yellow rounded 3D case */
.offer.is-active .offer-face {
  transform: rotateY(10deg) rotateX(3deg) translate3d(10px, -4px, 0) scale(1.016);
  background-color: #c8a00e;
  background-image:
    var(--plate-gold),
    linear-gradient(180deg, #dbb928 0%, #c9a10e 50%, #b08706 100%);
  background-size: 100% 100%;
  border-color: #dec25a;
  border-bottom-color: #8a6803;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 178, 0.32),
    inset 0 -3px 4px rgba(96, 68, 0, 0.45),
    -1.6px 1.1px 0 #c49b0c,
    -3.2px 2.2px 0 #b89009,
    -4.8px 3.3px 0 #ab8508,
    -6.4px 4.4px 0 #9f7b06,
    -8px 5.5px 0 #937105,
    -9.6px 6.6px 0 #a47f07,
    -11.2px 7.7px 0 #b08909,
    -12.8px 8.8px 0 #9e7906,
    -14.4px 9.9px 0 #8a6804,
    -16px 11px 0 #795a03,
    -17.6px 12.1px 0 #694d02,
    -19.2px 13.2px 0 #5a4102,
    -20.8px 14.3px 0 #4b3601,
    -22.4px 15.4px 0 #3d2b01,
    -24px 16.5px 0 #2f2001,
    -34px 28px 44px rgba(0, 0, 0, 0.94);
}

.offer.is-active .offer-media img {
  filter: grayscale(1) contrast(1.15) brightness(1.18);
  mix-blend-mode: multiply;
  opacity: 0.88;
}

.offer.is-active .offer-title {
  color: #141414;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.offer.is-active .offer-sub,
.offer.is-active .offer-line {
  color: #241d04;
}

.offer.is-active .offer-year-badge {
  color: #e4bd22;
  background: linear-gradient(180deg, #323539 0%, #151618 75%);
  border-color: #d8b322;
  box-shadow: 0 0 0 1.5px #1a1a1a;
}

.grid-hint {
  font-family: 'MicrogrammaNormal', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #777e88;
  margin-top: 1.4rem;
}

@media (max-width: 760px) {
  .tray-grid {
    height: clamp(210px, 36vh, 290px);
  }

  .offer {
    perspective: none;
  }

  .offer-face,
  .offer.is-active .offer-face {
    transform: none;
  }

  .offer-title,
  .offer-line {
    max-width: 100%;
  }

  .offer-media {
    width: 68%;
    opacity: 0.65;
  }
}

/* =========================================================
   CONTACTS PAGE — GRID PROFILE TABLE (PHOTO 1 STYLE)
   ========================================================= */

.page-contacts .page-shell {
  max-width: 1140px;
  padding-top: clamp(3rem, 7vh, 4.8rem);
  padding-bottom: 6.5rem;
}

.contacts-head {
  margin-bottom: clamp(1rem, 2.2vh, 1.6rem);
  padding-left: 0.25rem;
}

.profile-stage {
  perspective: 1300px;
  perspective-origin: 48% 28%;
}

.profile-table {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  transform: rotateX(2deg) rotateY(1.8deg);
  transform-origin: 50% 10%;
  padding: 0 0.6rem;
}

.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.14fr);
  gap: 0.34rem;
  cursor: pointer;
  outline: none;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Active row physically overhangs slightly wider like "Имя | NIKITA" in Photo 1! */
.profile-row.is-active {
  transform: scale(1.016);
  z-index: 4;
}

.profile-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 3.15rem;
  padding: 0.42rem 0.95rem;
  border-radius: 3px;
  background-color: #1f2120;
  background-image: var(--plate-dark);
  background-size: 100% 100%;
  border: 1.5px solid #2b2d2c;
  border-top-color: #464947;
  border-bottom-color: #0b0c0b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -3px 4px rgba(0, 0, 0, 0.72),
    0 3px 0 #080909,
    0 7px 14px rgba(0, 0, 0, 0.8);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.profile-key {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(1.02rem, 1.75vw, 1.42rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #c2c6c3;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9);
}

.profile-val {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.92rem, 1.48vw, 1.24rem);
  line-height: 1.05;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: #cfd3d0;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Toggle cell with left/right arrows like "◄ Вкл ►" in Photo 1 */
.profile-toggle-wrap {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr) 2.15rem;
  gap: 0.24rem;
  min-width: 0;
}

.profile-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  border-radius: 3px;
  cursor: pointer;
  outline: none;
  color: #c2c6c3;
  background-color: #1f2120;
  background-image: var(--plate-dark);
  background-size: 100% 100%;
  border: 1.5px solid #2b2d2c;
  border-top-color: #464947;
  border-bottom-color: #0b0c0b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -3px 4px rgba(0, 0, 0, 0.72),
    0 3px 0 #080909,
    0 7px 14px rgba(0, 0, 0, 0.8);
  transition: color 0.14s ease, border-color 0.14s ease;
}

.profile-arrow-btn svg {
  width: 0.72rem;
  height: 0.88rem;
  display: block;
}

.profile-arrow-btn:hover {
  color: #ffffff;
}

/* Selected / active row — matte ~10% darker weathered gold block (exact Photo 1!) */
.profile-row.is-active .profile-cell,
.profile-row.is-active .profile-arrow-btn {
  background-color: #c49c0c;
  background-image: var(--plate-gold);
  background-size: 100% 100%;
  border-color: #d6ba4e;
  border-top-color: #e6cf72;
  border-bottom-color: #6b4e02;
  box-shadow:
    inset 0 1px 0 rgba(248, 234, 160, 0.34),
    inset 0 -3px 4px rgba(92, 62, 0, 0.65),
    0 4px 0 #4d3501,
    0 10px 20px rgba(0, 0, 0, 0.86);
}

.profile-row.is-active .profile-key,
.profile-row.is-active .profile-val,
.profile-row.is-active .profile-arrow-btn {
  color: #121004;
  text-shadow: 0 1px 0 rgba(245, 230, 150, 0.28);
}

@media (max-width: 760px) {
  .profile-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .profile-table {
    transform: none;
  }
}

/* =========================================================
   PORTFOLIO VIEW 3 — FULL CASE DETAIL SCREEN (CAMERA TURN)
   ========================================================= */

.detail-head {
  margin-bottom: clamp(1.2rem, 2.6vh, 1.85rem);
  padding-left: 0.25rem;
}

.detail-head .grid-head-rig {
  transform: rotateY(7.5deg) rotateX(2.8deg);
  transform-origin: left center;
}

/* Single unified 3D plane for ALL detail blocks (gallery + text + telemetry — ZERO protruding!) */
.case-detail-stage {
  perspective: 1450px;
  perspective-origin: 45% 40%;
  padding: 0.35rem 0.6rem 1.8rem 0.85rem;
}

.case-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1.02fr);
  gap: clamp(1.35rem, 2.8vw, 2.15rem);
  align-items: start;
  transform: rotateY(7.5deg) rotateX(2.8deg);
  transform-origin: 45% 40%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.case-gallery-col {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.case-stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #0b0c0e;
  border: 1.5px solid #3c4044;
  border-top-color: #5a5f64;
  /* Uniform 6px x 4.5px machined 3D thickness shared IDENTICALLY by every block on Stage 3! */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    -1px 0.75px 0 #42464c,
    -2px 1.5px 0 #373b40,
    -3px 2.25px 0 #2d3035,
    -4px 3px 0 #23262a,
    -5px 3.75px 0 #191b1f,
    -6px 4.5px 0 #101215,
    -10px 9px 18px rgba(0, 0, 0, 0.78);
  transition: background-color 0.25s ease;
}

/* Soft studio paper stage for light-background graphics — multiply eliminates any white box seam! */
.case-stage-frame.is-light-stage {
  background: #f2f1eb;
  border-color: #3d403f;
}

.case-stage-frame.is-light-stage img,
.case-thumb.is-light-thumb img {
  mix-blend-mode: multiply;
}

.case-stage-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.22s ease;
}

.case-stage-frame img.is-small-asset {
  max-width: min(76%, 320px);
  max-height: min(76%, 280px);
}

.case-stage-video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #000000;
  outline: none;
}

.case-slide-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.56rem 0.92rem;
  border-radius: 8px;
  background-color: #212324;
  background-image:
    var(--plate-dark),
    linear-gradient(180deg, #2e3135 0%, #202225 58%, #17191b 100%);
  background-size: 100% 100%;
  border: 1.5px solid #3c4044;
  border-top-color: #5a5f64;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    -1px 0.75px 0 #42464c,
    -2px 1.5px 0 #373b40,
    -3px 2.25px 0 #2d3035,
    -4px 3px 0 #23262a,
    -5px 3.75px 0 #191b1f,
    -6px 4.5px 0 #101215,
    -10px 9px 18px rgba(0, 0, 0, 0.78);
}

.case-slide-count {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  white-space: nowrap;
}

.case-slide-caption {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: clamp(0.68rem, 0.95vw, 0.82rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #cfd3d0;
  text-align: right;
}

.case-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.6rem;
}

.case-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  padding: 0.35rem;
  cursor: pointer;
  background: #121314;
  border: 2px solid #353837;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #080909;
  transition: border-color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
  opacity: 0.65;
}

.case-thumb.is-light-thumb {
  background: #ecebe6;
}

.case-thumb img,
.case-thumb video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.case-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.case-thumb-play::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--gold);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  margin-left: 3px;
}

.case-thumb:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.case-thumb.is-active {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: 0 3px 0 #4d3501, 0 0 0 1px rgba(210, 171, 20, 0.35);
}

.case-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.case-brief-card {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  padding: 1.05rem 1.25rem;
  border-radius: 8px;
  background-color: #222425;
  background-image:
    var(--plate-dark),
    linear-gradient(180deg, #303337 0%, #222427 52%, #181a1c 100%);
  background-size: 100% 100%;
  border: 1.5px solid #3c4044;
  border-top-color: #5a5f64;
  /* Exact same 6px x 4.5px machined 3D thickness as gallery & telemetry -> 100% coplanar, ZERO overlap! */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -3px 4px rgba(0, 0, 0, 0.62),
    -1px 0.75px 0 #42464c,
    -2px 1.5px 0 #373b40,
    -3px 2.25px 0 #2d3035,
    -4px 3px 0 #23262a,
    -5px 3.75px 0 #191b1f,
    -6px 4.5px 0 #101215,
    -10px 9px 18px rgba(0, 0, 0, 0.78);
}

.case-brief-label {
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.case-brief-text {
  font-family: 'MicrogrammaNormal', sans-serif;
  font-size: 0.84rem;
  line-height: 1.65;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cfd3d0;
}

.case-telemetry {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.case-tel-row {
  display: grid;
  grid-template-columns: 10.2rem minmax(0, 1fr);
  gap: 0.9rem;
}

.case-tel-cell {
  display: flex;
  align-items: center;
  padding: 0.56rem 0.82rem;
  border-radius: 8px;
  background-color: #212324;
  background-image:
    var(--plate-dark),
    linear-gradient(180deg, #2e3135 0%, #202225 58%, #17191b 100%);
  background-size: 100% 100%;
  border: 1.5px solid #3c4044;
  border-top-color: #5a5f64;
  /* Exact same 6px x 4.5px thickness, strictly narrower than 14.4px row gap -> ZERO overlapping edges! */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 3px rgba(0, 0, 0, 0.65),
    -1px 0.75px 0 #42464c,
    -2px 1.5px 0 #373b40,
    -3px 2.25px 0 #2d3035,
    -4px 3px 0 #23262a,
    -5px 3.75px 0 #191b1f,
    -6px 4.5px 0 #101215,
    -9px 8px 14px rgba(0, 0, 0, 0.68);
  font-family: 'EurostileBoldExt', sans-serif;
  font-size: 0.63rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #c2c6c3;
  white-space: nowrap;
}

.case-tel-cell.is-val {
  color: #e0e4e1;
  white-space: normal;
  line-height: 1.35;
}

@media (max-width: 860px) {
  .case-detail-stage {
    perspective: none;
    padding: 0;
  }

  .case-detail-layout {
    grid-template-columns: 1fr;
    transform: none;
  }
}
