/* ============================================================
   GILT EDGE — Shell: nav, showroom, present-mode, responsive
   ============================================================ */

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}

/* ---------- MOBILE-FIRST: app fills the screen ---------- */
.stage {
  flex: 1; display: flex; flex-direction: column;
  min-height: 0;
}
.stage__phone { flex: 1; min-height: 0; display: flex; }
.stage__rail { display: none; }

/* The phone frame on mobile is the whole viewport (no bezel) */
.phone { width: 100%; border-radius: 0; }

/* ---------- Segmented top nav ---------- */
.ge-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11,11,13,.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 8px) 8px 0;
}
.ge-nav__brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 8px 8px;
}
.ge-nav__mark { height: 30px; }
.ge-nav__mark svg { height: 30px; width: auto; }
.ge-nav__loc { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
.ge-seg {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  -ms-overflow-style: none;
}
.ge-seg::-webkit-scrollbar { display: none; }
.ge-seg__btn {
  position: relative;
  flex: 0 0 auto;
  background: transparent; border: none;
  padding: 12px 14px 13px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
  transition: color .2s;
}
.ge-seg__btn:hover { color: var(--ivory); }
.ge-seg__btn.is-active { color: var(--champagne); }
.ge-seg__btn.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2.5px;
  background: var(--foil); border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px rgba(198,161,91,.5);
  animation: underGrow .3s var(--ease);
}
@keyframes underGrow { from { transform: scaleX(.3); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* View mount */
.ge-view { animation: viewIn .34s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Generic view container padding */
.view-pad { padding: 18px 16px 40px; }
.section-title {
  font-family: var(--f-display); font-size: 21px; font-weight: 600;
  margin: 22px 0 12px; display: flex; align-items: center; gap: 10px;
}
.section-title:first-child { margin-top: 4px; }
.rule { height: 1px; background: var(--line); border: none; margin: 18px 0; }
.rule--gold { background: linear-gradient(90deg, transparent, var(--gilt), transparent); opacity: .5; }

/* ---------- Floating brand chip (logo swapper) ---------- */
.brand-chip {
  position: fixed; z-index: 90;
  right: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 10px;
  background: rgba(22,22,26,.9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform .15s var(--ease), border-color .2s;
}
.brand-chip:hover { border-color: var(--gilt); transform: translateY(-1px); }
.brand-chip:active { transform: scale(.96); }
.brand-chip__mark { height: 22px; display: flex; align-items: center; }
.brand-chip__mark svg { height: 22px; width: auto; }
.brand-chip__label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
.brand-chip__label b { color: var(--champagne); font-weight: 700; }

/* Present-mode toggle btn */
.present-btn {
  position: fixed; z-index: 90;
  left: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  padding: 8px 14px;
  background: rgba(22,22,26,.9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ivory);
  box-shadow: var(--shadow);
}
.present-btn:hover { border-color: var(--gilt); color: var(--champagne); }

/* ============================================================
   DESKTOP SHOWROOM  (single 768px breakpoint)
   ============================================================ */
@media (min-width: 768px) {
  .stage {
    flex-direction: row;
    align-items: center; justify-content: center;
    gap: clamp(24px, 5vw, 72px);
    padding: 24px;
    /* Showroom backdrop: the shop hero photo, dimmed so the
       centered phone-frame pops. Layers, top→bottom:
       gold glow washes → dark overlay → cover photo → base color. */
    background:
      radial-gradient(1200px 600px at 30% -10%, rgba(198,161,91,.12), transparent 60%),
      radial-gradient(900px 500px at 90% 110%, rgba(138,107,47,.12), transparent 55%),
      linear-gradient(rgba(6,6,8,.82), rgba(6,6,8,.88)),
      url('../assets/hero-16x9.png') center / cover no-repeat,
      #08080a;
    min-height: 100dvh;
  }
  .stage.showroom::before {
    content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
      linear-gradient(rgba(198,161,91,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(198,161,91,.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at 50% 40%, #000 40%, transparent 80%);
  }
  .stage__phone { flex: 0 0 auto; position: relative; z-index: 1; }
  .phone { width: 390px; }

  /* Talk-track caption rail */
  .stage__rail {
    display: block; position: relative; z-index: 1;
    width: min(360px, 32vw);
    animation: viewIn .4s var(--ease);
  }
  .rail__eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gilt); margin-bottom: 14px; }
  .rail__title { font-family: var(--f-display); font-size: 34px; font-weight: 600; line-height: 1.1; margin-bottom: 16px; }
  .rail__body { color: var(--ash); font-size: 15px; line-height: 1.6; }
  .rail__body strong { color: var(--ivory); font-weight: 600; }
  .rail__quote {
    margin-top: 22px; padding-left: 16px;
    border-left: 2px solid var(--gilt);
    font-family: var(--f-display); font-style: italic; font-size: 18px; color: var(--champagne);
  }

  /* Nav becomes fixed-height inside phone; keep sticky */
  .brand-chip { bottom: 24px; right: 24px; }
  .present-btn { bottom: 24px; left: 24px; }
}

/* ============================================================
   PRESENT MODE  — hide chrome, phone goes fullscreen-clean
   ============================================================ */
body.present .brand-chip,
body.present .present-btn__enter { }  /* keep swapper + exit reachable */
body.present .stage.showroom::before { opacity: .5; }

body.present .stage__rail { display: none; }
body.present .stage {
  padding: 0; gap: 0;
  background: #050506;
}
body.present .showroom .phone {
  height: 100dvh; max-height: 100dvh;
  border-radius: 0; border: none;
  box-shadow: none;
  width: min(430px, 100vw);
}
body.present .showroom .phone::before { display: none; }

@media (max-width: 767px) {
  body.present .phone { height: 100dvh; }
}
