@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,500&family=Inter:wght@300;500;600&display=swap');

:root {
  --bg: #0a1018;
  --text: #f6f1e8;
  --muted: rgba(246, 241, 232, 0.78);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #e8c056;
  --accent-soft: rgba(232, 192, 86, 0.35);
  --sky-glow: rgba(120, 180, 220, 0.14);
  --scroll-progress: 0;
  --mouse-x: 0;
  --mouse-y: 0;
  --float-a: 0;
  --float-b: 0;
  --orbit-x-deg: 0deg;
  --orbit-y-deg: 0deg;
  --orbit-pivot-x: 40%;
  --orbit-pivot-y: 46%;
  --tour-panorama-image: url("3af20787b00877b1bc9d9f5dfa83a507_41a5932ca3de46518b4b761971348db0.png");
}

* {
  box-sizing: border-box;
}

html:has(body.page--tour) {
  overflow: hidden;
  height: 100%;
}

html:has(body.page--tour) body {
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.page {
  overflow: hidden;
}

.page--tour {
  margin: 0;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  cursor: grab;
  background: #05080d;
}

.page--tour:active {
  cursor: grabbing;
}

.page--tour main {
  height: 100%;
}

.hero--fullscreen-tour {
  min-height: 100vh !important;
  height: 100vh;
  margin: 0;
  display: block;
  position: relative;
}

.pano-root {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #05080d;
}

.pano-root canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- PARALAX 360 viewer (полная страница + embed) --- */

html:has(body.page--viewer) {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100%;
}

html:has(body.page--viewer) body {
  height: auto;
  min-height: 100%;
}

body.page--viewer {
  background: #eef1f6;
  color: #1a2332;
}

.page--viewer.page {
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
}

.viewer-app {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 16px 28px;
  gap: 12px;
}

.viewer-toolbar {
  flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px 12px;
  box-shadow: 0 4px 22px rgba(15, 35, 55, 0.07);
  border: 1px solid rgba(15, 35, 55, 0.06);
}

.viewer-toolbar-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.viewer-portal-back {
  font-size: 13px;
  font-weight: 600;
  color: #1e6fdf;
  text-decoration: none;
  white-space: nowrap;
}

.viewer-portal-back:hover {
  text-decoration: underline;
}

.viewer-brand {
  margin-bottom: 0;
}

.viewer-brand strong {
  font-size: 17px;
  letter-spacing: 0.03em;
  color: #1e6fdf;
}

.viewer-brand-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(26, 35, 50, 0.55);
  font-weight: 500;
}

.viewer-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.viewer-url-wrap {
  flex: 1 1 240px;
  min-width: 0;
}

.viewer-url-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(15, 35, 55, 0.14);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fafbfc;
  color: #1a2332;
}

.viewer-url-input::placeholder {
  color: rgba(26, 35, 50, 0.42);
}

.viewer-url-input:focus {
  outline: 2px solid rgba(30, 111, 223, 0.35);
  outline-offset: 1px;
  border-color: rgba(30, 111, 223, 0.45);
}

.viewer-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(26, 35, 50, 0.58);
}

.viewer-hint a {
  color: #1e6fdf;
}

.viewer-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: min(480px, 52vh);
  border-radius: 18px;
  overflow: hidden;
  background: #0d2448;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.viewer-shell--dragover {
  outline: 3px solid rgba(62, 148, 255, 0.9);
  outline-offset: -3px;
}

.drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(165deg, #0f2852 0%, #0b1f40 55%, #081830 100%);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.drop-overlay--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.drop-overlay--dragover {
  background: linear-gradient(165deg, #143a6e 0%, #0f3060 100%);
}

.drop-overlay-inner {
  text-align: center;
  max-width: 440px;
}

.drop-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
}

.page--viewer .btn-drop-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  min-height: 48px;
  margin: 0 auto 18px;
  padding: 0 28px;
  border-radius: 14px;
  border: 1px solid rgba(180, 140, 0, 0.65);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: #1a1404;
  background: linear-gradient(180deg, #ffe566 0%, #f5c518 45%, #e6b010 100%);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.page--viewer .btn-drop-upload:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.page--viewer .btn-drop-upload:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.drop-title {
  margin: 0 0 10px;
  font-size: clamp(20px, 3.6vw, 26px);
  font-weight: 600;
  color: #fff;
}

