:root {
  --bg: #060606;
  --fg: #e1e1e1;
  --muted: #9a9a9a;
  --panel: #1a1a1a;
  --line: rgba(225, 225, 225, 0.12);
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --left: 34vw;
  --portrait-w: min(22vw, 19rem);
}

[data-theme="light"] {
  --bg: #e8e4dc;
  --fg: #232323;
  --muted: #5c5c5c;
  --panel: #f4f1ea;
  --line: rgba(35, 35, 35, 0.12);
  --gold: #9a7a14;
  --gold-soft: rgba(154, 122, 20, 0.14);
  --shadow: 0 24px 60px rgba(35, 35, 35, 0.08);
}

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

html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Josefin Sans", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: "Kalnia", Georgia, serif;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: var(--left) 1fr;
  height: 100%;
  min-height: 100dvh;
}

.identity {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 7vh 4.5vw 5vh;
  border-right: 1px solid var(--line);
  z-index: 2;
  background: var(--bg);
}

.identity h1 {
  font-size: clamp(2.4rem, 4.2vw, 4.4rem);
  line-height: 0.95;
}

.identity .role {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.identity .place {
  margin-top: 1.6rem;
  max-width: 28ch;
  color: var(--muted);
  line-height: 1.55;
  font-size: 1.02rem;
}

.stage {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  min-height: 0;
}

.rooms {
  display: flex;
  height: 100%;
  width: 300%;
  transform: translateX(0);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.room {
  width: 33.333%;
  height: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 0;
  background: var(--bg);
}

.room-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 6vw;
  max-width: 40rem;
}

.kicker {
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 1.1rem;
}

.room h2 {
  font-size: clamp(2.2rem, 4vw, 4.1rem);
  line-height: 1.02;
  margin-bottom: 1.4rem;
}

.room p {
  margin: 0 0 1rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.room p strong {
  color: var(--fg);
  font-weight: 500;
}

.cta {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.45rem;
}

.cta-link {
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

.cta-phone {
  color: var(--gold);
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}

.facts {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.facts li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  line-height: 1.45;
}

.facts span {
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding-top: 0.15rem;
}

.room[data-room="0"] {
  grid-template-columns: 1fr calc(var(--portrait-w) + 5rem);
  position: relative;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.room[data-room="0"] .room-copy {
  position: relative;
  z-index: 2;
  max-width: min(32rem, calc(100% - 2rem));
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.portrait {
  position: relative;
  grid-column: 2;
  justify-self: center;
  align-self: end;
  width: var(--portrait-w);
  max-height: 100%;
  aspect-ratio: 1.15 / 1;
  margin: 0 3rem 0 0;
  background: var(--bg);
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  isolation: isolate;
}

.portrait-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 22%;
}

.quote-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
  background:
    radial-gradient(circle at 80% 20%, var(--gold-soft), transparent 46%),
    var(--panel);
  border-left: 1px solid var(--line);
}

.quote-pane blockquote {
  margin: 0;
  max-width: 18ch;
  font-family: "Kalnia", Georgia, serif;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
  line-height: 1.12;
}

.phone-card {
  margin: auto 6vw auto 0;
  padding: 2.4rem 2.2rem;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  align-self: center;
}

.phone-card .number {
  font-family: "Kalnia", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.15;
  margin: 0.4rem 0 1rem;
}

.phone-card a.number {
  text-decoration: none;
}

.phone-card .hint {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* --- identity rail: socials + vertical page list, permanent under the name --- */

.home-rail {
  position: relative;
  width: 100%;
  margin-top: 4vh;
  display: flex;
  flex-direction: column;
  z-index: 3;
  pointer-events: none;
}

.home-rail > * {
  pointer-events: auto;
}

.button-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.15rem;
  padding: 0 0 1.6rem;
}

.button-container svg {
  height: 1.55rem;
  width: auto;
  display: block;
}

.theme-toggle {
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.3s;
}

.theme-toggle:hover {
  transform: scale(1.35);
}

.theme-toggle svg {
  width: 1.7rem;
  height: 1.7rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

[data-theme="dark"] .icon-sun,
[data-theme="light"] .icon-moon {
  display: none;
}

.button-container .separator {
  height: 1.4rem;
  fill: var(--fg);
  opacity: 0.85;
}

.button-container a {
  display: flex;
  color: inherit;
  transition: transform 0.3s;
}

.button-container a svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-container a[href="#x"] svg path {
  fill: currentColor;
  stroke: none;
}

.button-container a:hover {
  transform: scale(1.4);
}

.main-menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
}

.menu-items {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 3.6rem;
  align-self: flex-start;
  min-width: 11rem;
  pointer-events: auto;
}

.menu-items a {
  color: var(--fg);
  font-size: clamp(1.45rem, 2.1vw, 2.15rem);
  padding: 1.15rem 0;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: font-weight 0.2s, color 0.2s;
  line-height: 1;
}

.menu-items a:hover,
.menu-items a[aria-current="page"] {
  font-weight: 600;
}

.menu-items a[aria-current="page"] {
  color: var(--gold);
}

.menu-arrow {
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 1.7rem;
  height: auto;
  color: var(--gold);
  pointer-events: none;
  transform: scaleX(-1);
  transition: top 0.3s;
}

.mobile-menu-toggle {
  display: none;
}

/* --- in-page toolbar (Offer / Call), neriakatz prev/next cluster --- */

.toolbar {
  position: absolute;
  right: 2.2rem;
  top: 2.2rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  z-index: 4;
}

.toolbar[hidden] {
  display: none;
}

.toolbar .onboard {
  margin: 0 0.6rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
  color: var(--muted);
  pointer-events: none;
  animation: fade-hint 8s 0.8s forwards;
  opacity: 0;
}

@keyframes fade-hint {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.prev-button,
.next-button,
.close-button {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  transition: transform 0.3s, opacity 0.3s;
}

.prev-button:hover,
.next-button:hover,
.close-button:hover {
  transform: scale(1.3);
}

.next-button {
  transform: rotateY(180deg);
}

.next-button:hover {
  transform: scale(1.3) rotateY(180deg);
}

.prev-button:disabled,
.next-button:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.next-button:disabled:hover {
  transform: rotateY(180deg);
}

.prev-button svg,
.next-button svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

.close-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.skip {
  position: absolute;
  left: -999px;
}

@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100dvh;
  }

  body {
    overflow: auto;
  }

  body.menu-open {
    overflow: hidden;
  }

  .shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    height: auto;
  }

  .identity {
    min-height: 0;
    padding: 8vh 8vw 4vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stage {
    min-height: 0;
  }

  .rooms {
    width: 100%;
    height: auto;
    flex-direction: column;
    transform: none !important;
  }

  .room {
    width: 100%;
    min-height: 0;
    height: auto;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .room[data-room="0"] {
    grid-template-columns: 1fr;
    align-items: stretch;
    overflow: visible;
  }

  .room[data-room="0"] .room-copy {
    max-width: none;
    height: auto;
    overflow: visible;
  }

  .portrait {
    position: relative;
    grid-column: auto;
    justify-self: auto;
    align-self: auto;
    left: auto;
    bottom: auto;
    transform: none;
    width: min(56vw, 280px);
    max-height: none;
    aspect-ratio: 1.15 / 1;
    margin: 2vh auto 0;
    order: -1;
  }

  .portrait-video {
    object-position: center 22%;
  }

  .phone-card {
    margin: 0 8vw 8vh;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0.4rem;
    right: 0.3rem;
    z-index: 30;
    width: 3.4rem;
    height: 3.4rem;
  }

  .hamburger {
    width: 2.6rem;
    height: 2.6rem;
  }

  .hamburger .line {
    fill: none;
    stroke: currentColor;
    stroke-width: 5.5;
    stroke-linecap: round;
  }

  .home-rail {
    position: fixed;
    top: 0;
    right: auto;
    bottom: auto;
    left: 100%;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    margin-top: 0;
    padding: 5.5rem 2rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--bg);
    transform: none;
    transition: left 0.3s;
    z-index: 20;
    pointer-events: auto;
    overflow: auto;
  }

  body.menu-open .home-rail {
    left: 0;
    transform: none;
  }

  .button-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin: 0;
    padding: 0.9rem 1.2rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--line);
  }

  .button-container .separator {
    transform: none;
    margin: 0;
  }

  body {
    padding-bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px));
  }

  .main-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    min-height: 0;
    pointer-events: auto;
  }

  .menu-items {
    align-self: flex-start;
    padding-left: 0;
    height: auto;
    justify-content: flex-start;
    gap: 0.25rem;
  }

  .menu-items a {
    font-size: 2rem;
    padding: 0.85rem 0;
    line-height: 1.15;
  }

  .menu-arrow {
    display: none;
  }

  .toolbar {
    display: none;
  }
}
