:root {
  --bg: #0d0d0e;
  --surface: #161617;

  --text: #ffffff;
  --muted: #a8a8ad;
  --muted-2: #747479;

  --border: #2b2b2e;
  --border-light: #38383c;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;

  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}


/* HEADER */

.site-header {
  border-bottom: 1px solid var(--border);

  background: rgba(13, 13, 14, 0.96);
}

.site-header__inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;

  gap: 14px;

  color: inherit;
  text-decoration: none;
}

.brand__logo {
  width: auto;
  height: 42px;

  max-width: 180px;
}

.brand__text small {
  color: var(--muted);

  font-size: 0.68rem;
  font-weight: 600;

  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.demo-badge {
  padding: 8px 12px;

  border: 1px solid var(--border);
  border-radius: 999px;

  color: var(--muted);

  font-size: 0.75rem;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 92px 0 58px;
}

.hero-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(300px, 0.55fr);

  gap: 90px;

  align-items: center;
}

.hero__content {
  min-width: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 16px;

  color: var(--muted);

  font-size: 0.74rem;
  font-weight: 700;

  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;

  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.9;

  letter-spacing: -0.065em;
}

.hero h1 span {
  display: block;

  color: #a9a9ad;
}

.hero__intro {
  max-width: 720px;

  margin: 30px 0 0;

  color: var(--muted);

  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}


/* =========================================================
   HERO QR
   ========================================================= */

.hero-qr {
  justify-self: end;

  width: min(100%, 360px);

  padding: 28px;

  border: 1px solid var(--border);
  border-radius: 24px;

  background: var(--surface);
}

.hero-qr__code {
  width: 100%;

  display: grid;
  place-items: center;

  padding: 24px;

  border-radius: 18px;

  background: #ffffff;
}

.hero-qr__code img {
  display: block;

  width: min(100%, 230px);
  height: auto;
}

.hero-qr__copy {
  padding-top: 24px;
}

.hero-qr__eyebrow {
  margin: 0 0 10px;

  color: var(--muted-2);

  font-size: 0.68rem;
  font-weight: 700;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-qr__copy h2 {
  margin: 0;

  font-size: 1.45rem;
  line-height: 1.15;

  letter-spacing: -0.035em;
}

.hero-qr__copy > p:last-child {
  margin: 12px 0 0;

  color: var(--muted);

  font-size: 0.82rem;
  line-height: 1.55;
}


/* TRY-ON */

.tryon-section {
  padding: 32px 0 100px;
}

.tryon-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(300px, 0.75fr);

  gap: 52px;

  align-items: start;
}

.camera-card {
  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 26px;

  background: var(--surface);
}

.camera-toolbar {
  min-height: 74px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 16px 20px;

  border-bottom: 1px solid var(--border);
}

.camera-toolbar > div {
  display: flex;
  flex-direction: column;

  gap: 5px;
}

.camera-toolbar__label {
  color: var(--muted-2);

  font-size: 0.7rem;

  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.camera-status {
  padding: 7px 10px;

  border: 1px solid var(--border-light);
  border-radius: 999px;

  color: #cfcfd3;

  font-size: 0.68rem;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.camera-stage {
  position: relative;

  width: 100%;
  aspect-ratio: 4 / 3;

  overflow: hidden;

  background:
    radial-gradient(
      circle at center,
      #29292c 0%,
      #19191b 55%,
      #151516 100%
    );
}

#camera-video {
  width: 100%;
  height: 100%;

  display: none;

  object-fit: cover;

  transform: scaleX(-1);
}

.camera-placeholder {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 30px;

  text-align: center;
}

.camera-placeholder span {
  font-size: 1.1rem;
  font-weight: 700;
}

.camera-placeholder p {
  max-width: 400px;

  margin: 12px 0 0;

  color: var(--muted);

  line-height: 1.6;
}

.camera-controls {
  display: flex;

  gap: 12px;

  padding: 18px 20px;

  border-top: 1px solid var(--border);
}

.primary-button,
.secondary-button {
  min-height: 48px;

  padding: 0 20px;

  border-radius: 999px;

  font-size: 0.86rem;
  font-weight: 700;

  cursor: pointer;
}

.primary-button {
  border: 0;

  background: #ffffff;
  color: #111111;
}

.secondary-button {
  border: 1px solid var(--border-light);

  background: transparent;
  color: var(--text);
}

.secondary-button:disabled {
  opacity: 0.4;

  cursor: not-allowed;
}


/* INFO PANEL */

.tryon-info {
  padding-top: 12px;
}

.tryon-info h2 {
  margin: 0;

  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;

  letter-spacing: -0.04em;
}

.tryon-description {
  margin: 24px 0 0;

  color: var(--muted);

  line-height: 1.7;
}

.feature-list {
  margin-top: 36px;
}

.feature-item {
  display: grid;
  grid-template-columns: 44px 1fr;

  gap: 15px;

  padding: 20px 0;

  border-top: 1px solid var(--border);
}

.feature-item:last-child {
  border-bottom: 1px solid var(--border);
}

.feature-number {
  color: var(--muted-2);

  font-size: 0.7rem;
}

.feature-item strong {
  display: block;

  margin-bottom: 6px;
}

.feature-item p {
  margin: 0;

  color: var(--muted);

  font-size: 0.87rem;
  line-height: 1.55;
}

.privacy-note {
  margin-top: 30px;

  padding: 18px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface);
}

