/* Home page only, on top of site.css: the split opening with its cascade of floating objects,
   the how-it-goes bento, the pricing bento, the two screens and the install section. */

/* ---------- hero: editorial split, z-axis cascade ---------- */

.hero__body {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  align-items: center; padding-block: clamp(40px, 6vw, 96px) clamp(48px, 6vw, 88px);
}
.hero__text { grid-column: 1 / span 6; }
.hero__title { font-size: clamp(4rem, 1.4rem + 9vw, 10rem); line-height: 0.86; letter-spacing: -0.06em; }
/* On phones the guide link moves up into the eyebrow's place, as a pill of its own. */
.hero__flag {
  display: none; align-items: center; gap: 10px; width: fit-content;
  padding: 4px 4px 4px 14px; border-radius: 999px;
  background: var(--c-surface); color: var(--c-ink); text-decoration: none;
  font-size: var(--step-small); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--c-hair), 0 10px 24px -14px rgb(15 46 59 / 0.35);
}
.hero__flag-icon { display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 999px; background: rgb(15 46 59 / 0.06); font-size: 0.875rem; }
.hero__flag + h1 { margin-top: 24px; }
.hero__lead { margin-top: 32px; max-width: 30ch; color: var(--c-muted); }
.hero__acts { margin-top: 40px; }
.hero__note { margin-top: 24px; max-width: 42ch; color: var(--c-muted); }

.hero__demo { grid-column: 7 / span 6; margin: 0; }
.hero__frame { position: relative; aspect-ratio: 5 / 4; overflow: hidden; border-radius: var(--r-core); background: var(--c-ground); box-shadow: var(--bezel); }
.hero__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__demo figcaption { margin-top: 22px; max-width: 46ch; color: var(--c-muted); }

.hero__index { padding-bottom: clamp(56px, 7vw, 96px); }
.hero__index ol { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.hero__index a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--c-tray); box-shadow: inset 0 0 0 1px var(--c-hair);
  font-size: var(--step-small); font-weight: 500; color: var(--c-ink); text-decoration: none;
  transition: background-color var(--t-hover) var(--spring), transform var(--t-hover) var(--spring), box-shadow var(--t-hover) var(--spring);
}
@media (hover: hover) and (pointer: fine) {
  .hero__index a:hover { background: var(--c-surface); transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--c-hair), 0 10px 20px -12px rgb(15 46 59 / 0.35); }
}

/* ---------- how it goes: the bento ---------- */

.how__intro .head { max-width: 12ch; }
.how__intro .lead { margin-top: 24px; max-width: 40ch; }
.bento {
  list-style: none; margin: clamp(56px, 7vw, 96px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px);
}
.bento > .card { display: flex; flex-direction: column; min-width: 0; }
.bento__a { grid-column: 1 / span 7; grid-row: span 2; }
.bento__b { grid-column: 8 / span 5; }
.bento__c { grid-column: 8 / span 5; }
.bento__d { grid-column: 1 / -1; flex-direction: row !important; align-items: center; gap: var(--gutter); overflow: hidden; padding-bottom: 0 !important; }
.bento__n { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--c-ground-2); box-shadow: inset 0 0 0 1px var(--c-hair); font-size: 0.8125rem; font-weight: 600; color: var(--c-deep); font-variant-numeric: tabular-nums; }
.bento h3 { margin-top: 20px; font-size: clamp(1.625rem, 1.25rem + 1.2vw, 2.375rem); line-height: 1; letter-spacing: -0.045em; }
.bento p { margin-top: 12px; color: var(--c-muted); max-width: 44ch; }
.bento__pic { margin: auto 0 0; padding-top: 28px; }
.bento__pic img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1.25rem; box-shadow: inset 0 0 0 1px var(--c-hair); }
.bento__a .bento__pic img { aspect-ratio: 4 / 3.4; }
.bento__pic--short img { aspect-ratio: 16 / 8; }
.bento__pic--screen img { background: var(--c-night); }
.bento__pic figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--c-muted); }
.bento__d-text { flex: 1 1 50%; padding-bottom: clamp(24px, 3vw, 44px); }
.bento__tray { position: relative; flex: 0 0 42%; align-self: stretch; min-height: 340px; border-radius: 1.5rem 1.5rem 0 0; background: var(--c-ground); box-shadow: inset 0 0 0 1px var(--c-hair); overflow: hidden; }
.bento__tray img { position: absolute; left: 50%; top: 32px; width: min(62%, 240px); height: auto; transform: translateX(-50%) rotate(-3deg); filter: drop-shadow(0 30px 40px rgb(15 46 59 / 0.25)); }

