:root {
  color-scheme: dark;
  --ink: #f6f7f2;
  --muted: #aebac1;
  --navy: #07131b;
  --panel: rgba(7, 19, 27, 0.82);
  --line: rgba(222, 236, 242, 0.22);
  --blue: #0ab6ff;
  --blue-deep: #0378bd;
  --green: #7bd62f;
  --yellow: #ffb51b;
  --danger: #ff6d5f;
  --paper: #f4f0e5;
  --paper-ink: #242422;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.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;
}

.landing-page {
  overflow-x: hidden;
  background: var(--navy);
  color: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  isolation: isolate;
  background-image: url("../images/buildervr-hero.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 10, 15, 0.88) 0, rgba(3, 10, 15, 0.13) 22%, transparent 48%),
    linear-gradient(0deg, rgba(3, 10, 15, 0.94) 0, rgba(3, 10, 15, 0.18) 39%, transparent 64%),
    linear-gradient(90deg, rgba(3, 10, 15, 0.26), transparent 28%, transparent 72%, rgba(3, 10, 15, 0.26));
}

.site-header {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(3, 10, 15, 0.42);
  backdrop-filter: blur(12px);
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2.5vw, 30px);
}

.brand-builder {
  font-size: 19px;
  color: #fff;
}

.brand-vr {
  font-size: 24px;
  color: var(--yellow);
}

.legal-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 3vw, 36px);
}

.legal-nav a {
  position: relative;
  color: #eef4f5;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.legal-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.legal-nav a:hover::after,
.legal-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.language-picker {
  position: relative;
  flex: 0 0 auto;
}

.language-current,
.language-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  color: #f3f6f7;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.language-current {
  min-width: 126px;
  height: 38px;
  min-height: 38px;
  justify-content: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(4, 14, 20, 0.72);
  padding: 0 10px;
}

.language-current:hover,
.language-current:focus-visible {
  border-color: rgba(10, 182, 255, 0.72);
  outline: 3px solid rgba(10, 182, 255, 0.14);
}

.language-current img,
.language-option img {
  width: 23px;
  height: 16px;
  flex: 0 0 23px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  object-fit: cover;
}

.language-current span:nth-child(2),
.language-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-chevron {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.language-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 7px);
  right: 0;
  width: 150px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: #0b1a22;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  padding: 5px;
}

.language-option {
  width: 100%;
  height: 38px;
  min-height: 38px;
  border-radius: 5px;
  background: transparent;
  padding: 0 8px;
}

.language-option:hover,
.language-option:focus-visible,
.language-option[aria-selected="true"] {
  background: #087fb4;
  outline: none;
}

.entry-zone {
  align-self: end;
  width: min(680px, calc(100vw - 32px));
  margin: 0 auto clamp(52px, 8vh, 96px);
  text-align: center;
}

.entry-label {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 900;
  text-shadow: 0 2px 14px #000;
}

.code-form {
  position: relative;
  display: block;
  width: 100%;
}

.input-shell {
  position: relative;
  width: min(540px, calc(100% - 96px));
  margin: 0 auto;
}

