:root {
  --ink: #070809;
  --paper: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.62);
  --yellow: #f5ff00;
  --teal: #5eead4;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: dark; }
body {
  min-height: 100dvh;
  background: var(--ink);
  color: var(--paper);
  font-family: "Inter Tight", "Noto Sans Khmer", system-ui, sans-serif;
  letter-spacing: -0.011em;
}

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

.top {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top)) 28px 0;
  pointer-events: none;
}
.brand, .lang { pointer-events: auto; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--yellow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-word { text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55); }

.lang {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(7, 8, 9, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.lang a {
  min-width: 52px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.lang a.on {
  background: var(--paper);
  color: var(--ink);
}

.split {
  display: flex;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

.panel {
  position: relative;
  flex: 1 1 50%;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  transition: flex 0.7s var(--ease);
}
.panel:hover,
.panel:focus-visible { flex: 1.22 1 58%; }
.split:hover .panel:not(:hover):not(:focus-visible) { flex: 0.78 1 42%; }

.panel:focus-visible { outline: none; }
.panel:focus-visible .cta { transform: translateY(-2px); }

.media, .shade {
  position: absolute;
  inset: 0;
}
.media {
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 1.1s var(--ease);
}
.b2e .media { background-image: url("../images/door-b2e.jpg"); }
.hr .media { background-image: url("../images/door-hr.jpg"); }
.panel:hover .media,
.panel:focus-visible .media { transform: scale(1.1); }

.shade {
  background:
    linear-gradient(180deg, rgba(7, 8, 9, 0.18) 0%, rgba(7, 8, 9, 0.22) 38%, rgba(7, 8, 9, 0.78) 100%);
}
.b2e .shade {
  background:
    linear-gradient(180deg, rgba(7, 8, 9, 0.28) 0%, rgba(7, 8, 9, 0.2) 36%, rgba(7, 8, 9, 0.84) 100%),
    linear-gradient(90deg, rgba(245, 255, 0, 0.08), transparent 42%);
}
.hr .shade {
  background:
    linear-gradient(180deg, rgba(4, 18, 16, 0.2) 0%, rgba(4, 18, 16, 0.18) 36%, rgba(4, 18, 16, 0.82) 100%),
    linear-gradient(270deg, rgba(94, 234, 212, 0.1), transparent 46%);
}

.copy {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  padding: 0 48px calc(48px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.idx {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 18px;
}
.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.b2e .kicker { color: var(--yellow); }
.hr .kicker { color: var(--teal); }

h1 {
  margin: 0 0 14px;
  font-family: "Instrument Serif", "Noto Sans Khmer", serif;
  font-weight: 400;
  font-size: clamp(56px, 7vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
html[lang="km"] h1 {
  font-family: "Noto Sans Khmer", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.copy p {
  margin: 0 0 28px;
  max-width: 22em;
  font-size: 18px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 400;
}

.desk {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(320px, 100%);
  margin-bottom: 28px;
}
.desk span {
  display: grid;
  place-items: center;
  height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 8, 9, 0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}
.b2e .cta { background: var(--yellow); color: #111; }
.hr .cta { background: var(--teal); color: #042f2e; }
.panel:hover .cta,
.panel:focus-visible .cta { transform: translateY(-2px); filter: brightness(1.04); }

.host {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.seam {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--yellow);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 8px rgba(7, 8, 9, 0.35);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.7s var(--ease);
}
.seam img { display: block; width: 100%; height: 100%; object-fit: cover; }
.split:hover .seam { opacity: 0.35; transform: scale(0.92); }

@media (max-width: 860px) {
  .top { padding: calc(14px + env(safe-area-inset-top)) 16px 0; }
  .split { flex-direction: column; }
  .panel,
  .panel:hover,
  .panel:focus-visible,
  .split:hover .panel:not(:hover):not(:focus-visible) {
    flex: none;
    min-height: 92dvh;
  }
  .copy { padding: 0 22px calc(36px + env(safe-area-inset-bottom)); }
  h1 { font-size: clamp(48px, 16vw, 72px); }
  .copy p { font-size: 16px; }
  .seam { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .media, .cta, .seam { transition: none; }
  .media, .panel:hover .media, .panel:focus-visible .media { transform: none; }
}
