/* ============================================================
   CityFrame — home page sections. Loaded after base.css.
   ============================================================ */

/* ---------- Header: a floating white pill, like the app's tab bar ---------- */
.site-header {
  position: relative;
  z-index: 40;
  padding-top: 12px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.site-nav {
  display: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

@media (min-width: 760px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .site-nav {
    display: flex;
    gap: 4px;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 8vw, 104px);
}

.hero .container {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 10.5vw, 44px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 34ch;
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 18px;
}

.hero .badges {
  margin-top: 24px;
}

.terms-line {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 15px;
}

.qr {
  display: none;
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(300px, 100%);
}

.sample-label {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* A screenshot in an iPhone body: dark bezel, screen corners, Dynamic
   Island. Sizes are fractions of the phone's width (iPhone 16 Pro: 402 pt
   wide, 55 pt screen corners, island 126 × 37 pt at 11 pt from the top), so
   the phone scales as one piece. The captures carry the status bar but not
   the island, which is drawn here. */
.shot {
  position: relative;
  display: block;
  container-type: inline-size;
  padding: 3.4%;
  border-radius: 16.2% / 7.74%;
  background: #0d111c;
  box-shadow: inset 0 0 0 1px #2b3247, 0 1px 2px rgba(13, 17, 28, 0.12), 0 24px 48px -12px rgba(13, 17, 28, 0.28);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13.7% / 6.3%;
  background: var(--surface);
}

.shot::after {
  content: "";
  position: absolute;
  top: 5.95cqw;
  left: 50%;
  width: 28.9cqw;
  height: 8.5cqw;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

/* Until a capture exists the slot keeps its size and says what goes there. */
.shot.empty {
  display: grid;
  place-items: center;
  aspect-ratio: 1206 / 2622;
  color: #a6afca;
  font-size: 14px;
  text-align: center;
}

/* Phones: only the top of the hero screen, so it reaches the first view. */
@media (max-width: 759px) {
  .hero-visual .shot {
    padding-bottom: 0;
    border-radius: 16.2% 16.2% 0 0 / 14.1% 14.1% 0 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent);
    mask-image: linear-gradient(to bottom, #000 80%, transparent);
  }

  .hero-visual .shot img {
    border-radius: 13.7% 13.7% 0 0 / 11.45% 11.45% 0 0;
  }
}


@media (min-width: 760px) {
  .hero .container {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 48px;
  }

  .hero h1 {
    font-size: clamp(48px, 6.2vw, 84px);
  }

  .lede {
    font-size: 20px;
  }

  .hero-visual {
    width: 340px;
  }
}

@media (min-width: 900px) {
  .qr {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    color: var(--ink-3);
    font-size: 14px;
  }

  .qr svg {
    width: 88px;
    height: 88px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-y) 0;
}

.section.on-surface {
  background: var(--surface);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  max-width: 16ch;
}

.section-head p {
  max-width: 54ch;
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 82%);
  gap: 20px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  list-style: none;
}

.steps > li {
  display: grid;
  align-content: start;
  gap: 18px;
  scroll-snap-align: start;
}

.step-text p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.steps .shot {
  width: 240px;
}

/* Step 3 is the live web page the crew opens. */
.browser {
  width: min(320px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--ground);
  box-shadow: var(--shadow);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 13px;
}

.browser-bar span {
  flex: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ground);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser .demo {
  max-height: 520px;
  padding: 4px 16px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, #000 86%, transparent);
  font-size: 15px;
}

.browser .plan-title {
  font-size: 28px;
}

.browser .join-preview {
  width: 100%;
  margin: 16px 0 20px;
}

.caption {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}

@media (min-width: 1024px) {
  .steps {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}

/* ---------- Light ---------- */
.light-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.light-grid .shot {
  width: 260px;
  justify-self: center;
}


.day-list {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.day-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 2px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--surface);
}

.day-list time {
  grid-row: span 2;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.day-list strong {
  font-weight: 600;
}

.day-list span {
  color: var(--ink-2);
  font-size: 15px;
}

@media (min-width: 900px) {
  .light-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: 64px;
  }
}

/* ---------- Spots ---------- */
.spots-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.cities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cities li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--surface);
  font-weight: 500;
}

.cities span {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.aesthetics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.aesthetics li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 500;
}

.map-figure {
  justify-self: center;
  margin: 0;
}

.map-figure .shot {
  width: 260px;
}

.map-figure figcaption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink-2);
}

.map-figure b {
  color: var(--ink);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (min-width: 900px) {
  .spots-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 64px;
  }
}

/* ---------- Questions ---------- */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0;
}

.faq div {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.faq dt {
  font-size: 18px;
  font-weight: 600;
}

.faq dd {
  margin: 8px 0 0;
  color: var(--ink-2);
}

/* ---------- Close and footer ---------- */
.close {
  text-align: center;
}

.close h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.close .badges {
  justify-content: center;
  margin-top: 28px;
}

.site-footer {
  padding: 32px 0 calc(32px + var(--sticky-space, 0px));
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 15px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
}

/* ---------- Sticky bar on phones (shown by script only) ---------- */
.sticky-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -6px 20px rgba(13, 17, 28, 0.06);
  transform: translateY(110%);
  transition: transform 0.3s var(--ease);
}

.sticky-cta.shown {
  transform: none;
}

.sticky-cta .button {
  width: 100%;
}

body.has-sticky {
  --sticky-space: 76px;
}

@media (min-width: 760px) {
  .sticky-cta {
    display: none;
  }

  body.has-sticky {
    --sticky-space: 0px;
  }
}

/* ---------- Motion: the HTML is already the final state ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-visual {
    animation: arrive 0.8s var(--ease) 0.15s both;
  }

  @supports (animation-timeline: view()) {
    .light-section .lightbar .track {
      animation: daylight linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 50%;
    }
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Generous top inset: the stop markers stand above the bar. */
@keyframes daylight {
  from {
    clip-path: inset(-80px 100% -40px -20px);
  }

  to {
    clip-path: inset(-80px -40px -40px -20px);
  }
}

/* A screenshot cut short on purpose (see scripts/build-screens.js). */
.shot.cropped {
  padding-bottom: 0;
  border-radius: 16.2% 16.2% 0 0 / 13.3% 13.3% 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, #000 82%, transparent);
}

.shot.cropped img {
  border-radius: 13.7% 13.7% 0 0 / 10.8% 10.8% 0 0;
}