.input-shell input {
  width: 100%;
  height: 76px;
  border: 2px solid rgba(64, 199, 255, 0.88);
  border-radius: 8px;
  outline: none;
  background: rgba(5, 16, 24, 0.91);
  box-shadow:
    0 0 0 5px rgba(10, 182, 255, 0.14),
    0 0 34px rgba(10, 182, 255, 0.5),
    inset 0 0 20px rgba(10, 182, 255, 0.08);
  color: #fff;
  caret-color: var(--green);
  font-size: 37px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.3em;
  padding: 0 20px 0 31px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.input-shell input::placeholder {
  color: #7c898e;
  opacity: 0.88;
}

.input-shell input:focus {
  border-color: #79dcff;
  box-shadow:
    0 0 0 6px rgba(10, 182, 255, 0.18),
    0 0 44px rgba(10, 182, 255, 0.72),
    inset 0 0 24px rgba(10, 182, 255, 0.12);
}

.input-progress {
  position: absolute;
  right: 12px;
  bottom: 8px;
  left: 12px;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.input-progress::after {
  display: block;
  width: var(--code-progress, 0%);
  height: 100%;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
  content: "";
  transition: width 160ms ease, background 160ms ease;
}

.continue-button {
  position: absolute;
  top: 0;
  left: calc(50% + min(270px, calc((100% - 96px) / 2)) + 12px);
  display: grid;
  width: 78px;
  height: 76px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: filter 150ms ease, transform 150ms ease;
}

.continue-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.continue-button:hover,
.continue-button:focus-visible {
  filter: brightness(1.1) drop-shadow(0 0 14px rgba(123, 214, 47, 0.7));
  outline: none;
  transform: translateY(-2px);
}

.continue-button:active {
  transform: translateY(1px) scale(0.98);
}

.continue-button:disabled {
  cursor: wait;
  filter: grayscale(0.45);
  opacity: 0.72;
}

.code-status {
  min-height: 25px;
  margin-top: 13px;
  color: #d6e1e4;
  font-size: 14px;
  font-weight: 750;
  text-shadow: 0 2px 8px #000;
}

.code-status.is-error {
  color: #ffd0ca;
}

.code-status.is-success {
  color: #dfffc4;
}

.code-form.is-error .input-shell input {
  border-color: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 109, 95, 0.18), 0 0 34px rgba(255, 109, 95, 0.46);
  animation: input-shake 260ms ease;
}

.code-form.is-success .input-shell input {
  border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(123, 214, 47, 0.16), 0 0 36px rgba(123, 214, 47, 0.52);
}

.code-form.is-success .input-progress::after {
  background: var(--green);
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(3, 10, 15, 0.72);
  color: #aeb9bd;
  font-size: 12px;
  font-weight: 650;
}

.landing-footer a {
  color: #d8e3e6;
  text-decoration: none;
}

@keyframes input-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-7px);
  }
  70% {
    transform: translateX(7px);
  }
}

.legal-page {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(10, 182, 255, 0.09), transparent 230px),
    #10191e;
  color: var(--ink);
}

.legal-page .site-header {
  position: sticky;
  z-index: 5;
  top: 0;
}

.legal-main {
  width: min(880px, calc(100vw - 32px));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) 0 72px;
}

.legal-title {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1;
}

.legal-date {
  margin: 14px 0 40px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.legal-intro {
  margin: 0 0 38px;
  padding-left: 18px;
  border-left: 4px solid var(--yellow);
  color: #e5ebed;
  font-size: 18px;
  line-height: 1.65;
}

.legal-section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 23px;
}

.legal-section p,
.legal-section li {
  color: #c5d0d4;
  font-size: 16px;
  line-height: 1.72;
}

.legal-section p {
  margin: 0 0 12px;
}

.legal-section ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.legal-section strong {
  color: #fff;
}

.legal-contact {
  color: #7fdcff;
  font-weight: 800;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.legal-back img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .hero {
    background-image: url("../images/buildervr-hero-mobile.png");
    background-position: 50% center;
  }

  .site-header {
    align-items: center;
    padding: 14px 16px;
  }

  .site-brand {
    padding-top: 2px;
  }

  .brand-builder {
    font-size: 15px;
  }

  .brand-vr {
    font-size: 19px;
  }

  .legal-nav {
    gap: 14px;
  }

  .header-actions {
    gap: 12px;
  }

  .language-current {
    min-width: 112px;
  }

  .legal-nav a {
    font-size: 12px;
  }

  .entry-zone {
    margin-bottom: 34px;
  }
}

@media (max-width: 520px) {
  .hero {
    background-position: 50% 38%;
  }

  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  .site-brand {
    gap: 4px;
  }

  .brand-builder {
    font-size: 13px;
  }

  .brand-vr {
    font-size: 17px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: end;
    justify-items: end;
    gap: 8px;
  }

  .legal-nav {
    display: flex;
    min-width: 0;
    gap: 8px;
  }

  .legal-nav a {
    font-size: 10px;
  }

  .language-current {
    min-width: 108px;
  }

  .entry-zone {
    width: calc(100vw - 64px);
  }

  .input-shell {
    width: calc(100% - 68px);
  }

  .input-shell input,
  .continue-button {
    height: 62px;
  }

  .continue-button {
    left: calc(50% + calc((100% - 68px) / 2) + 8px);
    width: 58px;
  }

  .input-shell input {
    font-size: 32px;
  }

  .landing-footer {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