/* ---------- pricing ---------- */

.pricing__grid { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.pricing__plus { grid-column: 1 / span 7; grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.pricing__plus .lead { color: rgb(250 250 250 / 0.75); max-width: 30ch; }
.pricing__big { margin-top: 8px; font-size: clamp(4.5rem, 2rem + 8vw, 9rem); font-weight: 800; line-height: 0.85; letter-spacing: -0.06em; color: #fff; }
.pricing__act { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.pricing__act .small { color: rgb(250 250 250 / 0.6); }
.pricing__side { grid-column: 8 / span 5; }
.pricing__side h3 { margin-top: 22px; font-size: clamp(1.625rem, 1.25rem + 1.2vw, 2.375rem); line-height: 1; letter-spacing: -0.045em; }
.pricing__side p:not(.eyebrow) { margin-top: 12px; color: var(--c-muted); }

/* ---------- every screen ---------- */

.every { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.every__card { display: flex; flex-direction: column; gap: 28px; }
.every__card--web { grid-column: span 8; }
.every__card--phone { grid-column: span 4; }
.every__screen { overflow: hidden; border-radius: 1.25rem; background: var(--c-night); box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.12); }
.every__screen img { display: block; width: 100%; height: auto; }
.every__tray { position: relative; flex: 1; min-height: 340px; overflow: hidden; border-radius: 1.25rem; background: var(--c-ground); box-shadow: inset 0 0 0 1px var(--c-hair); }
.every__tray img { position: absolute; left: 50%; top: 28px; width: min(70%, 240px); height: auto; transform: translateX(-50%); filter: drop-shadow(0 30px 40px rgb(15 46 59 / 0.25)); }
.every__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: auto; }
.every__foot h3 { font-size: var(--step-lead); letter-spacing: -0.03em; }

/* ---------- install ---------- */

.install h2 { max-width: 12ch; }
.install__cmd { margin-top: 48px; }
.install .code { margin-top: 16px; }
.install .code pre { display: flex; align-items: center; min-height: 4.25rem; font-size: clamp(0.9rem, 0.75rem + 0.6vw, 1.25rem); }
.install__after { margin-top: clamp(56px, 7vw, 96px); align-items: center; }
.install__steps { grid-column: 1 / span 6; }
.install__steps p + p { margin-top: 16px; }
.install__steps p:not(.lead) { color: var(--c-muted); }
.install__pic { grid-column: 8 / span 5; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .every__tray img, .bento__tray img { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes lift { from { translate: 0 6%; } to { translate: 0 -4%; } }

/* ---------- tablet ---------- */

@media (max-width: 1080px) {
  .hero__text { grid-column: 1 / -1; }
  .hero__demo { grid-column: 1 / span 10; margin-top: 56px; }
  .bento__a { grid-column: 1 / -1; grid-row: auto; }
  .bento__b, .bento__c { grid-column: span 6; }
  .pricing__plus { grid-column: 1 / -1; grid-row: auto; }
  .pricing__side { grid-column: span 6; }
  .every__card--web { grid-column: span 7; }
  .every__card--phone { grid-column: span 5; }
}

/* ---------- phone: one column, no tilt, no overlap ---------- */

@media (max-width: 767px) {
  .hero__body { display: block; padding-top: 32px; }
  .hero__title { font-size: 26vw; }
  .hero__acts .btn { width: 100%; justify-content: space-between; }
  .hero__eyebrow, .hero__guide, .hero__index { display: none; }
  .hero__flag { display: inline-flex; }
  .hero__body { padding-bottom: 72px; }
  .hero__demo { margin-top: 48px; }

  .bento { display: flex; flex-direction: column; gap: 24px; }
  .bento__d { flex-direction: column !important; align-items: stretch; }
  .bento__d-text { padding-bottom: 0; }
  .bento__tray { min-height: 300px; margin-inline: -4px; }

  .pricing__grid { display: flex; flex-direction: column; gap: 24px; }
  .pricing__act .btn { width: 100%; justify-content: space-between; }

  .every { display: flex; flex-direction: column; gap: 24px; }
  .every__tray { min-height: 360px; }

  .install .code pre { min-height: 3.5rem; font-size: var(--step-small); }
  .install .code code { white-space: pre-wrap; word-break: break-all; }
  .install__after { display: block; }
  .install__pic { margin-top: 48px; }
}
