:root {
  --ink: #121214;
  --blue: #2e47e6;
  --blue-d: #1f33b8;
  --ground: #f5f4f0;
  --pink: #e8336f;
  --green: #12a37a;
  --amber: #e9a21b;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
#vp {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ground);
}
#stage {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: 50% 0;
}
.layer {
  position: absolute;
  inset: 0;
}
svg {
  display: block;
  overflow: visible;
}
/* overlay keeps the copy legible over the grid */
#overlay {
  background: radial-gradient(
    70% 90% at 22% 55%,
    rgba(245, 244, 240, 0.96) 30%,
    rgba(245, 244, 240, 0.5) 62%,
    rgba(245, 244, 240, 0) 85%
  );
  pointer-events: none;
}

/* nav */
#nav::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -1px;
  left: -3000px;
  right: -3000px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(18, 18, 20, 0.08);
  z-index: -1;
}
#nav {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 72px;
  padding: 0 240px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.in #nav {
  opacity: 1;
  transform: none;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.logo svg {
  width: 24px;
  height: 24px;
  transition: transform 0.6s var(--ease);
}
.logo:hover svg {
  transform: rotate(-30deg);
}
#nav .links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  height: 72px;
  align-items: stretch;
}
#nav .links a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 15px;
  color: rgba(18, 18, 20, 0.75);
  position: relative;
  transition: color 0.3s;
}
#nav .links a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
#nav .links a:hover {
  color: var(--ink);
}
#nav .links a:hover::after {
  transform: scaleX(1);
}
.act {
  display: flex;
  align-items: center;
  gap: 8px;
}
.act .si {
  padding: 12px 16px;
  font-size: 15px;
}
.act .si:hover {
  color: var(--blue);
}
.cart {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  position: relative;
  overflow: hidden;
}
.cart b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--blue);
  font: 500 12px "Geist Mono", monospace;
  transition: transform 0.4s var(--ease);
}
.cart:hover b {
  transform: scale(1.12);
}

/* ruler and guide */
#ruler {
  position: absolute;
  left: 0;
  top: 72px;
  width: 28px;
  height: 1600px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid rgba(18, 18, 20, 0.08);
  z-index: 15;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.8s var(--ease) 0.1s, transform 0.8s var(--ease) 0.1s;
}
.in #ruler {
  opacity: 1;
  transform: none;
}
#ruler i {
  position: absolute;
  right: 0;
  height: 1px;
  background: rgba(18, 18, 20, 0.22);
}
#ruler i.m {
  background: rgba(18, 18, 20, 0.4);
}
#ruler em {
  position: absolute;
  left: 3px;
  font: 400 9px "Geist Mono", monospace;
  color: rgba(18, 18, 20, 0.45);
  font-style: normal;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
#ruler .band {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(46, 71, 230, 0.12);
  transition: top 0.6s var(--ease), height 0.6s var(--ease);
}
#ruler .bl {
  color: var(--blue);
  font-weight: 500;
}
#readout {
  position: absolute;
  left: 0;
  width: 28px;
  height: 30px;
  margin-top: -15px;
  background: var(--blue);
  color: #fff;
  font: 500 9px "Geist Mono", monospace;
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
#guide {
  position: absolute;
  left: 28px;
  right: 0;
  height: 1px;
  background: var(--blue);
  opacity: 0;
  pointer-events: none;
  z-index: 14;
  transition: opacity 0.2s;
}
#guide::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--blue) 0 6px,
    transparent 6px 10px
  );
  opacity: 0;
}
.guiding #guide,
.guiding #readout {
  opacity: 1;
}
#guide span {
  position: absolute;
  right: 24px;
  top: 6px;
  font: 500 11px "Geist Mono", monospace;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 6px;
  border-radius: 4px;
}

/* copy */
#copy {
  position: absolute;
  left: 240px;
  z-index: 10;
  width: 720px;
}
h1 {
  font-weight: 600;
  font-size: 80px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
h1 .ln {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
h1 .ln > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
}
.in h1 .ln > span {
  transform: none;
}
h1 em {
  font-style: normal;
  color: var(--blue);
}
#copy p {
  font-size: 20px;
  line-height: 1.5;
  color: rgba(18, 18, 20, 0.66);
  max-width: 520px;
  margin-top: 40px;
}
.btns {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}
.fd {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.in .fd {
  opacity: 1;
  transform: none;
}
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 20px 28px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 17px;
  overflow: hidden;
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}
.btn:hover::before {
  transform: none;
}
.b1 {
  background: var(--blue);
  color: #fff;
}
.b1::before {
  background: var(--blue-d);
}
.b1 svg {
  transition: transform 0.55s var(--ease);
}
.b1:hover svg {
  transform: translateX(4px);
}
.b2 {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink);
  padding: 20px 28px;
  transition: color 0.55s var(--ease);
}
.b2::before {
  background: var(--ink);
}
.b2:hover {
  color: #fff;
}

