body {
  --landing-header-top: env(safe-area-inset-top, 0px);
  display: block;
  padding-top: max(24px, env(safe-area-inset-top));
  background: #f8f5fc;
}

body.admin-bar {
  --landing-header-top: calc(var(--wp-admin--admin-bar--height, 32px) + env(safe-area-inset-top, 0px));
}

main.page {
  width: min(100%, 1120px);
  max-width: none;
  margin: 0 auto;
}

.landing {
  --landing-header-height: 68px;
  text-align: center;
}

.landing [id] {
  scroll-margin-top: calc(var(--landing-header-height) + 24px + env(safe-area-inset-top, 0px));
}

.landing a,
.landing button {
  -webkit-tap-highlight-color: transparent;
}

.landing a:focus-visible,
.landing button:focus-visible,
.story-track:focus-visible,
.screenshots:focus-visible {
  outline: 3px solid #7550be;
  outline-offset: 4px;
}

.landing-header,
.landing-brand,
.landing-nav,
.carousel-controls {
  display: flex;
  align-items: center;
}

.landing-header {
  position: sticky;
  top: var(--landing-header-top);
  z-index: 20;
  justify-content: space-between;
  gap: 24px;
  margin-block: -12px;
  padding-block: 12px;
}

.landing-header::before {
  position: fixed;
  inset: var(--landing-header-top) 0 auto;
  z-index: -1;
  height: var(--landing-header-height);
  background: #f8f5fc;
  opacity: 0;
  pointer-events: none;
  content: '';
}

.landing-header.is-stuck::before {
  opacity: 1;
}

.landing-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #30223f;
  background: transparent;
  cursor: pointer;
}

.landing-menu-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.menu-icon-close,
.landing-menu-toggle[aria-expanded='true'] .menu-icon-open {
  display: none;
}

.landing-menu-toggle[aria-expanded='true'] .menu-icon-close {
  display: block;
}

.landing-menu-toggle:hover,
.landing-menu-toggle[aria-expanded='true'] {
  background: #7550be12;
}

.landing-brand {
  flex-shrink: 0;
  gap: 10px;
  color: #30223f;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.landing-brand img {
  border-radius: 12px;
}

.landing-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 26px;
  font-size: 14px;
}

.landing-nav a {
  color: #65596f;
  text-decoration: none;
}

.landing-nav a:hover {
  color: #56348e;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.landing-intro {
  padding: 66px 0 54px;
  text-align: center;
}

.landing-intro h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.045em;
}

.landing-intro h1 span {
  color: #7550be;
}