.drop-text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.page--viewer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.page--viewer .btn-primary {
  background: #1e6fdf;
  color: #fff;
}

.page--viewer .btn-primary:hover {
  background: #1860c4;
}

.page--viewer .viewer-toolbar .btn-ghost {
  background: #eef1f6;
  border-color: rgba(15, 35, 55, 0.12);
  color: #263042;
}

.page--viewer .viewer-toolbar .btn-ghost:hover {
  background: #e4e9f2;
}

.page--viewer .viewer-toolbar .btn-ghost.btn--active {
  background: #dbeafe;
  border-color: rgba(30, 111, 223, 0.38);
  color: #1e3a8a;
}

.page--viewer .viewer-embed-actions .btn-ghost {
  background: #eef1f6;
  border-color: rgba(15, 35, 55, 0.12);
  color: #263042;
}

.page--viewer .viewer-embed-actions .btn-ghost:hover {
  background: #e4e9f2;
}

.viewer-embed-panel {
  flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 4px 22px rgba(15, 35, 55, 0.07);
  border: 1px solid rgba(15, 35, 55, 0.06);
}

.viewer-embed-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #1a2332;
}

.viewer-embed-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(26, 35, 50, 0.65);
}

.viewer-embed-lead a {
  color: #1e6fdf;
}

.viewer-embed-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.viewer-embed-label {
  display: block;
}

.viewer-embed-label-text {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(26, 35, 50, 0.75);
}

.viewer-embed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.viewer-embed-flash {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  background: rgba(30, 111, 223, 0.1);
  border: 1px solid rgba(30, 111, 223, 0.22);
  color: #1e3a8a;
}

.viewer-embed-flash[hidden] {
  display: none !important;
}

.viewer-embed-flash--error {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #991b1b;
}

.viewer-embed-code-label {
  display: block;
  margin-bottom: 10px;
}

.viewer-embed-code {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(15, 35, 55, 0.14);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
  min-height: 140px;
  background: #0f172a;
  color: #e2e8f0;
}

.viewer-embed-code::placeholder {
  color: rgba(226, 232, 240, 0.45);
}

.viewer-embed-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(26, 35, 50, 0.52);
}

.viewer-embed-reels-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 35, 55, 0.08);
}

.viewer-embed-subtitle {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1a2332;
}

.viewer-embed-lead--tight {
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.viewer-embed-actions--wrap {
  margin-bottom: 0;
}

.reels-inline-link {
  color: #1e6fdf;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

body.page--reels {
  min-height: 100vh;
}

body.page--reels .viewer-app.reels-root {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  height: auto;
  padding: 0;
  margin: 0;
  gap: 0;
}

body.page--reels .reels-toolbar {
  padding: 10px 12px 12px;
  border-radius: 0;
}

body.page--reels .reels-hint {
  font-size: 11px;
  margin-top: 8px;
  line-height: 1.45;
}

body.page--reels .reels-hint code {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(30, 111, 223, 0.08);
}

body.page--reels .reels-toolbar-row {
  gap: 8px;
}

body.page--reels .reels-toolbar-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page--reels .reels-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #15243f 0%, #02050c 72%);
  padding: 6px 0 14px;
}

body.page--reels .reels-viewer-shell {
  width: min(100vw, calc(100vh * 9 / 16));
  height: min(100vh, calc(100vw * 16 / 9));
  max-height: min(100vh, calc(100dvh - 168px));
  min-height: 260px;
  flex: 0 0 auto;
  border-radius: 14px;
}

body.page--reels.reels--clean .reels-toolbar {
  display: none !important;
}

body.page--reels.reels--clean .reels-stage {
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
}

body.page--reels.reels--clean .reels-viewer-shell {
  max-height: 100vh;
  max-height: 100dvh;
  width: min(100vw, calc(100vh * 9 / 16));
  width: min(100vw, calc(100dvh * 9 / 16));
  height: min(100vh, calc(100vw * 16 / 9));
  height: min(100dvh, calc(100vw * 16 / 9));
  border-radius: 0;
}

.drop-overlay-inner--reels {
  max-width: 360px;
}

.page--viewer .btn-file {
  height: 44px;
  padding: 0 26px;
  background: #fff;
  color: #0d2448;
  border-color: rgba(255, 255, 255, 0.5);
}

.page--viewer .btn-file:hover {
  background: #f3f6fb;
}

.page--viewer .btn-file--secondary {
  height: 38px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.22);
}