/* iso scene */
#sceneWrap {
  z-index: 5;
}
#scene .box {
  cursor: pointer;
}
#scene .box .f {
  transition: fill 0.35s;
}
#scene text {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: 13px;
  pointer-events: none;
}
#paint polygon {
  pointer-events: none;
}
#sels .sel {
  fill-opacity: 0.07;
  stroke-width: 2;
  pointer-events: none;
}
#sels .sel.draw {
  animation: draw 0.7s var(--ease) forwards;
}
@keyframes draw {
  from {
    stroke-dashoffset: var(--len);
  }
  to {
    stroke-dashoffset: 0;
  }
}
.hdl {
  fill: #fff;
  stroke-width: 1.5;
  pointer-events: none;
  transition: opacity 0.3s;
}
#ghost {
  pointer-events: none;
  transition: opacity 0.4s;
}
#ghost .gl {
  stroke: var(--blue);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  fill: none;
  animation: march 1.2s linear infinite;
}
@keyframes march {
  to {
    stroke-dashoffset: -18;
  }
}
.ring {
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

/* windows */
.win {
  position: absolute;
  z-index: 12;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px -8px rgba(18, 18, 20, 0.14),
    inset 0 0 0 1px rgba(18, 18, 20, 0.06);
  padding: 16px;
  opacity: 0;
  transition: opacity 0.8s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
  user-select: none;
}
.win.on {
  opacity: 1;
}
.win:hover {
  box-shadow: 0 30px 70px -10px rgba(18, 18, 20, 0.2),
    inset 0 0 0 1px rgba(18, 18, 20, 0.08);
}
.win.drag {
  cursor: grabbing;
  box-shadow: 0 40px 80px -12px rgba(18, 18, 20, 0.24),
    inset 0 0 0 1.5px var(--blue);
}
.win .hd {
  cursor: grab;
}
.win hr {
  border: 0;
  height: 1px;
  background: rgba(18, 18, 20, 0.08);
  margin: 12px 0;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.row:first-of-type {
  margin-top: 0;
}
.row small {
  font: 400 11px "Geist Mono", monospace;
  letter-spacing: 0.02em;
  color: rgba(18, 18, 20, 0.5);
}
.row span {
  font-size: 13px;
  font-weight: 500;
}
.body {
  transition: opacity 0.25s;
}
.loading .body {
  opacity: 0;
}
.sk {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.loading .sk {
  opacity: 1;
}
.sk i {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #eeece7 0%, #f8f7f4 40%, #eeece7 80%);
  background-size: 200% 100%;
  animation: shim 1s linear infinite;
}
.sk i:nth-child(2) {
  width: 70%;
}
.sk i:nth-child(3) {
  width: 85%;
}
@keyframes shim {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
#wProd {
  left: 880px;
  top: 772px;
  width: 272px;
}
#wProd .hd {
  display: flex;
  gap: 12px;
  align-items: center;
}
#wProd .cv {
  width: 44px;
  height: 58px;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font: 600 8px/1.2 "Geist", sans-serif;
  padding: 6px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
  flex: none;
}
#wProd .cv svg {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 14px;
  height: 14px;
}
#wProd .kind {
  font: 500 10px "Geist Mono", monospace;
  letter-spacing: 0.06em;
  color: var(--pink);
}
#wProd .ttl {
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}
#wIns {
  left: 1448px;
  top: 140px;
  width: 232px;
}
#wIns .hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}
#wIns .st {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 10px "Geist Mono", monospace;
  color: rgba(18, 18, 20, 0.55);
}
#wIns .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  transition: background 0.4s;
  position: relative;
}
#wIns .dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
}
#wIns.placed .dot {
  background: var(--green);
}
#wIns.pulse .dot::after {
  color: var(--green);
  animation: pls 0.9s var(--ease);
}
@keyframes pls {
  from {
    opacity: 1;
    transform: scale(0.6);
  }
  to {
    opacity: 0;
    transform: scale(2.4);
  }
}
#fits {
  color: var(--blue);
}

