/* The app page (DESIGN.md section 7). The hero is a patch of the liquid, dark in both system modes.
   Everything below it sits on the plain page and follows the system.
   Shared pieces (the phone frame, the screens strip, the inset list) come from parts.css. */
@import url('parts.css');

.app-page {
  --bb-bg: var(--page);
  --bb-surface: var(--page-2);
  --bb-text: var(--text);
  --bb-text-2: var(--text-2);
  --hub: #3D6BF0;

  --gutter: var(--page-inset);
  background: var(--page);
  color: var(--text);
}

.app-page main {
  padding: 0;
}

.app-page .foot {
  font-size: 17px;
  border-top-color: var(--line);
}

.app-page .foot-made {
  font-size: 17px;
}

.app-page .foot-lockup {
  min-height: 44px;
}

.app-page .foot-links a {
  min-width: 44px;
  justify-content: center;
}

.app-page .group-row-title {
  font-size: 19px;
}

/* ---- Hero: copy first, the phone below it on phones and on the right on desktop ---- */

.app-hero {
  /* The liquid is dark in both system modes, so the hero carries its own colours. */
  --text: var(--liquid-ink);
  --text-2: var(--liquid-ink-2);
  --line: var(--liquid-line);
  --focus: #5B8CFF;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: var(--sp-7);
  padding: var(--sp-9) var(--page-inset) var(--sp-8);
  background: var(--liquid-base);
  color: var(--liquid-ink);
  color-scheme: dark;
}

.app-hero-copy,
.app-hero-art {
  position: relative;
  z-index: 1;
}

.app-hero-copy {
  display: grid;
  gap: 20px;
  align-content: start;
  justify-items: start;
  max-width: 36rem;
}

.app-hero-icon {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  view-transition-name: app-tile;
}

.app-hero-icon img {
  width: 100%;
  height: 100%;
}

.app-hero h1 {
  color: var(--liquid-ink);
}

.app-tagline {
  color: var(--liquid-ink-2);
}

.app-oneliner {
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--liquid-ink-2);
}

.app-status {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.app-page .store-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 17px;
}

.app-page .store-link {
  background: var(--text);
  color: var(--page);
}

.app-page .app-hero .store-link {
  background: var(--liquid-ink);
  color: var(--liquid-base);
}

.hero-phone {
  position: relative;
  height: min(460px, 56svh);
  aspect-ratio: 1080 / 2400;
  margin-inline: auto;
}

.hero-phone .app-phone {
  height: 100%;
}

.hero-phone .app-phone .app-phone-img,
.hero-phone .app-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The phone rises once; the sheet of liquid slides off it and is clipped as it leaves. */
html.motion .hero-phone {
  opacity: 0;
  transform: translateY(40px) scale(0.92);
}

html.motion .hero-phone.is-risen {
  opacity: 1;
  transform: none;
  transition: transform var(--dur-rise) var(--ease-out), opacity 500ms var(--ease-out);
}

html.motion .hero-phone .phone-sheet {
  transform: translateY(0);
  clip-path: inset(0 0 0 0 round 44px);
  transition: transform 1000ms var(--ease-in-out) 200ms, clip-path 1000ms var(--ease-in-out) 200ms;
}

html.motion .hero-phone.is-risen .phone-sheet {
  transform: translateY(105%);
  clip-path: inset(0 0 100% 0 round 44px);
}

@media (min-width: 900px) {
  .app-hero {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: var(--sp-8);
    min-height: min(100svh, 860px);
    padding: var(--sp-10) var(--page-inset) var(--sp-9);
  }

  .hero-phone {
    height: min(620px, 64svh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-hero-icon {
    view-transition-name: none;
  }
}

/* ---- Shared section rhythm ---- */

.app-section {
  padding: 72px var(--gutter);
}

@media (min-width: 900px) {
  .app-section {
    padding: 112px var(--gutter);
  }
}

.app-section > h2 {
  margin-bottom: 20px;
  color: var(--text);
}

.app-intro {
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-2);
  margin-bottom: 32px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
}

/* ---- Numbers: four real figures, no count-up ---- */

.app-numbers {
  padding-top: 64px;
  padding-bottom: 64px;
}

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

.number {
  display: grid;
  gap: 8px;
  align-content: start;
}

.number-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.number-label {
  font-size: 17px;
  color: var(--text-2);
}

@media (min-width: 900px) {
  .numbers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---- Screens: a native scroll-snap strip on every width ---- */

.app-screens-section {
  padding-left: 0;
  padding-right: 0;
}

.app-screens {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 8px var(--gutter) 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.app-screens .screens {
  width: max-content;
  gap: 32px;
}

.app-screens .screen {
  flex: 0 0 min(300px, 72vw);
  width: min(300px, 72vw);
  scroll-snap-align: start;
}

.app-screens .app-phone,
.app-screens picture,
.app-screens img {
  width: 100%;
}

.app-screens .screen-cap {
  max-width: none;
}

/* ---- Where your data lives: three panels, stacked on phones ---- */

.data-panels {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.data-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bb-surface);
}

/* The one you control. A border in the accent colour, and the heading says so too. */
.data-panel--control {
  border-color: var(--bb-accent);
}

.data-panel h3 {
  color: var(--text);
}

.data-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.data-list li {
  position: relative;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
}

.data-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-2);
}

.data-note {
  font-size: 17px;
  color: var(--text-2);
}

.data-exception {
  margin-top: 32px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
  max-width: 60ch;
}

.data-exception strong {
  font-weight: 600;
}

@media (min-width: 900px) {
  .data-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- What it isn't: a plain list ---- */

.limits {
  display: grid;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  max-width: 760px;
}

.limits li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  line-height: 1.45;
  color: var(--text);
}

/* ---- Questions: a single column of closed rows. Each question is a details summary. ---- */

.faq {
  display: grid;
  max-width: 760px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary h3 {
  margin: 0;
  color: var(--text);
}

/* The plus turns into a cross when the row is open. */
.faq-item summary::after {
  content: "+";
  flex: none;
  width: 24px;
  height: 24px;
  font-size: 24px;
  line-height: 24px;
  text-align: center;
  color: var(--text-2);
}

.faq-item[open] summary::after {
  rotate: 45deg;
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item summary::after {
    transition: rotate 160ms ease;
  }
}

.faq-item p {
  padding-bottom: 20px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
}

/* ---- Closing call to action: centred, after the questions ---- */

.app-closing {
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}

.app-closing > h2 {
  margin-bottom: 0;
}

.app-closing .app-intro {
  margin-bottom: 0;
}

.app-closing .app-status {
  justify-content: center;
}

/* A strip of still liquid, from edge to edge. */
.app-closing .liquid-strip {
  justify-self: stretch;
  margin-inline: calc(-1 * var(--page-inset));
}

/* ---- Documents: the inset list ---- */

.app-docs .group {
  max-width: 760px;
}

/* ---- The phone frame on dark: a little lighter than the page so its edge reads ---- */

.app-page .app-phone {
  background: #0B0D13;
  border-color: #262B36;
}