.page--viewer .btn-file--secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.page--viewer .viewer-status {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 15;
  max-width: min(520px, calc(100% - 28px));
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  background: rgba(8, 14, 24, 0.82);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page--viewer .viewer-status--error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.page--viewer .pano-root canvas {
  cursor: grab;
}

.page--viewer .pano-root:active canvas {
  cursor: grabbing;
}

.page--viewer .tour-ui {
  z-index: 12;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .viewer-toolbar-row .btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

  .viewer-toolbar-row .btn-primary {
    flex: 1 1 100%;
    order: -1;
  }

  .viewer-embed-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* --- Страница для iframe: embed.html --- */

html:has(body.page--embed),
body.page--embed {
  margin: 0;
}

html:has(body.page--embed) {
  height: 100%;
  overflow: hidden;
}

body.page--embed {
  height: 100%;
  background: #05080d;
  color: #e2e8f0;
}

.page--embed.page {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.embed-missing-src {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(165deg, #0f2852 0%, #081528 100%);
  font-size: 15px;
  line-height: 1.55;
}

.embed-missing-src[hidden] {
  display: none !important;
}

.embed-missing-src code {
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.embed-missing-src-sub {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.85;
}

.embed-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  background: #05080d;
}

.embed-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: calc(100% - 20px);
}

.page--embed .btn-embed {
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  background: rgba(8, 12, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(246, 241, 232, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.page--embed .btn-embed:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page--embed .btn-embed.btn--active {
  background: rgba(30, 111, 223, 0.45);
  border-color: rgba(147, 197, 253, 0.45);
}

.page--embed .viewer-status {
  position: absolute;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  z-index: 15;
  max-width: min(520px, calc(100% - 28px));
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  background: rgba(8, 14, 24, 0.82);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page--embed .viewer-status--error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.page--embed .pano-root canvas {
  cursor: grab;
}

.page--embed .pano-root:active canvas {
  cursor: grabbing;
}

.page--embed .tour-ui {
  z-index: 12;
}

.parallax-stage--image-only {
  background: #05080d;
}

.parallax-stage--image-only .scene-3d {
  cursor: inherit;
}

.tour-ui {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: clamp(16px, 4vh, 36px);
  transform: translateX(-50%);
  pointer-events: none;
}

.tour-cross {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-template-rows: repeat(3, 40px);
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.tour-btn {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 241, 232, 0.92);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

.tour-btn:hover {
  background: rgba(232, 192, 86, 0.18);
  border-color: rgba(232, 192, 86, 0.35);
}

.tour-btn:active {
  transform: scale(0.94);
}

.tour-up {
  grid-column: 2;
  grid-row: 1;
}

.tour-left {
  grid-column: 1;
  grid-row: 2;
}

.tour-right {
  grid-column: 3;
  grid-row: 2;
}

.tour-down {
  grid-column: 2;
  grid-row: 3;
}

.hero {
  position: relative;
  display: grid;
  min-height: 140vh;
  isolation: isolate;
}

.parallax-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  perspective: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% 120%, rgba(15, 35, 48, 0.95), transparent 55%),
    radial-gradient(circle at 42% 12%, var(--accent-soft), transparent 42%),
    radial-gradient(circle at 78% 22%, var(--sky-glow), transparent 35%),
    var(--bg);
}

.hero--fullscreen-tour .parallax-stage {
  position: relative;
  height: 100%;
  top: auto;
}

.hero--3d-master .atlas-layer {
  opacity: 0 !important;
  visibility: hidden;
}

.scene-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  perspective: min(1600px, 165vw);
  perspective-origin: var(--orbit-pivot-x) var(--orbit-pivot-y);
  overflow: hidden;
}

.scene-3d-inner {
  position: absolute;
  inset: -18vh -22vw;
  transform-style: preserve-3d;
  transform-origin: var(--orbit-pivot-x) var(--orbit-pivot-y);
  transform:
    rotateX(var(--orbit-x-deg))
    rotateY(var(--orbit-y-deg));
  will-change: transform;
}

.depth-sheet {
  position: absolute;
  inset: 0;
  background-color: #0a1018;
  background-image: var(--tour-panorama-image);
  background-repeat: no-repeat;
  background-position: var(--orbit-pivot-x) var(--orbit-pivot-y);
  background-size: cover;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.depth-sheet-back {
  transform: translateZ(-420px) scale(1.2);
  filter: blur(5px) saturate(1.06) brightness(0.88);
}

.depth-sheet-mid {
  transform: translateZ(-140px) scale(1.08);
  filter: blur(1px) saturate(1.08) contrast(1.03);
}

.depth-sheet-front {
  transform: translateZ(160px) scale(1.03);
  filter: saturate(1.12) contrast(1.06) brightness(1.03);
  opacity: 1;
}

@media (max-width: 760px) {
  :root {
    --orbit-pivot-x: 44%;
    --orbit-pivot-y: 48%;
  }

  .scene-3d {
    perspective: min(1100px, 240vw);
  }

  .scene-3d-inner {
    inset: -14vh -30vw;
  }

  .depth-sheet-back {
    transform: translateZ(-260px) scale(1.14);
    filter: blur(4px) saturate(1.05) brightness(0.9);
  }

  .depth-sheet-mid {
    transform: translateZ(-95px) scale(1.06);
  }

  .depth-sheet-front {
    transform: translateZ(95px) scale(1.02);
  }

  .tour-cross {
    grid-template-columns: repeat(3, 36px);
    grid-template-rows: repeat(3, 36px);
    padding: 8px 10px;
  }

  .tour-btn {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

.hero:not(.hero--3d-master) .scene-3d {
  display: none;
}

.layer,
.hero-vignette {
  position: absolute;
  inset: -8vh -8vw;
  pointer-events: none;
}

.layer {
  --depth: 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform:
    translate3d(
      calc(
        ((var(--mouse-x) * var(--move-x, 0px)) +
          (var(--scroll-progress) * var(--scroll-x, 0px)) +
          (var(--float-a) * var(--float-x, 0px))) * var(--depth)
      ),
      calc(
        ((var(--scroll-progress) * var(--scroll-y, 0px)) +
          (var(--mouse-y) * var(--move-y, 0px)) +
          (var(--float-b) * var(--float-y, 0px))) * var(--depth)
      ),
      0
    )
    rotate(calc(((var(--mouse-x) * var(--tilt, 0deg)) + (var(--scroll-progress) * var(--scroll-rotate, 0deg))) * var(--depth)))
    scale(calc(var(--scale, 1) + (var(--scroll-progress) * var(--scale-add, 0))));
  will-change: transform, opacity, filter;
}

.layer-bg {
  inset: -12vh -12vw;
  z-index: 1;
  background-image: url("assets/background.png");
  background-size: cover;
  --move-x: -14px;
  --move-y: -8px;
  --scroll-x: -52px;
  --scroll-y: 38px;
  --float-x: 8px;
  --float-y: -7px;
  --scroll-rotate: -0.85deg;
  --scale-add: 0.028;
  --scale: 1.22;
  filter: blur(1px) saturate(1.08) contrast(1.06);
}

.layer-far {
  z-index: 3;
  background-image: url("assets/far.png");
  background-size: 118% auto;
  background-position: center 42%;
  --move-x: 26px;
  --move-y: 16px;
  --scroll-x: 102px;
  --scroll-y: -108px;
  --float-x: -22px;
  --float-y: 14px;
  --tilt: 1.05deg;
  --scroll-rotate: 3.2deg;
  --scale-add: 0.038;
  --scale: 1.08;
  opacity: 1;
  filter: blur(0.55px) saturate(1.06);
}

.layer-text {
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  --move-x: -18px;
  --move-y: -12px;
  --scroll-x: 34px;
  --scroll-y: -62px;
  --float-x: 7px;
  --float-y: -6px;
  --tilt: 0.65deg;
  --scroll-rotate: 1.35deg;
  --scale-add: 0.018;
  --scale: 1;
}

.hero-title-wrap {
  text-align: center;
  transform: translateY(-10vh);
  max-width: min(96vw, 920px);
  padding: 0 16px;
}

.hero-brand {
  margin: 0 0 12px;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(246, 241, 232, 0.55);
}

.hero-title-interleaved {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: clamp(52px, 11vw, 188px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: center;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 40px 80px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(0, 0, 0, 0.45);
  margin: 0;
  line-height: 0.88;
}

.hero-title-sub {
  display: block;
  margin-top: 0.12em;
  font-size: 0.42em;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: rgba(246, 241, 232, 0.92);
}

.hero-title-tag {
  margin: 18px 0 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(13px, 1.6vw, 15px);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(246, 241, 232, 0.45);
}

.layer-near {
  inset: -12vh -12vw -6vh;
  z-index: 6;
  background-image: url("assets/near.png");
  background-position: center bottom;
  background-size: cover;
  --move-x: 48px;
  --move-y: 28px;
  --scroll-x: -128px;
  --scroll-y: -118px;
  --float-x: 26px;
  --float-y: -20px;
  --tilt: -1.75deg;
  --scroll-rotate: -3.8deg;
  --scale-add: 0.048;
  --scale: 1.12;
  opacity: 1;
  filter: saturate(1.18) contrast(1.08) drop-shadow(0 26px 52px rgba(0, 0, 0, 0.35));
}

.layer-mug {
  inset: -8vh -6vw 0;
  z-index: 5;
  background-image: url("assets/mug.png");
  background-position: center bottom;
  background-size: auto min(88vh, 840px);
  --move-x: -42px;
  --move-y: 22px;
  --scroll-x: 108px;
  --scroll-y: -28px;
  --float-x: -14px;
  --float-y: 10px;
  --tilt: -1.35deg;
  --scroll-rotate: 2.6deg;
  --scale-add: 0.018;
  --scale: 1;
  opacity: 1;
  filter: drop-shadow(0 52px 96px rgba(0, 0, 0, 0.62)) saturate(1.1) contrast(1.05);
}

.hero-vignette {
  z-index: 7;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(10, 16, 24, 0) 32%);
}

.hero-glow {
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 50% 55%, transparent 30%, rgba(5, 12, 22, 0.35) 100%);
  mix-blend-mode: multiply;
}

.hero-copy {
  position: absolute;
  top: 0;
  left: clamp(20px, 8vw, 120px);
  z-index: 12;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(680px, calc(100vw - 40px));
  height: 100vh;
  padding: 0 0 8vh;
  pointer-events: none;
}

.hero-copy > * {
  pointer-events: auto;
}

.hero-text-backdrop {
  background: linear-gradient(135deg, rgba(10, 16, 26, 0.92), rgba(10, 16, 26, 0.48));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 14px;
  border: 1px solid rgba(232, 192, 86, 0.14);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.65);
  width: fit-content;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
  backdrop-filter: blur(18px);
  transition: all 0.3s ease;
}

.button.primary {
  color: #0a1018;
  border-color: var(--accent);
  background: var(--accent);
}

.button.primary:hover {
  background: #e8c85c;
  border-color: #e8c85c;
}

.button.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-hint span {
  display: block;
  width: 10px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
}

.content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 96px 0 120px;
}

.content-card {
  min-height: 320px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.content-card h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.content-card p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

code {
  color: #c9e8dc;
}

.content-card-full {
  grid-column: 1 / -1;
}

.open-links-lead {
  margin-bottom: 12px;
}

.open-links-big {
  margin: 0 0 20px;
  font-size: clamp(17px, 2.2vw, 22px);
}

.open-links-big a {
  color: var(--accent);
  font-weight: 600;
  word-break: break-all;
}

.mono-path {
  font-size: 15px;
  line-height: 1.65;
}

.mono-path code {
  word-break: break-all;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .hero {
    min-height: 145vh;
  }

  .hero-copy {
    justify-content: flex-end;
    left: 16px;
    width: min(100vw - 32px, 640px);
    padding-bottom: 6vh;
    height: 100vh;
  }

  .hero-title-wrap {
    transform: translateY(-6vh);
  }

  .layer-mug {
    background-position: center bottom;
    background-size: auto min(72vh, 620px);
    --scroll-y: -42px;
    --scroll-x: 72px;
  }

  .hero-vignette {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(10, 16, 24, 0) 36%);
  }

  .content {
    grid-template-columns: 1fr;
  }
}