/* cursors */
.cur {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
}
.cur.on {
  opacity: 1;
}
.cur svg {
  width: 22px;
  height: 22px;
  transition: transform 0.15s;
}
.cur.press svg {
  transform: scale(0.82);
}
.cur span {
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 4px 9px;
  border-radius: 6px 999px 999px 999px;
  white-space: nowrap;
}
#you {
  z-index: 26;
  transition: opacity 0.2s;
}
#you.on {
  opacity: 1;
}

/* edge tiles painted on the floor */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
/* homepage: hero nav carries the account state too */
#nav .acct {
  display: none;
}
.signed #nav .si:not(.acct) {
  display: none;
}
.signed #nav .acct {
  display: block;
}
.m-show {
  display: none;
}

/* desktop parity with Figma 12154:2 */
.p-rc .p-body {
  font-size: calc(16 * var(--u));
  font-weight: 400 !important;
}
.p-tile {
  width: calc(56 * var(--u));
  height: calc(56 * var(--u));
}
.p-price {
  padding-top: calc(32 * var(--u));
}
.p-add {
  padding: calc(10 * var(--u)) calc(16 * var(--u));
  gap: calc(8 * var(--u));
}
.p-svc {
  padding-top: calc(24 * var(--u));
  font-weight: 400 !important;
}
.p-svc:nth-child(5) {
  width: calc(264 * var(--u));
}
.p-unsure {
  margin-left: calc(-24 * var(--u));
}
.p-sact {
  margin-top: calc(8 * var(--u));
}
.p-q.open button {
  padding-bottom: calc(16 * var(--u));
}
.p-svc b,
.p-unsure b,
.p-unsure span {
  line-height: 1.4;
}
.p-qs {
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(18, 18, 20, 0.12);
}
.p-q {
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 rgba(18, 18, 20, 0.12);
}
/* v1.3 parity with Figma 12154:905 faq icons, 12154:847 not sure card, 12154:957 closing split */
.p-q .ic::before,
.p-q .ic::after {
  left: 22.7%;
  right: 22.7%;
  height: max(1px, calc(1.47 * var(--u)));
  margin-top: calc(-0.73 * var(--u));
}
.p-q.open .ic {
  color: var(--blue);
}
.p-unsure span {
  text-decoration: none;
}
.p-half .p-lab {
  opacity: 1;
}
.p-b4 {
  box-shadow: inset 0 0 0 1px #fff;
}
.m-br {
  display: none;
}
.p-break {
  overflow: hidden;
}
@media (min-width: 821px) {
  .p-q:first-child .a p {
    text-wrap: wrap;
  }
}
/* footer parity, local until the kit carries it (kit notes) */
.p-col a {
  line-height: 1.5;
}
.p-fb {
  padding-top: calc(80 * var(--u));
}
/* v1.3 footer 12158:84: currency selector 32 tall, padding 6 8 6 16; copyright line height 1.4 */
.p-fb > span {
  line-height: 1.4;
}
.p-cur > button {
  box-sizing: border-box;
  height: calc(32 * var(--u));
  padding: calc(6 * var(--u)) calc(8 * var(--u)) calc(6 * var(--u))
    calc(16 * var(--u));
}

