/* Home page: hero (the working building), demo, steps, features, FAQ teaser, CTA. */

/* hero */
.hero { padding-block: clamp(28px, 4.4vw, 64px) 0; }
.hero-copy { --h1: clamp(2.9rem, 5.7vw, 7.4rem); display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px clamp(24px, 4vw, 72px); align-items: start; }
/* the lede's first baseline sits on the headline's first baseline: eyebrow + its gap + 0.765 of the h1 size, less the lede's own first-baseline drop */
.hero-side { padding-top: calc(0.78rem * 1.3 + 18px + var(--h1) * 0.765 - 1.02rem * 1.15); }
.hero h1 { font-size: var(--h1); line-height: 0.9; letter-spacing: -0.025em; margin-top: 18px; }
.hero-side .lede { font-size: 1.02rem; margin-bottom: 22px; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.hero-stage-wrap { margin-top: clamp(24px, 3vw, 40px); }
.hero-stage { position: relative; margin: 0; aspect-ratio: 1672 / 941; background: var(--paper-2); }
.hero-stage > img { width: 100%; height: 100%; object-fit: cover; }
.hero-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-stage .u polygon {
  fill: transparent; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke;
  transition: fill 180ms var(--ease), stroke 180ms var(--ease);
}
.hero-stage .u.on polygon, .hero-stage .u:focus-visible polygon { fill: rgba(251, 246, 238, 0.42); stroke: var(--paper); stroke-width: 3; }
.hero-stage .u.sold polygon { fill: rgba(29, 42, 34, 0.3); }
.hero-stage .u.sold.on polygon { fill: rgba(29, 42, 34, 0.42); stroke: var(--paper); }
.hero-stage .u:focus { outline: none; }
.hero-stage .pin { fill: var(--available); stroke: var(--paper); stroke-width: 3; vector-effect: non-scaling-stroke; }
.hero-stage .reserved .pin { fill: var(--reserved); }
.hero-stage .sold .pin { fill: var(--sold); }

/* the hover card, same build as the buyer page's .card */
.h-card {
  position: absolute; z-index: 2; left: var(--x, 59.2%); top: var(--y, 35.9%); min-width: 214px;
  background: var(--paper); color: var(--ink); border-radius: 3px; pointer-events: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 14px 34px -12px rgba(20, 28, 22, 0.45);
  padding: 12px 14px; transform: translate(-50%, calc(-100% - 14px));
  animation: rise 220ms var(--ease) both;
}
.h-card .c-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.h-card .c-unit { font: 500 1.4rem/1 var(--serif); }
.h-card .c-level { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.h-card .c-meta { margin-top: 6px; font-size: 0.8rem; color: var(--ink-2); }
.h-card .c-price { margin-top: 8px; font-weight: 600; font-size: 0.95rem; font-variant-numeric: lining-nums tabular-nums; display: flex; align-items: center; gap: 8px; }
.badge { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--available); }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.reserved { color: var(--reserved); }
.badge.sold { color: var(--sold); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, calc(-100% - 6px)); } }
/* placed by hero.js in pixels beside its home (above, below or to a side), always inside the picture */
.h-card.placed { left: var(--px); top: var(--py); transform: none; animation-name: settle; }
@keyframes settle { from { opacity: 0; translate: 0 4px; } }
.h-card.placed::after {
  content: ''; position: absolute; width: 10px; height: 10px; background: var(--paper); rotate: 45deg;
  left: var(--tip-x, 50%); top: var(--tip-y, 50%); margin: -5px 0 0 -5px; box-shadow: 2px 2px 3px -2px rgba(20, 28, 22, 0.25);
}
.h-card[data-side="above"]::after { top: 100%; }
.h-card[data-side="below"]::after { top: 0; box-shadow: none; }
.h-card[data-side="right"]::after { left: 0; }
.h-card[data-side="left"]::after { left: 100%; }

.hero-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 10px; font-size: 0.8rem; color: var(--ink-2); }
.hero-cap p { margin: 0; }

@media (max-width: 900px) {
  .hero-copy { grid-template-columns: 1fr; --h1: clamp(2.9rem, 9.4vw, 5.6rem); }
  .hero-side { padding-top: 0; }
  .hero-side .lede { max-width: 60ch; }
}
@media (max-width: 640px) {
  .hero-stage-wrap { padding-inline: 0; }
  .hero-cap { padding-inline: var(--gutter); }
  .hero-stage .pin { display: none; }
  /* a 390 px building leaves no room beside a home: the card sits under the picture as a caption card */
  .hero-stage { aspect-ratio: auto; background: none; }
  .hero-stage > img { height: auto; aspect-ratio: 1672 / 941; }
  .hero-stage svg { bottom: auto; height: auto; aspect-ratio: 1672 / 941; }
  .h-card, .h-card.placed { position: relative; left: auto; top: auto; display: inline-block; margin: 14px var(--gutter) 0; transform: none; animation: none; min-width: 0; white-space: nowrap; box-shadow: none; border: 1px solid var(--line); }
  .h-card.placed::after { display: none; }
  .ctas .btn { flex: 1 1 100%; }
}