.landing-intro .description {
  max-width: none;
  margin-top: 20px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.landing .downloads h2,
.blog-copy h2 {
  margin: 0;
  color: #30223f;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.story-carousel {
  max-width: 620px;
  margin: 0 auto;
}

.story-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.story-track::-webkit-scrollbar {
  display: none;
}

.story-slide {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.story-art {
  display: flex;
  justify-content: center;
}

.story-art img {
  display: block;
  width: min(100%, 400px);
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  object-fit: contain;
}

.story-copy {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 4px;
  text-align: center;
}

.story-copy h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.story-copy p {
  margin: 0;
  color: #655b65;
  font-size: 16px;
  line-height: 1.6;
}

.carousel-controls {
  justify-content: space-between;
  gap: 10px;
  max-width: 520px;
  margin: 22px auto 0;
}

.carousel-controls[hidden] {
  display: none;
}

.carousel-status {
  color: #726a7e;
  font-size: 14px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.carousel-indicators {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.carousel-dots button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button::before {
  width: 6px;
  height: 6px;
  border-radius: 8px;
  background: #d9cddd;
  content: '';
}

.carousel-dots button[aria-current='true']::before {
  width: 18px;
  background: #7550be;
}

.carousel-controls > button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: #65439d;
  background: #eee4f8;
  font: inherit;
  cursor: pointer;
}

.carousel-controls > button:hover:not(:disabled) {
  color: #402371;
  background: #e4d6f3;
}

.carousel-controls > button:disabled {
  opacity: 0.3;
  cursor: default;
}

.app-section,
.landing .downloads,
.blog-section {
  margin-top: 80px;
}

.screenshots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(208px, 1fr);
  gap: 18px;
  padding: 5px 5px 12px;
  margin: 0 -5px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #c2acd7 transparent;
}

.screenshot-card {
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}

.screenshot-card > a {
  display: block;
  overflow: hidden;
  border: 1px solid #e1d7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px #50356c08;
}

.screenshot-card picture {
  display: block;
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-card figcaption {
  padding: 18px 3px 0;
  text-align: center;
}

.screenshot-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
}

.screenshot-card p {
  margin: 0;
  color: #726a7e;
  font-size: 12px;
  line-height: 1.6;
}

body.screenshot-lightbox-open {
  overflow: hidden;
}

.screenshot-lightbox {
  width: min(720px, calc(100% - 32px));
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-width: none;
  max-height: none;
  margin: auto;
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
}

.screenshot-lightbox:not([open]) {
  display: none;
}

.screenshot-lightbox::backdrop {
  background: #30223fe6;
}

.lightbox-content {
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr) auto;
  gap: 12px;
  height: 100%;
}

.lightbox-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.lightbox-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.lightbox-caption {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.lightbox-caption strong,
.lightbox-caption span {
  display: block;
}

.lightbox-caption strong {
  font-size: 16px;
  font-weight: 600;
}

.screenshot-lightbox button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: #fff;
  background: #ffffff1f;
  font: inherit;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.screenshot-lightbox button:hover {
  background: #7550be;
}

.screenshot-lightbox button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.lightbox-close {
  justify-self: end;
}

.gallery-hint {
  display: none;
  color: #726a7e;
  font-size: 12px;
}

.download-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin: 32px 0;
  text-align: center;
}

.download-benefit h3 {
  margin: 0 0 14px;
  color: #30223f;
  font-size: clamp(28px, 3.3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.download-benefit p {
  margin: 0;
  color: #726a7e;
  font-size: 17px;
  line-height: 1.65;
}

.downloads .stores {
  max-width: 740px;
  margin: 0 auto;
}

.blog-copy > p:last-child {
  max-width: 640px;
  margin: 16px auto 0;
  color: #726a7e;
  font-size: 16px;
  line-height: 1.6;
}

.blog-channels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 740px;
  margin: 28px auto 0;
}

.blog-channel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 68px;
  padding: 16px;
  border: 1px solid #dcd0e9;
  border-radius: 14px;
  background: #ffffffa6;
  color: #65439d;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 150ms;
}

.blog-channel:hover {
  border-color: #a68acb;
}

.channel-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  overflow: hidden;
}

.channel-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.channel-icon--boosty {
  overflow: visible;
}

.channel-icon--boosty img {
  transform: scale(1.5);
}

.channel-icon--site {
  width: 36px;
  height: 36px;
}

main.page > .legal-links {
  margin-top: 64px;
  padding-top: 26px;
  border-top: 1px solid #e1d7eb;
}

@media (max-width: 850px) {
  .landing-header {
    flex-wrap: wrap;
  }

  .screenshots {
    grid-auto-columns: 240px;
  }

  .gallery-hint {
    display: block;
  }

  .blog-channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .landing-header {
    gap: 12px;
  }

  .landing-menu-toggle:not([hidden]) {
    display: inline-flex;
  }

  .has-menu-toggle .landing-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: min(288px, 100%);
    max-height: calc(100dvh - var(--landing-header-top) - var(--landing-header-height) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid #e1d7eb;
    border-radius: 12px;
    background: #f8f5fc;
    box-shadow: 0 8px 24px #30223f1f;
    text-align: left;
  }

  .has-menu-toggle.is-menu-open .landing-nav {
    display: flex;
  }

  .has-menu-toggle .landing-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
  }

  .has-menu-toggle .landing-nav a:hover {
    background: #7550be0d;
  }
}

@media (max-width: 600px) {
  body.admin-bar {
    --landing-header-top: env(safe-area-inset-top, 0px);
  }
}

@media (max-width: 560px) {
  body {
    padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
  }

  .landing-brand {
    font-size: 18px;
  }

  .landing-header:not(.has-menu-toggle) .landing-nav {
    justify-content: flex-start;
    gap: 20px;
    font-size: 12px;
  }

  .landing-intro {
    padding: 42px 0 38px;
  }

  .landing-intro .description {
    margin-top: 16px;
    font-size: 15px;
  }

  .story-slide {
    gap: 16px;
  }

  .story-copy h3 {
    font-size: 23px;
  }

  .story-copy p {
    font-size: 15px;
  }

  .app-section,
  .landing .downloads,
  .blog-section {
    margin-top: 56px;
  }

  .download-benefits {
    grid-template-columns: 1fr;
  }

  .download-benefits {
    gap: 28px;
    margin-top: 28px;
  }

  .download-benefit p {
    font-size: 16px;
  }

  .blog-channel {
    gap: 8px;
    padding: 14px 12px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .blog-channels {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-channel {
    transition: none;
  }
}