/* mobile, Figma 12198:5546 (375 frame, 24 gutter, sections 40) */
@media (max-width: 820px) {
  .m-hide {
    display: none;
  }
  .m-show {
    display: inline;
  }
  /* hero: art band then copy band */
  #nav,
  #ruler,
  #you {
    display: none !important;
  }
  .home .p-nav {
    transform: none !important;
  }
  #hero {
    height: auto;
    padding-top: 64px;
    background: var(--ground);
  }
  #vp {
    position: relative;
    inset: auto;
    height: calc(100vw * 372 / 375);
  }
  #stage {
    left: 0;
    top: 0;
    transform-origin: 0 0;
  }
  #wProd {
    left: 972px;
    top: 689px;
  }
  #wIns {
    left: 1498px;
    top: 113px;
  }
  #copy {
    position: static;
    width: auto;
    padding: 40px 24px;
  }
  h1 {
    font-size: 40px;
  }
  h1 em {
    color: inherit;
  }
  #copy p {
    font-size: 18px;
    margin-top: 24px;
    max-width: none;
  }
  .btns {
    margin-top: 24px;
    gap: 12px;
  }
  .btns .btn {
    flex: 1 1 0;
    justify-content: center;
    font-size: 17px;
    padding: 20px 12px;
  }
  /* order: image break sits above the questions on mobile, Figma 12198:6653 */
  #main {
    display: flex;
    flex-direction: column;
  }
  #main > #faq {
    order: 1;
  }
  #main > #split {
    order: 2;
  }
  .m-br {
    display: inline;
  }
  .p-q .ic::before,
  .p-q .ic::after {
    height: 1.5px;
    margin-top: -0.75px;
  }
  /* shared section frame */
  .p-sec {
    padding: 40px 0;
  }
  .p-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
  }
  .p-ttl {
    gap: 24px;
  }
  .p-h2,
  .p-sr .p-h2,
  .p-half .p-h2 {
    font-size: 32px;
  }
  .p-lead,
  .p-half p {
    width: auto;
    font-size: 18px;
  }
  .p-btn:not(.p-bs) {
    font-size: 17px;
    padding: 20px 28px;
  }
  /* routes */
  .p-routes {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .p-media .p-img {
    height: 300px;
  }
  .p-rc {
    padding: 24px;
    gap: 16px;
  }
  .p-h3 {
    font-size: 24px;
  }
  .p-rc .p-body {
    font-size: 16px;
    font-weight: 400 !important;
  }
  .p-rc .p-btn {
    margin-top: 0;
  }
  /* categories: horizontal carousel, Figma 12198:6138 */
  .p-cats {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -24px;
    padding: 0 24px;
    scroll-padding: 0 24px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .p-cats::-webkit-scrollbar {
    display: none;
  }
  .p-cat {
    flex: 0 0 240px;
    gap: 32px;
    scroll-snap-align: start;
  }
  .p-cat:hover {
    transform: none;
  }
  .p-tile {
    width: 56px;
    height: 56px;
  }
  .p-price {
    padding-top: 32px;
  }
  /* products: one column, 4:3 cover */
  .p-prods {
    display: flex;
    flex-direction: column;
    overflow: visible;
    margin: 0;
    padding: 0;
    gap: 40px;
  }
  .p-prod {
    flex: none;
    gap: 4px;
  }
  .p-prod .top {
    gap: 12px;
  }
  .p-cover {
    aspect-ratio: 4/3;
  }
  .p-cover .pill {
    left: 8px;
    top: 8px;
  }
  .p-info .k,
  .p-info .p-body {
    display: none;
  }
  .p-info .t {
    font-size: 15px;
  }
  .p-buy {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(18, 18, 20, 0.72);
  }
  .p-buy .p-btn {
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--ink);
  }
  .p-buy .p-btn.added {
    color: #fff;
  }
  .p-dots {
    display: none;
  }
  /* studio: full bleed media on top */
  .p-sl {
    height: 360px;
  }
  .p-sel {
    left: 24px;
    top: 24px;
    right: 24px;
    bottom: 24px;
    width: auto;
    height: auto;
  }
  .p-sr {
    padding: 40px 24px;
    gap: 24px;
  }
  .p-svcs {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .p-svc {
    padding: 24px 0;
    gap: 8px;
    font-weight: 400 !important;
  }
  .p-svc:nth-child(5) {
    width: auto;
  }
  .p-unsure {
    margin: 24px 0 0;
    padding: 24px;
    gap: 16px;
  }
  .p-sact {
    margin-top: 0;
  }
  /* image break: photo only */
  .p-break {
    height: 240px;
  }
  .p-bsel,
  .p-break .p-tag,
  .p-break .p-bh {
    display: none;
  }
  /* questions */
  .p-faq {
    flex-direction: column;
    gap: 0;
  }
  .p-faq .p-ttl,
  .p-qs {
    width: auto;
  }
  .p-q button {
    font-size: 20px;
    padding: 32px 0;
  }
  .p-q.open button {
    padding-bottom: 16px;
  }
  .p-q .a p {
    width: auto;
    font-size: 16px;
    padding-bottom: 32px;
  }
  /* closing split */
  .p-half,
  .p-half + .p-half {
    width: 100%;
    padding: 40px 24px;
    gap: 24px;
  }
  .p-half .p-btn {
    margin-top: 0;
  }
  /* footer: Figma footer / mobile, no currency selector */
  #cur {
    display: none;
  }
  .p-foot {
    padding: 40px 0 32px;
  }
  .p-ft {
    gap: 40px;
  }
  .p-brand {
    gap: 16px;
  }
  .p-cols {
    gap: 32px;
  }
  .p-col a {
    white-space: nowrap;
    line-height: 23px;
  }
  /* v1.3 footer / mobile 12198:6537: logo row 26, payment row 22 */
  .p-brand .lg {
    height: 26px;
  }
  .p-util,
  .p-pay {
    height: 22px;
  }
  .p-fb {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
    margin-top: 40px;
    padding-top: 40px;
  }
}
