/* Layout: logo top-left, Contact Us top-right, GET MONEY FITTED$ wordmark centred (swaps to the hovered cap),
   a frosted macOS-style dock pinned to the bottom. White ground, black type. */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #3a3a3a;
  --line: #e4e4e4;
  --scrim: rgba(10, 10, 10, 0.72);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-edge: rgba(0, 0, 0, 0.09);
  --font: "Montserrat", "Gotham", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* dock geometry (base = resting cap width; images are 3:4) */
  --base: 68px;
  --gap: 8px;
  --pad: 10px;
  --shelf: calc(var(--base) * 4 / 3 + var(--pad) * 2);
  --dock-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-inline: 16px;
  padding-block: 0 calc(var(--shelf) + var(--dock-bottom) + 24px);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body.lb-open { overflow: hidden; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: calc(22px + env(safe-area-inset-top, 0px)) 0;
  max-width: 1280px;
  width: 100%;
  margin-inline: auto;
}
.brand { display: block; line-height: 0; border-radius: 4px; }
.brand img { display: block; height: 26px; width: auto; }
.brand:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.social {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  border-radius: 50%;
  transition: background 160ms ease;
}
.social:hover { background: var(--line); }
.social:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* ---------- Menu dropdown ---------- */
.topbar { position: relative; z-index: 30; }
.menu { position: relative; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 13px/1 var(--font);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease;
}
.menu-btn:hover, .menu.is-open .menu-btn { border-bottom-color: var(--ink); }
.menu-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
.menu-chev { transition: transform 200ms ease; }
.menu.is-open .menu-chev { transform: rotate(180deg); }

.menu-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
/* invisible bridge so the pointer can travel from the button to the list without it closing */
.menu-list::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -12px;
  height: 12px;
}
.menu.is-open .menu-list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 160ms ease, transform 200ms ease, visibility 0s linear 0s;
}
.menu-item {
  display: block;
  padding: 13px 14px;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.menu-item:hover, .menu-item:focus-visible { background: #f1f1f1; outline: none; }
.menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- Feature: wordmark at rest, cap info while a cap is hovered ---------- */
.feature {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 24px;
  min-height: 0;
}
.feature-stack {
  display: grid;          /* both layers share one cell, so swapping never shifts layout */
  place-items: center;
}
.feature-stack > * { grid-area: 1 / 1; }

.wordmark,
.cap-info {
  transition: opacity 240ms ease, transform 320ms var(--spring), visibility 0s linear 0s;
}
.wordmark {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 900;
  font-size: clamp(64px, 13vw, 184px);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.wordmark span { display: block; }

.cap-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transition: opacity 240ms ease, transform 320ms var(--spring), visibility 0s linear 240ms;
}
.feature.is-cap .wordmark {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px) scale(0.98);
  transition: opacity 200ms ease, transform 320ms var(--spring), visibility 0s linear 200ms;
}
.feature.is-cap .cap-info {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 240ms ease, transform 320ms var(--spring), visibility 0s linear 0s;
}

.feature-kicker {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.feature-name {
  margin: 0;
  font-weight: 900;
  font-size: clamp(88px, 18vw, 260px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.feature-price {
  margin: 16px 0 0;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0.01em;
}
.feature-price abbr {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.5em;
  letter-spacing: 0.18em;
  vertical-align: 0.35em;
  color: var(--ink-2);
}
.feature-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 200px;
}
.feature-name.swap { animation: nameIn 240ms ease-out; }
@keyframes nameIn {
  from { opacity: 0.3; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: 800 13px/1 var(--font);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.btn-outline { background: var(--bg); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { transform: translateY(-1px); background: #000; }
.btn-sm { padding: 9px 16px; font-size: 11px; }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(20px + env(safe-area-inset-top, 0px));
  z-index: 80;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ---------- Dock ---------- */
.dock-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--dock-bottom);
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;      /* only the dock itself catches the pointer */
}
.dock {
  position: relative;
  display: flex;
  align-items: flex-end;     /* caps grow upward from the shelf */
  gap: var(--gap);
  padding: var(--pad) calc(var(--pad) + 2px);
  pointer-events: auto;
  touch-action: none;        /* lets a finger slide along the dock without scrolling the page */
}
/* the frosted shelf: fixed height, anchored to the bottom, widens with the row */
.dock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--shelf);
  border-radius: 24px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 30px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: -1;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock::before { background: rgba(250, 250, 250, 0.96); }
}

.dock-item {
  position: relative;
  flex: 0 0 auto;
  width: var(--base);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.dock-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.14));
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.dock-item:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* "running app" dot under the selected cap */
.dock-dot {
  position: absolute;
  left: 50%;
  bottom: calc(var(--pad) * -0.5 - 2px);
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  transition: opacity 200ms ease;
}
.dock-item.is-selected .dock-dot { opacity: 1; }

/* tooltip label above the hovered cap */
.dock-tip {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 12px 8px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0);
  transition: opacity 140ms ease;
  will-change: transform, opacity;
}
.dock-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--ink);
  transform: rotate(45deg);
  border-radius: 2px;
}
.dock-tip.is-on { opacity: 1; }
.dock-tip-name { font-weight: 800; font-size: 13px; letter-spacing: 0.12em; }
.dock-tip-price { font-weight: 500; font-size: 12px; letter-spacing: 0.04em; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 260ms ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-visible { opacity: 1; }

.lb-stage {
  position: relative;
  width: min(92vw, 1000px);
  height: min(86vh, 820px);
  height: min(86dvh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  transition: transform 420ms var(--spring);
}
.lightbox.is-visible .lb-stage { transform: none; }

.lb-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 16px 0 24px;
  pointer-events: none;
}
.lb-title {
  margin: 0;
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.lb-heading { pointer-events: auto; }
.lb-heading .btn { margin-top: 12px; }
.lb-price {
  margin: 6px 0 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.lb-close {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: transform 200ms ease;
}
.lb-close:hover { transform: scale(1.06); }
.lb-close:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.lb-viewer { flex: 1; min-height: 0; }
.lb-viewer model-viewer {
  width: 100%;
  height: 100%;
  background: var(--bg);
  --poster-color: #ffffff;
  --progress-bar-color: transparent;
}
.lb-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 140px 24px 24px;
  opacity: 0.9;
}
.lb-progress {
  position: absolute;
  left: 24px; right: 24px; bottom: 52px;
  height: 3px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  transition: opacity 300ms ease;
}
.lb-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 120ms linear;
}
.lb-progress.is-done { opacity: 0; }
.lb-hint {
  margin: 0;
  padding: 0 16px 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.lb-error {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--ink);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  :root { --base: min(64px, calc((100vw - 32px - 24px - 24px) / 4)); --gap: 8px; --pad: 8px; }
  .brand img { height: 20px; }
  .menu-btn { font-size: 12px; letter-spacing: 0.14em; }
  .menu-list { min-width: 190px; }
  .topnav { gap: 10px; }
  .feature-actions { min-width: 220px; }

  .lightbox { padding: 0; }
  .lb-stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .lb-head { padding: calc(14px + env(safe-area-inset-top, 0px)) 12px 0 20px; }
  .lb-hint { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .lb-progress { bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  .dock-item:active img { transform: scale(0.94); transition: transform 100ms ease; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-stage, .lightbox, .dock-tip { transition: none; }
  .feature-name.swap { animation: none; }
  .wordmark, .cap-info, .feature.is-cap .wordmark, .feature.is-cap .cap-info { transition: none; }
  .menu-list, .menu.is-open .menu-list, .menu-chev { transition: none; }
}