/* section rhythm */
.demo, .steps-sec, .gets, .faq-sec { padding-top: var(--sec); }
.sec-head { max-width: 46rem; margin-bottom: var(--sub); }
.sec-head h2 { margin: 14px 0 18px; }

/* demo */
.shot { margin: 0; }
.shot img { border: 1px solid var(--line); background: var(--paper-2); }
.shot figcaption { margin-top: 12px; font-size: 0.92rem; color: var(--ink-2); max-width: 46ch; }
.shot figcaption b { color: var(--ink); font-weight: 600; }
.shot-wide { width: min(100%, 980px); }
.shots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px);
  margin-top: clamp(-120px, -8vw, -40px); padding-left: clamp(0px, 22vw, 360px); position: relative;   /* the panels overlap the hover shot: one walkthrough */
}
.shots .shot img { box-shadow: 0 1px 0 rgba(20, 28, 22, 0.06), 0 24px 48px -28px rgba(20, 28, 22, 0.55); }
.shots .shot:nth-child(2) { transform: translateY(clamp(16px, 3vw, 44px)); }
.shots .shot:nth-child(3) { transform: translateY(clamp(32px, 6vw, 88px)); }
.live { margin-top: clamp(80px, 9vw, 140px); display: grid; gap: 20px; }
.live-copy h3 { margin-bottom: 6px; }
.live-frame { border: 1px solid var(--line); background: var(--paper-2); }
.live-frame iframe { display: block; width: 100%; height: min(86svh, 900px); border: 0; }
.strip {
  list-style: none; margin: clamp(48px, 6vw, 80px) 0 14px; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.strip li span { display: block; margin-top: 8px; font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.strip img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* steps */
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; padding: 22px clamp(12px, 2vw, 28px) 26px 0; border-right: 1px solid var(--line); }
.steps li + li { padding-left: clamp(12px, 2vw, 28px); }
.steps li:last-child { border-right: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 400 clamp(3rem, 5vw, 4.6rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--ink); margin-bottom: 18px; }
.steps h3 { font-size: 1.35rem; margin-bottom: 10px; }
.steps p { color: var(--ink-2); font-size: 1rem; margin: 0; }
.steps a { color: var(--signal); text-underline-offset: 3px; display: inline-block; padding-block: 10px; }

/* what developers get */
.gets-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 96px); align-items: start; }
.gets .sec-head { position: sticky; top: calc(var(--bar-h) + 32px); }
.gets-list { margin: 0; border-top: 1px solid var(--ink); }
.gets-list div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.gets-list dt { font: 500 1.45rem/1.15 var(--serif); }
.gets-list dd { margin: 0; color: var(--ink-2); font-size: 1rem; }

/* faq (shared look with faq.html) */
.faq-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 96px); align-items: start; }
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 14px 0; font: 500 1.3rem/1.2 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.6rem/1 var(--sans); color: var(--signal); flex: none; transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 0 0 20px; max-width: 62ch; }
.faq details a { color: var(--signal); text-underline-offset: 3px; display: inline-block; padding-block: 8px; }

/* closing call to action */
.cta { margin-top: var(--sec); background: var(--paper-2); border-block: 1px solid var(--line); }
.cta-in { padding-block: clamp(56px, 8vw, 120px); }
.cta h2 { font-size: clamp(2.4rem, 5.6vw, 5.6rem); max-width: 16ch; margin-bottom: 20px; }
.cta + .foot, main:has(.cta) + .foot { margin-top: 0; }

