/* placeslayered — clean, Apple-inspired theme */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #d2d2d7;
  --accent: #1d1d1f;        /* buttons & links — black & white theme */
  --accent-hover: #000000;
  --dark: #000000;
  --dark-ink: #f5f5f7;
  --radius: 22px;
  --radius-sm: 12px;
  --nav-h: 48px;
  --wrap: 1040px;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main { outline: none; min-height: 70vh; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Nav (frosted, like apple.com) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.nav-inner {
  max-width: var(--wrap); height: var(--nav-h); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
/* Logo: a black "pl" tile with two layers stacked under it, plus the wordmark.
   --t is the tile size; the layers are offset box-shadows. The tile alone is the app icon. */
.logo {
  --t: 26px;
  display: inline-flex; align-items: center; gap: calc(var(--t) * .5); color: var(--ink);
  line-height: 1; padding: 0 calc(var(--t) * .16) calc(var(--t) * .16) 0;
}
.logo:hover { text-decoration: none; }
.logo-tile {
  width: var(--t); height: var(--t); flex: none; border-radius: calc(var(--t) * .2);
  display: grid; place-items: center; background: #1d1d1f; color: #fff;
  font-size: calc(var(--t) * .5); font-weight: 700; letter-spacing: -0.04em;
  box-shadow: calc(var(--t) * .08) calc(var(--t) * .08) 0 #6e6e73, calc(var(--t) * .16) calc(var(--t) * .16) 0 #c7c7cc;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.logo:hover .logo-tile {        /* layers fan out a little on hover */
  transform: translate(calc(var(--t) * -.04), calc(var(--t) * -.04));
  box-shadow: calc(var(--t) * .12) calc(var(--t) * .12) 0 #6e6e73, calc(var(--t) * .24) calc(var(--t) * .24) 0 #c7c7cc;
}
.logo-word { font-size: calc(var(--t) * .72); font-weight: 600; letter-spacing: -0.035em; }
.logo-lg { --t: 36px; margin-bottom: 14px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink); font-size: 13px; opacity: .8; transition: opacity .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav-links a[aria-current="page"] { font-weight: 600; }

.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -12px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease), top .35s var(--ease); }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 21.5px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21.5px; transform: rotate(-45deg); }

.sheet {
  position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top)) 0 0 0; z-index: 49;
  background: var(--bg);
  padding: 24px 40px;
  animation: sheetIn .35s var(--ease);
}
.sheet nav { display: flex; flex-direction: column; }
.sheet a { color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; padding: 8px 0; }
.sheet a:hover { text-decoration: none; color: var(--ink-2); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Cart icon, badge, toast, paper airplane ---------- */
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-cart { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); }
.nav-cart svg { width: 22px; height: 22px; }
.nav-cart:hover { text-decoration: none; opacity: .7; }
.cart-count {
  position: absolute; top: 6px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600;
  display: grid; place-items: center; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: badgePop .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes badgePop { 0% { transform: scale(.4); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }

.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(var(--nav-h) + env(safe-area-inset-top) + 10px);
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 14px;
  background: rgba(29, 29, 31, .92); color: #f5f5f7; font-size: 14px; line-height: 1.35;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  transform: translate(-50%, -12px); opacity: 0; transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast a { color: #fff; text-decoration: underline; margin-left: 6px; white-space: nowrap; }

.plane { position: fixed; left: 0; top: 0; z-index: 70; width: 30px; height: 30px; pointer-events: none; will-change: transform; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .18)); }
.plane svg { width: 100%; height: 100%; display: block; }

/* ---------- Ribbon ---------- */
.ribbon { background: var(--bg-alt); text-align: center; padding: 12px var(--gutter); font-size: 14px; color: var(--ink); }
.ribbon strong { font-weight: 600; }

/* ---------- Type ---------- */
.eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: -0.01em; }
.eyebrow.copper { color: var(--ink-2); }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.07; font-weight: 700; }
.display { font-size: clamp(40px, 9vw, 80px); }
.headline { font-size: clamp(32px, 6vw, 56px); }
.title { font-size: clamp(26px, 4.5vw, 40px); }
.sub { font-size: clamp(19px, 2.6vw, 24px); line-height: 1.3; color: var(--ink-2); font-weight: 400; letter-spacing: -0.015em; margin: 12px 0 0; }
.center { text-align: center; }

