/* Landing page styles (scoped by class names used only on new.leaf) */

/* Typography and rhythm */
:root {
  --landing-accent: var(--accent);
  --landing-radius: 18px;
  --landing-radius-icon: 22%;
  --landing-shadow: var(--shadow);
  --landing-shadow-hover: 0 18px 48px rgba(0, 0, 0, 0.20);
  --landing-gap-lg: 40px;
  --landing-gap: 24px;
  --landing-gap-sm: 12px;
}

@media (prefers-color-scheme: light) {
  :root { --landing-bg: var(--bg); --landing-text: var(--label); --landing-muted: var(--label-muted); --landing-border: var(--border); --landing-card: var(--card); --landing-card-tint: var(--card-tint); }
}

@media (prefers-color-scheme: dark) {
  :root { --landing-bg: var(--bg); --landing-text: var(--label); --landing-muted: var(--label-muted); --landing-border: var(--border); --landing-card: var(--card); --landing-card-tint: var(--card-tint); }
}

/* Constrain readable width a bit more than pico's container */
main.container {
  max-width: 900px;
}

/* ---------- Full-bleed gradient band & hero ---------- */
.band-hero {
  position: relative;
  padding: 72px 0 24px;
  margin: 0 0 32px 0;
}

.band-hero::before {
  content: "";
  position: absolute;
  inset: 0 -50vw 0 -50vw; /* bleed to full viewport width */
  z-index: -1;
  border-bottom-left-radius: 36px;
  border-bottom-right-radius: 36px;
  background: radial-gradient(1200px 600px at 80% 0%, rgba(10,132,255,0.12), transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(255,159,10,0.10), transparent 60%),
              linear-gradient(180deg, rgba(142, 151, 255, 0.08), transparent 60%);
}

@media (prefers-color-scheme: dark) {
  .band-hero::before {
    background: radial-gradient(1200px 600px at 80% 0%, rgba(10,132,255,0.18), transparent 60%),
                radial-gradient(900px 500px at 0% 0%, rgba(255,159,10,0.16), transparent 60%),
                linear-gradient(180deg, rgba(142, 151, 255, 0.10), transparent 60%);
  }
}

.hero {
  text-align: center;
}

.hero-title {
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.1;
  margin: 0;
}

/* ---------- Cards and split layout ---------- */
/* Section cards */
.app-card {
  margin-block: 80px;
  padding: 28px 28px;
  background: var(--landing-card);
  border-radius: 22px;
  box-shadow: var(--landing-shadow);
  overflow: visible;
}

.app-content > h2,
.app-content > h3 { margin: 0 0 6px 0; }
.app-content > p { margin: 0 0 var(--landing-gap) 0; color: var(--landing-muted); }

/* Icon + content layout */
.app-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 44px;
  align-items: center;
  overflow: visible;
}

.icon-tile {
  display: inline-grid;
  place-items: center;
  padding: 14px; /* breathing room for shadow */
  overflow: visible;
}

.icon-tile > img.app-icon {
  display: block;
  width: var(--app-icon-size, 180px);
  height: var(--app-icon-size, 180px);
  border-radius: 0; /* use image's own rounded mask/border */
  filter: drop-shadow(0 22px 26px rgba(0,0,0,0.18)) drop-shadow(0 8px 10px rgba(0,0,0,0.12));
}

/* Optional wrapper variant used on the landing page to avoid filter artifacts */
.icon-shadow {
  display: inline-block;
  border-radius: 28px;
  box-shadow: 0 18px 36px rgba(0,0,0,0.20), 0 6px 14px rgba(0,0,0,0.12);
}

.icon-shadow > img.app-icon {
  border-radius: inherit;
  filter: none; /* wrapper supplies the shadow */
}

.app-content ul {
  margin: 0 0 var(--landing-gap) 0;
}

.vt-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--landing-gap);
}

.appstore-badge img {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

/* ---------- App hero: the app on its devices, then which app it is ---------- */
/* The device image leads, and the icon shrinks to a mark beside the name: a visitor sees the app on
   the iPhone and Apple Watch they own before reading a word, and the icon still says which app it is.
   The images are transparent PNGs from `tools/screenshot-captions.swift --hero`, so the card's own
   light or dark colour shows through. Apple's product-image rules forbid shadows on the devices, so
   nothing here filters the image. */
.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "media title"
    "media body";
  column-gap: 44px;
  align-items: start;
}

/* An app page's feature list runs far past the image, so there it sits at the top beside the name;
   a homepage card's copy is about the image's height, so there it centres. */
.app-hero__media {
  grid-area: media;
  align-self: start;
}

.app-card .app-hero__media { align-self: center; }

.app-hero__media img {
  display: block;
  width: 100%;
  height: auto;
}

.app-hero > .app-title { grid-area: title; }
.app-hero > .app-content { grid-area: body; }

.app-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px 0;
}

.app-title > h2,
.app-title > h3 { margin: 0; }

.app-title > img.app-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 22.37%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* Button-like link */
a.learn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--landing-accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border: none;
  box-shadow: 0 6px 16px color-mix(in oklab, var(--landing-accent), black 35%);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

a.learn-more:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px color-mix(in oklab, var(--landing-accent), black 45%);
  filter: saturate(1.05);
}

/* Reveal-on-scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 380ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  a.learn-more,
  .app-card {
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 720px) {
  .app-row {
    grid-template-columns: 1fr;
    gap: var(--landing-gap);
  }
  .icon-tile {
    margin: 0 auto;
  }
  .vt-cta-row {
    justify-content: center;
  }
  /* Name first, then the devices, then the pitch. */
  .app-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "title"
      "media"
      "body";
    row-gap: var(--landing-gap);
  }
  .app-hero__media {
    justify-self: center;
    width: min(100%, 17rem);
  }
  .app-title {
    justify-content: center;
    margin: 0;
  }
}



/* ---------- Screenshot strips ---------- */
/* Screenshots used to sit in Pico's `.grid`, which hands every child an equal `1fr`
   column, while each `<img>` carried an inline `max-width` that beat Pico's own
   `img { max-width: 100% }`. An image that cannot shrink below its max-width overlaps
   its neighbours the moment the column is narrower: five 220px shots in 154px columns
   overlapped by 46px each and pushed the page body 66px wide at 768px. The strip owns
   the sizing now — it scrolls inside itself so the page body never has to. */
.shots {
  --shot-width: 240px;
  display: flex;
  align-items: flex-start;
  gap: var(--landing-gap-sm);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  /* Bleed to the card's own padding edge, so a partly visible next shot is the hint
     that the strip scrolls. `main.container > article` pads 24px in site.css. */
  margin-inline: -24px;
  padding-inline: 24px;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.shots > img {
  flex: none;
  width: var(--shot-width);
  height: auto;
  border-radius: 0.75rem;
  scroll-snap-align: center;
}

.shots:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 4px;
}

.shots--watch { --shot-width: 180px; }
.shots--tablet { --shot-width: 420px; }

/* Narrower shots on a phone, so the next one always peeks in and shows the strip
   scrolls. Every variant is restated: these rules sit after the ones above at the
   same specificity, so a variant left out here would lose its width to `.shots`. */
@media (max-width: 420px) {
  .shots { --shot-width: 210px; }
  .shots--watch { --shot-width: 150px; }
  .shots--tablet { --shot-width: 280px; }
}