@media (max-width: 1100px) {
  .shots { padding-left: 0; margin-top: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li:nth-child(3) { padding-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip li:nth-child(n+4) { display: none; }
}
@media (max-width: 900px) {
  .gets-in, .faq-in { grid-template-columns: 1fr; }
  .gets .sec-head { position: static; }
}
.carousel-nav { display: none; }
@media (max-width: 640px) {
  /* the three panels become a carousel: one at a time, same height, swipe or arrows; the page never scrolls sideways */
  .shots { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-top: 28px; padding: 0; }
  .shots::-webkit-scrollbar { display: none; }
  .shots .shot { flex: 0 0 100%; scroll-snap-align: start; padding-inline: 2px; }
  .shots .shot img { width: 100%; aspect-ratio: 460 / 600; object-fit: cover; object-position: top; box-shadow: 0 1px 0 rgba(20, 28, 22, 0.06), 0 18px 36px -24px rgba(20, 28, 22, 0.45); }
  .shots .shot:nth-child(2), .shots .shot:nth-child(3) { transform: none; }
  .shots .shot figcaption { margin-top: 14px; min-height: 4.8em; }
  .carousel-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
  .carousel-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--field-line); border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; transition: transform 140ms var(--ease), border-color 140ms; }
  .carousel-btn:active { transform: scale(0.96); }
  .carousel-btn:disabled { opacity: 0.35; cursor: default; }
  .carousel-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .carousel-dots { display: flex; gap: 2px; }
  .carousel-dot { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
  .carousel-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--field-line); transition: background-color 160ms, transform 160ms var(--ease); }
  .carousel-dot[aria-current="true"]::before { background: var(--ink); transform: scale(1.25); }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-right: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .gets-list div { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip li:nth-child(n+4) { display: block; }
  .strip li:first-child { grid-column: 1 / -1; }
  .live-frame iframe { height: 80svh; }
}
@media (min-width: 1101px) { .shot-wide figcaption { max-width: min(46ch, calc(22vw - 24px)); } }

/* the demos: six featured in an even grid, the rest one click away */
.demos { padding-top: var(--sec); }
.demo-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) clamp(16px, 2.2vw, 32px); margin-bottom: var(--sub); }
.demo-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.demo-card-img { display: block; overflow: hidden; background: var(--paper-2); }
.demo-card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 500ms var(--ease); }
.demo-kind { margin: 16px 0 8px; font: 500 0.75rem/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); font-variant-numeric: lining-nums; }
.demo-name { font: 400 clamp(1.7rem, 2.3vw, 2.2rem)/1.05 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.demo-place { margin: 6px 0 10px; color: var(--ink-2); font-size: 0.95rem; }
.demo-line { color: var(--ink-2); font-size: 0.95rem; max-width: 44ch; }
.demo-go { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--signal); font-weight: 500; font-size: 0.92rem; }
.demo-go::after { content: '→'; transition: transform 300ms var(--ease); }
.demo-card-link:hover .demo-card-img img, .demo-card-link:focus-visible .demo-card-img img { transform: scale(1.035); }
.demo-card-link:hover .demo-go::after, .demo-card-link:focus-visible .demo-go::after { transform: translateX(4px); }
.demo-card-link:hover .demo-go { text-decoration: underline; text-underline-offset: 4px; }
.demo-more-row { display: flex; justify-content: center; margin-bottom: var(--sub); }
.demos-note { max-width: 70ch; }
@media (max-width: 1100px) { .demo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .demo-cards { grid-template-columns: 1fr; } .demo-more-row .btn { flex: 1 1 100%; } }
.nw { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* country filter for the demos */
.country-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 clamp(28px, 4vw, 44px); }
.country-filter button {
  min-height: 44px; padding: 0 18px; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--field-line); background: transparent; color: var(--ink); font: 500 0.88rem/1 var(--sans);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.country-filter button:hover { border-color: var(--ink); }
.country-filter button:active { transform: scale(0.97); }
.country-filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.demo-fallback { columns: 2 280px; padding-left: 1.1em; }
.demo-fallback a { color: var(--signal); display: inline-block; padding-block: 8px; }

/* ---------- phones: calmer and roomier ---------- */
@media (max-width: 640px) {
  .hero-copy { --h1: clamp(2.6rem, 11vw, 3.2rem); gap: 14px; }
  .hero h1 { margin-top: 12px; }
  .hero .lede { font-size: 1.02rem; }
  .hero-cap p { font-size: 0.85rem; }
  .sec-head h2, .demos h2 { font-size: clamp(1.9rem, 8.4vw, 2.4rem); line-height: 1.05; }
  .sec-head .lede { font-size: 1rem; }
  .country-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .country-filter[hidden] { display: none; }
  .country-filter button { width: 100%; padding-inline: 6px; }
  .demo-cards { gap: 44px; }
  .demo-line { display: none; }   /* kind, name and place say enough on a phone; the demo says the rest */
  .strip { display: none; }   /* the carousel above already shows the inside of a demo */
  .demo-card h3 { font-size: 1.9rem; }
  .steps li::before { font-size: 2.2rem; margin-bottom: 10px; }
  .steps li { padding-block: 20px 22px; }
  .cta h2 { font-size: clamp(2.1rem, 9vw, 2.6rem); }
}