.privacy-note strong {
  display: block;

  margin-bottom: 8px;

  font-size: 0.8rem;
}

.privacy-note p {
  margin: 0;

  color: var(--muted);

  font-size: 0.78rem;
  line-height: 1.55;
}


/* FOOTER */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  min-height: 86px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  color: var(--muted-2);

  font-size: 0.72rem;
}


/* RESPONSIVE */

@media (max-width: 900px) {

  .tryon-layout {
    grid-template-columns: 1fr;
  }

  .tryon-info {
    padding-top: 0;
  }
}


@media (max-width: 700px) {

  .page-shell,
  .site-header__inner {
    width: min(100% - 24px, 1180px);
  }

  .site-header__inner {
    min-height: 68px;
  }

  .brand__logo {
    height: 34px;
  }

  .demo-badge {
    display: none;
  }

  .hero {
    padding: 62px 0 36px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 18vw, 5rem);
  }

  .tryon-section {
    padding-bottom: 70px;
  }

  .camera-card {
    border-radius: 20px;
  }

  .camera-controls {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .site-footer__inner {
    min-height: 110px;

    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}


/* =========================================================
   FACE LANDMARK OVERLAY
   ========================================================= */

#face-overlay {
  position: absolute;
  inset: 0;

  z-index: 2;

  width: 100%;
  height: 100%;

  display: none;

  pointer-events: none;

  /*
   * The camera preview is mirrored for a natural
   * selfie experience, so mirror the landmarks too.
   */
  transform: scaleX(-1);
  transform-origin: center;
}

#camera-video {
  position: relative;

  z-index: 1;
}

.camera-placeholder {
  z-index: 3;
}


/* =========================================================
   THREE.JS GLASSES OVERLAY
   ========================================================= */

#glasses-overlay {
  position: absolute;
  inset: 0;

  z-index: 3;

  width: 100%;
  height: 100%;

  display: none;

  pointer-events: none;

  /*
   * Keep Three.js aligned with the mirrored selfie video.
   */
  transform: scaleX(-1);
  transform-origin: center;
}


/*
 * Face dots were useful for calibration.
 * Once the glasses renderer is active we keep them hidden.
 */

#face-overlay {
  z-index: 2;
}


/* =========================================================
   STYLE SELECTOR
   ========================================================= */

.style-selector {
  padding: 20px;

  border-top: 1px solid var(--border);
}

.style-selector__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 14px;
}

.style-selector__heading span {
  color: var(--muted);

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.style-selector__heading strong {
  font-size: 0.8rem;
}

.style-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);

  gap: 8px;
}

.style-option {
  min-height: 58px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: transparent;
  color: var(--text);

  font-size: 0.82rem;
  font-weight: 700;

  cursor: pointer;
}

.style-option span {
  color: var(--muted);

  font-size: 0.61rem;
  font-weight: 600;

  letter-spacing: 0.04em;
}

.style-option:hover {
  border-color: var(--border-light);
}

.style-option.is-active {
  border-color: #ffffff;

  background: #ffffff;
  color: #111111;
}

.style-option.is-active span {
  color: #55555a;
}


@media (max-width: 700px) {

  .style-selector {
    padding: 16px;
  }

  .style-options {
    grid-template-columns: repeat(5, 1fr);

    gap: 6px;
  }

  .style-option {
    min-height: 54px;

    padding: 4px;

    font-size: 0.76rem;
  }

  .style-option span {
    font-size: 0.55rem;
  }
}

/* =========================================================
   MOBILE HERO
   ========================================================= */

@media screen and (max-width: 900px) {

  .hero {
    padding: 62px 0 44px;
  }

  .hero-layout {
    display: block;
    width: min(100% - 24px, 1180px);
  }

  .hero__content {
    width: 100%;
    max-width: none;
  }

  .hero-qr {
    display: none;
  }

  .hero h1 {
    width: 100%;
    max-width: none;

    font-size: clamp(4rem, 17vw, 6rem);
    line-height: 0.92;
  }

  .hero__intro {
    width: 100%;
    max-width: 100%;

    margin-top: 28px;

    font-size: 1.05rem;
    line-height: 1.65;
  }
}


@media screen and (max-width: 430px) {

  .hero {
    padding-top: 56px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 18vw, 5rem);
  }

  .hero__intro {
    font-size: 1rem;
  }
}