/* ---------- Buttons & links ---------- */
.actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 980px; border: 0;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 400; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }
.btn-block { width: 100%; }
.more { font-size: 17px; }
.more::after { content: " ›"; }
.tile .more { color: var(--accent); }
.tile:hover .more { text-decoration: underline; }
.on-dark .more, .on-dark a { color: #ffffff; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 0; text-align: center; overflow: hidden; }
.hero .display { padding: 0 var(--gutter); }
.hero-media { margin: 40px auto 0; max-width: 1200px; padding: 0 var(--gutter); }
.hero-media img, .hero-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.hero-media { transform: scale(calc(.86 + var(--p, 0) * .14)); transform-origin: 50% 0; will-change: transform; }
@media (max-width: 600px) {
  .hero { padding-top: 40px; }
  .hero-media { padding: 0 12px; }
  .hero-media img, .hero-media video { aspect-ratio: 4 / 3; }
}

/* Hero load-in */
.hero > .eyebrow, .hero .display, .hero > .sub, .hero > .actions { animation: rise 1.1s var(--ease) both; }
.hero .display { animation-delay: .08s; }
.hero > .sub { animation-delay: .18s; }
.hero > .actions { animation-delay: .28s; }
.hero-media { animation: fadeIn 1.4s var(--ease) .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes fadeIn { from { opacity: 0; } }

/* Word-by-word reveal */
.words-section { padding: 96px 0 40px; }
.words { margin: 0 auto; max-width: 860px; text-align: center; font-size: clamp(30px, 5.4vw, 56px); line-height: 1.12; font-weight: 700; letter-spacing: -0.035em; }
.words span { opacity: .16; transition: opacity .15s linear; }

/* Exploded layers (pinned while scrolling) */
.story { height: 480vh; height: 480svh; position: relative; }
.story-sticky {
  position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h));
  overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 28px var(--gutter);
}
.story-title { font-size: clamp(44px, 9vw, 96px); text-align: center; opacity: 0; position: relative; z-index: 2; }
.story-stage { position: relative; width: 100%; display: grid; place-items: center; perspective: 1800px; }
.story-stage video { width: min(100%, 900px); max-height: 100%; object-fit: contain; }
.story-stage.has-video .stack { display: none; }
.stack {
  --size: min(66vw, 46vh, 440px);
  position: relative; width: var(--size); height: var(--size);
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--t, 0) * 58deg)) rotateZ(calc(var(--t, 0) * -40deg + var(--p, 0) * 14deg)) scale(calc(1 - var(--t, 0) * .12));
  will-change: transform;
}
.plate { position: absolute; inset: 0; border-radius: 6px; backface-visibility: hidden; }
.plate-base { background: #1d1d1f; transform: translateZ(calc(var(--s, 0) * var(--size) * -.32)); box-shadow: 0 30px 60px rgba(0, 0, 0, .2); }
.plate-mid {
  background-color: #e8e8ed;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 22px, #fff 22px 26px),
    repeating-linear-gradient(90deg, transparent 0 34px, #fff 34px 38px),
    linear-gradient(32deg, transparent 47%, #fff 47% 53%, transparent 53%);
  opacity: calc(.15 + var(--s, 0) * .85);
}
.plate-top {
  background-size: cover; background-position: center;
  transform: translateZ(calc(var(--s, 0) * var(--size) * .32));
  box-shadow: 0 24px 50px rgba(0, 0, 0, .16);   /* fixed: a shadow that changes every frame is costly to repaint */
  /* fades from the color photo to a white model base */
  filter: grayscale(var(--w, 0)) brightness(calc(1 + var(--w, 0) * .3)) contrast(calc(1 - var(--w, 0) * .45));
}
.plate-top::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #f2f2f4; opacity: calc(var(--w, 0) * .82); }

/* White 3D city that rises from the top plate */
.city {
  position: absolute; inset: 0; transform-style: preserve-3d; visibility: hidden;
  transform: translateZ(calc(var(--s, 0) * var(--size) * .32 + 1px));
}
.city-on .city { visibility: visible; }
.blk, .bld { position: absolute; transform-style: preserve-3d; --H: calc(var(--size) * var(--h)); }
.blk { transform: scaleZ(clamp(.001, var(--r, 0), 1)); }
.bld { transform: translateZ(calc(var(--size) * .025 * var(--r, 0))) scaleZ(clamp(.001, (var(--b, 0) - var(--dl)) * 3, 1)); }
.blk i, .bld i { position: absolute; display: block; }
.blk .t, .bld .t { inset: 0; transform: translateZ(var(--H)); }
.blk .n, .bld .n { left: 0; bottom: 100%; width: 100%; height: var(--H); transform-origin: 50% 100%; transform: rotateX(-90deg); }
.blk .s, .bld .s { left: 0; top: 100%; width: 100%; height: var(--H); transform-origin: 50% 0; transform: rotateX(90deg); }
.blk .e, .bld .e { top: 0; left: 100%; height: 100%; width: var(--H); transform-origin: 0 50%; transform: rotateY(-90deg); }
.blk .w, .bld .w { top: 0; right: 100%; height: 100%; width: var(--H); transform-origin: 100% 50%; transform: rotateY(90deg); }
/* Frame that floats down onto the finished model (home story) */
.sframe {
  --fd: calc(var(--size) * .1);
  position: absolute; inset: calc(var(--size) * -.06); transform-style: preserve-3d; visibility: hidden;
  transform: translateZ(calc(var(--size) * (1 - var(--f, 0)) * .8));
}
.frame-on .sframe { visibility: visible; }
.sframe i { position: absolute; display: block; opacity: calc(var(--f, 0) * 4); }
.sframe .t { inset: 0; transform: translateZ(var(--fd)); border: calc(var(--size) * .06) solid #1d1d1f; box-sizing: border-box; }
.sframe .n { left: 0; bottom: 100%; width: 100%; height: var(--fd); transform-origin: 50% 100%; transform: rotateX(-90deg); background: #3a3a3c; }
.sframe .s { left: 0; top: 100%; width: 100%; height: var(--fd); transform-origin: 50% 0; transform: rotateX(90deg); background: #000; }
.sframe .e { top: 0; left: 100%; height: 100%; width: var(--fd); transform-origin: 0 50%; transform: rotateY(-90deg); background: #111; }
.sframe .w { top: 0; right: 100%; height: 100%; width: var(--fd); transform-origin: 100% 50%; transform: rotateY(90deg); background: #2c2c2e; }

.blk .t { background: #f7f7f9; }
.bld .t { background: #ffffff; }
.blk .n, .bld .n { background: #fbfbfd; }
.blk .w, .bld .w { background: #ececf0; }
.blk .e, .bld .e { background: #d4d4da; }
.blk .s, .bld .s { background: #c4c4cb; }
.story-caps { position: relative; width: 100%; max-width: 560px; min-height: 3.2em; text-align: center; }
.cap { position: absolute; inset: 0; margin: 0; opacity: 0; font-size: clamp(19px, 2.6vw, 24px); line-height: 1.3; color: var(--ink-2); letter-spacing: -0.015em; }
.cap b { color: var(--ink); font-weight: 600; }

/* Tile image parallax */
.tile-media img { transform: translateY(var(--py, 0)) scale(var(--hs, 1.08)); transform-origin: 50% 50%; }
@media (min-width: 761px) { .tile-media img { will-change: transform; } }

/* Phones: live frosted-glass blur is redone on every scroll frame and is a big cause of lag,
   so the top bar, menu, bottom bar and toast use solid backgrounds instead. */
@media (max-width: 860px) {
  .nav, .sheet, .buy { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(255, 255, 255, .97) !important; }
  .toast { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(29, 29, 31, .96); }
}
.tile:hover .tile-media img { --hs: 1.11; }

/* ---------- Tiles (alternating light/dark blocks) ---------- */
.tiles { display: grid; gap: 12px; padding: 12px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--bg-alt); color: var(--ink);
  text-align: center; padding: 48px 24px 0;
  display: flex; flex-direction: column; min-height: 560px;
}
.tile:hover { text-decoration: none; }
.tile.on-dark { background: var(--dark); color: var(--dark-ink); }
.tile.on-dark .sub { color: #a1a1a6; }
.tile-media { margin-top: auto; padding-top: 28px; }
.tile-media img { width: 100%; max-width: 720px; margin: 0 auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px 16px 0 0; transition: transform .8s var(--ease); }
@media (min-width: 900px) {
  .tiles.two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .tiles { padding: 12px 0; gap: 12px; }
  .tile { border-radius: 0; min-height: 0; padding-top: 40px; }
}

/* ---------- Section ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.page-head { padding-top: 48px; padding-bottom: 28px; }
.page-head .sub { max-width: 640px; }
.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.crumbs a { color: var(--ink-2); }

/* ---------- Card grid ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: block; color: var(--ink); border-radius: var(--radius); background: var(--bg-alt); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e8e8ed; }
.card-body { padding: 16px 20px 20px; }
.card-body h3 { font-size: 21px; letter-spacing: -0.025em; line-height: 1.2; }
.card-body p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.card-body .more { display: inline-block; margin-top: 10px; font-size: 15px; color: var(--accent); }
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { border-radius: 16px; }
  .card-body { padding: 10px 12px 14px; }
  .card-body h3 { font-size: 16px; }
  .card-body p, .card-body .more { display: none; }
}
.group-title { font-size: 24px; margin: 40px 0 16px; letter-spacing: -0.03em; }
.group-title:first-child { margin-top: 0; }

/* Coming soon list */
.soon-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.soon-list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.soon-list span { color: var(--ink-2); font-size: 15px; text-align: right; }

/* ---------- Product ---------- */
.product { display: grid; gap: 40px; grid-template-columns: 1.25fr 1fr; padding: 32px 0 72px; align-items: start; }
.product-visual { position: sticky; top: calc(var(--nav-h) + 24px); }

/* Preview stage: a 3D scene the "camera" moves through (see makeScene in app.js) */
@property --d { syntax: '<length>'; inherits: true; initial-value: 0px; }
.stage {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, #fbfbfd 0%, #f0f0f3 60%, #e6e6ea 100%);
}
.cam { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.cam-zoom { left: 50%; top: 46%; z-index: 1; }

.block {
  position: absolute; transform-style: preserve-3d;
  --d: calc(var(--u) * .03);
  transition: --d .8s cubic-bezier(.65, 0, .35, 1), opacity .5s ease, transform .6s ease, visibility 0s linear 0s;
}
.extruded .block { --d: calc(var(--u) * .12); }
/* Hidden prints shrink and fade, then are hidden for real: iPhone Safari doesn't apply opacity to
   the 3D faces inside a block, so without visibility: hidden they'd stay on screen. */
.block.off {
  opacity: 0; transform: scale(.8); visibility: hidden; pointer-events: none;
  transition: --d .8s cubic-bezier(.65, 0, .35, 1), opacity .5s ease, transform .5s ease, visibility 0s linear .5s;
}
.block > div { position: absolute; }
.base { inset: 0; background: #e9e9ec; box-shadow: 0 24px 48px rgba(0, 0, 0, .16), 0 4px 10px rgba(0, 0, 0, .08); }
.top { inset: 0; transform: translateZ(var(--d)); overflow: hidden; background: #fff; }
.top img { width: 100%; height: 100%; object-fit: cover; }
.top img.is-white { filter: grayscale(1) brightness(1.2) contrast(.82) !important; }

/* White sides of the block */
.side, .fs { backface-visibility: visible; }
.side.n, .fs.n { left: 0; bottom: 100%; width: 100%; transform-origin: 50% 100%; transform: rotateX(-90deg); }
.side.s, .fs.s { left: 0; top: 100%; width: 100%; transform-origin: 50% 0; transform: rotateX(90deg); }
.side.e, .fs.e { top: 0; left: 100%; height: 100%; transform-origin: 0 50%; transform: rotateY(-90deg); }
.side.w, .fs.w { top: 0; right: 100%; height: 100%; transform-origin: 100% 50%; transform: rotateY(90deg); }
.side.n, .side.s { height: var(--d); }
.side.e, .side.w { width: var(--d); }
.side.n { background: #ffffff; } .side.w { background: #f5f5f7; }
.side.e { background: #e3e3e8; } .side.s { background: #d6d6dc; }

/* During the frame animation the photo turns white and a model city rises out of it.
   --w = white, --r = blocks/roads, --b = buildings; animated by toggling .city-up. */
@property --w { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --r { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --b { syntax: '<number>'; inherits: true; initial-value: 0; }
.stage {
  --w: 0; --r: 0; --b: 0;
  transition: --b .8s ease-in, --r .5s ease .6s, --w .6s ease .9s;   /* sinking back */
}
.stage.city-up {
  --w: 1; --r: 1; --b: 1;
  transition: --w .7s ease, --r .6s ease .5s, --b 1.6s linear .9s;  /* rising */
}
.top::after { content: ""; position: absolute; inset: 0; background: #f2f2f4; opacity: calc(var(--w) * .82); pointer-events: none; }
.top img { filter: grayscale(var(--w)) brightness(calc(1 + var(--w) * .3)); }
.block .city {
  inset: 0; transform-style: preserve-3d; transform: translateZ(calc(var(--d) + 1px));
  visibility: hidden; transition: visibility 0s linear 1.4s;
}
.stage.city-up .block .city { visibility: visible; transition: none; }

/* Frame: a black box that drops down around the block */
.frm {
  --fd: calc(var(--u) * .15);
  position: absolute; inset: calc(var(--u) * -.07); transform-style: preserve-3d;
  transform: translateZ(calc(var(--u) * 1.9));
  transition: transform .9s cubic-bezier(.55, 0, .9, .4);
}
.frm > div { position: absolute; opacity: 0; transition: opacity .5s ease .4s; }
.frm-top { inset: 0; transform: translateZ(var(--fd)); border: calc(var(--u) * .07) solid #1d1d1f; box-sizing: border-box; }
.fs.n, .fs.s { height: var(--fd); }
.fs.e, .fs.w { width: var(--fd); }
.fs.n { background: #3a3a3c; } .fs.w { background: #2c2c2e; }
.fs.e { background: #111; } .fs.s { background: #000; }
/* Shipping box for add-to-cart: walls rise around the focused print, lid drops, box shrinks away */
.parcel {
  --ph: calc(var(--s) * .3);
  position: absolute; inset: calc(var(--s) * -.1); transform-style: preserve-3d; visibility: hidden; pointer-events: none;
}
.boxing .block.focus .parcel { visibility: visible; }
.pwalls { position: absolute; inset: 0; transform-style: preserve-3d; transform: scaleZ(.001); transition: transform .6s cubic-bezier(.34, 1.3, .5, 1); }
.boxing .focus .pwalls { transform: scaleZ(1); }
.pwalls i { position: absolute; display: block; }
.pwalls .n { left: 0; bottom: 100%; width: 100%; height: var(--ph); transform-origin: 50% 100%; transform: rotateX(-90deg); background: #f5f5f7; }
.pwalls .s { left: 0; top: 100%; width: 100%; height: var(--ph); transform-origin: 50% 0; transform: rotateX(90deg); background: #d2d2d7; }
.pwalls .e { top: 0; left: 100%; height: 100%; width: var(--ph); transform-origin: 0 50%; transform: rotateY(-90deg); background: #c7c7cc; }
.pwalls .w { top: 0; right: 100%; height: 100%; width: var(--ph); transform-origin: 100% 50%; transform: rotateY(90deg); background: #e8e8ed; }
.plid {
  position: absolute; inset: 0; background: #fbfbfd; opacity: 0;
  transform: translateZ(calc(var(--s) * 1.4));
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), opacity .25s ease;
}
.plid::after { content: ""; position: absolute; top: 0; bottom: 0; left: 44%; width: 12%; background: #1d1d1f; }  /* tape */
.lidded .focus .plid { opacity: 1; transform: translateZ(var(--ph)); }
.shipped .block.focus { transform: scale(.02); opacity: 0; transition: transform .4s cubic-bezier(.55, 0, 1, .45), opacity .4s ease .05s; }
.reset-parcel .parcel, .reset-parcel .parcel * { transition: none !important; }

.framed .frm { transform: translateZ(0); transition: transform 1.6s cubic-bezier(.22, 1, .36, 1); }
.framed .frm > div { opacity: 1; transition: opacity .35s ease; }

.dim {
  position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; margin: 0; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: 0;
}

.frame-icon { width: 18px; height: 18px; flex: none; border-radius: 2px; }
.frame-icon.none { border: 1.5px dashed #86868b; }
.frame-icon.frame { border: 4px solid #1d1d1f; background: #fff; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 6px #c7c7cc; }
.choice:disabled { opacity: .35; cursor: not-allowed; }
.choice:disabled:hover { border-color: var(--line); }
.buy-note strong { color: var(--ink); font-size: 17px; }
.buy-ask { display: block; margin-top: 12px; font-size: 14px; color: var(--ink-2); text-align: center; }
.btn[disabled] { opacity: .55; }

/* ---------- Install page ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px; }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.step:nth-child(even) .step-art { order: 2; }
.step-art svg { width: 100%; height: auto; display: block; }
.step-text .title { margin-bottom: 12px; }
.step-text p { margin: 0 0 12px; color: var(--ink-2); font-size: 17px; }
.step-text strong { color: var(--ink); }
.methods { display: grid; gap: 12px; }
.method { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 16px 18px; }
.method h3 { font-size: 17px; margin: 0 0 4px; letter-spacing: -0.02em; }
.method p { margin: 0; font-size: 15px; }
.hang-link { display: inline-block; margin-top: 12px; font-size: 15px; color: var(--ink); }
@media (max-width: 760px) {
  .steps { gap: 40px; }
  .step { grid-template-columns: 1fr; gap: 16px; }
  .step:nth-child(even) .step-art { order: 0; }
}
@media (max-width: 860px) { .product-info .hang-link { order: 11; } }

/* ---------- Architectural models ---------- */
@property --b { syntax: '<number>'; inherits: true; initial-value: 0; }
.arch-hero { padding: 48px 0 0; overflow: hidden; }
.arch-stage { height: clamp(400px, 64vw, 640px); display: grid; place-items: center; perspective: 1600px; overflow: hidden; }
.arch-stage-tile { height: clamp(340px, 52vw, 520px); margin-top: auto; }
.arch-stage .arch-model { margin-top: calc(var(--size) * .42); }   /* sit low so the tall tower and antennas fit */
.arch-model {
  --size: min(64vw, 400px); --b: 0;
  position: relative; width: var(--size); height: var(--size); transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-38deg);
}
.arch-hero .arch-model, .tile.in .arch-model { animation: archRise 2.2s cubic-bezier(.2, .7, .3, 1) .3s both, archSpin 40s linear infinite; }
@keyframes archRise { from { --b: 0; } to { --b: 1; } }
@keyframes archSpin { from { transform: rotateX(58deg) rotateZ(-38deg); } to { transform: rotateX(58deg) rotateZ(322deg); } }
.arch-ground { position: absolute; inset: 0; background: #f5f5f7; border-radius: 6px; box-shadow: 0 30px 70px rgba(0, 0, 0, .12); }
.tile .arch-ground { background: #fff; }
/* floor lines on the sides of the tower and wings */
.arch-model .floors .n, .arch-model .floors .s, .arch-model .floors .e, .arch-model .floors .w {
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--size) * .018), rgba(0, 0, 0, .09) calc(var(--size) * .018) calc(var(--size) * .021));
}
.arch-model .tree .t { background: #e8e8ed; border-radius: 50%; }
.arch-model .tree .n, .arch-model .tree .s, .arch-model .tree .e, .arch-model .tree .w { background: #d8d8de; }
.arch-model .plaza .t { background: #ececf0; }
.arch-caption { text-align: center; margin: -8px 0 0; font-size: 13px; color: var(--ink-2); }

/* Model cards and pages */
.mgrid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mgrid-single { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.mcard { display: block; color: var(--ink); background: var(--bg-alt); border-radius: var(--radius); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.mcard:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }
.mcard-art { height: 220px; padding: 20px 20px 4px; display: grid; place-items: center; }
.mcard-single .mcard-art { height: 240px; }
.model-svg { width: 100%; height: 100%; display: block; }
.model-stage { aspect-ratio: 1 / 1; border-radius: var(--radius); padding: 8%; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 30%, #fbfbfd 0%, #f0f0f3 60%, #e6e6ea 100%); }
.model-stage.lift .model-svg { animation: modelLift .9s var(--ease); }
@keyframes modelLift { 30% { transform: translateY(-4%) scale(1.03); } 60% { transform: scale(.94); opacity: .6; } 100% { transform: none; opacity: 1; } }
.model-credit { margin: 8px 0 0; font-size: 12px; color: var(--ink-2); text-align: center; }
.model-credit a, .foot-copy a { color: inherit; text-decoration: underline; }
@media (max-width: 860px) { .product-model .model-credit { display: none; } }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--bg-alt); border-radius: 980px; padding: 7px 14px; font-size: 14px; }
.chips a { color: var(--ink); }
.cart-thumb-model { padding: 6px; background: var(--bg-alt); }
.cart-thumb-model .model-svg { width: 100%; height: 100%; }
@media (max-width: 600px) {
  .mgrid { grid-template-columns: 1fr; gap: 12px; }
  .mgrid-single { grid-template-columns: 1fr 1fr; }
  .mcard-art { height: 180px; padding: 14px 14px 2px; }
  .mcard-single .mcard-art { height: 170px; }
}
@media (max-width: 860px) {
  .product-model .model-stage { aspect-ratio: auto; height: 100%; border-radius: 0; padding: 4% 8%; }
}

.kinds { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kind { background: var(--bg-alt); border-radius: var(--radius); padding: 28px; }
.kind h3 { font-size: 21px; letter-spacing: -0.025em; margin: 0 0 6px; }
.kind p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; gap: 40px; grid-template-columns: 1fr 340px; align-items: start; }
.cart-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-thumb { display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--bg-alt); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb.is-white img { filter: grayscale(1) brightness(1.2) contrast(.82); }
.cart-thumb.is-framed { box-shadow: inset 0 0 0 6px #1d1d1f; }
.cart-thumb.is-framed img { padding: 6px; }
.cart-name { display: block; color: var(--ink); font-weight: 600; font-size: 17px; }
.cart-meta { margin: 4px 0 10px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 980px; }
.qty button { width: 36px; height: 34px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty span { min-width: 22px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.cart-price { text-align: right; display: grid; gap: 6px; justify-items: end; }
.cart-price strong { font-size: 17px; }
.cart-remove, .cart-clear { border: 0; background: none; padding: 0; color: var(--ink-2); font-size: 13px; cursor: pointer; text-decoration: underline; }
.cart-clear { justify-self: center; margin-top: 4px; }
.cart-summary { position: sticky; top: calc(var(--nav-h) + 24px); background: var(--bg-alt); border-radius: var(--radius); padding: 24px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; margin-bottom: 8px; }
.cart-total strong { font-size: 24px; letter-spacing: -0.02em; }
.cart-empty { padding: 8px 0 40px; }
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; gap: 24px; }
  .cart-summary { position: static; }
  .cart-item { grid-template-columns: 76px 1fr auto; gap: 12px; }
  .cart-thumb { width: 76px; height: 76px; }
}
.product-info h1 { font-size: clamp(32px, 5vw, 48px); }
.product-info .sub { font-size: 19px; }

.option { margin-top: 28px; }
.option-label { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.option-label span { font-weight: 400; color: var(--ink-2); }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.choice {
  min-height: 56px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg); cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 10px; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.choice:hover { border-color: #86868b; }
.choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice small { display: block; color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.swatch { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch.color { background: conic-gradient(#c45c26 0 33%, #f3f1ec 0 66%, #C60C30 0); }
.swatch.white { background: #fff; }

.buy { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.buy-note { font-size: 14px; color: var(--ink-2); margin: 0 0 12px; }

@media (max-width: 860px) {
  .product { grid-template-columns: 1fr; gap: 14px; padding-top: 0; padding-bottom: 110px; }
  /* Phones: preview stays pinned under the nav so every option change is visible,
     and the options are compact enough to fit on one screen. */
  .page-product-crumbs { display: none; }
  .product-visual {
    position: sticky; top: var(--nav-h); z-index: 5;
    height: 34vh; height: 34svh; min-height: 210px;
    margin: 0 calc(-1 * var(--gutter));
  }
  .stage { border-radius: 0; aspect-ratio: auto; height: 100%; }
  .dim { bottom: 6px; }
  .product-info { display: flex; flex-direction: column; }
  .product-info .eyebrow { order: 9; font-size: 12px; margin: 22px 0 0; }   /* location + blurb move below the options */
  .product-info h1 { font-size: 22px; }
  .product-info .sub { order: 10; font-size: 16px; margin-top: 4px; }
  .option { margin-top: 10px; }
  .option-label { font-size: 13px; margin-bottom: 4px; }
  .choices { grid-template-columns: 1fr 1fr; gap: 8px; }
  .choice { min-height: 44px; padding: 6px 12px; font-size: 14px; }
  .choice small { display: inline; margin-left: 6px; }
  .choice > span:not([class]) { display: flex; align-items: baseline; }
  .buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0, 0, 0, .08);
    display: flex; align-items: center; gap: 14px;
  }
  .buy-note { margin: 0; flex: 1; font-size: 13px; line-height: 1.3; }
  .buy .btn { width: auto; flex: none; min-width: 132px; }
  .buy-ask { display: none; }   /* phones: keep the bar to price + Add to cart */
}

/* ---------- Forms / custom ---------- */
.form { display: grid; gap: 16px; max-width: 640px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .search input {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  padding: 14px 16px; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 0, 0, .1); }
.hint { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }

.picker { max-width: 640px; margin-bottom: 8px; }
.search { display: flex; gap: 10px; margin-bottom: 12px; }
.search .btn { flex: none; }
.map-frame { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; background: var(--bg-alt); touch-action: none; isolation: isolate; z-index: 0; }
.map-frame .leaflet-container { position: absolute; inset: 0; font: inherit; background: #e8e8ed; }
.map-square {
  position: absolute; z-index: 500; pointer-events: none;
  top: 15%; left: 15%; width: 70%; height: 70%;
  border: 2px solid var(--accent); border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25);
}
.readout { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.readout .warn { color: #C60C30; }
.readout span:last-child { color: var(--ink-2); }
.done { background: var(--bg-alt); border-radius: var(--radius); padding: 28px; max-width: 640px; }

/* ---------- About / me ---------- */
.prose { max-width: 680px; font-size: 19px; }
.prose p { margin: 0 0 18px; }
.prose .lead { font-size: clamp(24px, 3.5vw, 32px); line-height: 1.25; font-weight: 600; letter-spacing: -0.03em; }
.me { max-width: 440px; margin: 0 auto; padding: 40px var(--gutter) 64px; text-align: center; }
.me img { width: 100%; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .15); }
.seg { display: inline-flex; background: var(--bg-alt); border-radius: 980px; padding: 3px; margin: 20px 0; }
.seg button { border: 0; background: none; padding: 8px 18px; border-radius: 980px; cursor: pointer; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); font-weight: 600; }
.me .actions { flex-direction: column; align-items: stretch; }
.status { min-height: 1.4em; font-size: 14px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.foot { background: var(--bg-alt); color: var(--ink-2); font-size: 12px; padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.foot p { margin: 0 0 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.foot-links a { color: var(--ink); opacity: .8; }
.foot-copy { margin-top: 10px !important; }
.page-product + .foot, body.has-buybar .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 861px) { body.has-buybar .foot { padding-bottom: 24px; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.page-enter { animation: pageIn .5s var(--ease); }
@keyframes pageIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
