/* ============================================================
   EyeUp — page layout: nav, hero, sections, footer, sub-pages
   ============================================================ */

/* No overflow clipping here: any non-visible overflow on an ancestor
   stops the sticky nav from sticking. The decorative layers clip
   themselves instead (.ground, .free-card). */
.page { position: relative; }
.page > .wrap { position: relative; z-index: 1; }

/* --- Nav ------------------------------------------------------ */
.site-header {
  padding-top: var(--s-5);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 12px 10px 22px;
  border-radius: var(--r-pill);
  background: rgba(18, 20, 27, .72);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur-2)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-2)) saturate(140%);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow-1);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav__links a:not(.btn) { color: var(--muted); }
.nav__links a:not(.btn):hover { color: var(--text); }

/* --- Sections -------------------------------------------------- */
.section { padding-top: var(--s-10); scroll-margin-top: 96px; }
.section--center { text-align: center; }
.section--narrow { max-width: 760px; margin-inline: auto; }

.section__head { margin-bottom: var(--s-7); }
.section__head .eyebrow { display: block; margin-bottom: 14px; }
.section__head .h1 { max-width: 16ch; }
.section--center .section__head .h1,
.section--center .section__head p { margin-inline: auto; }
.section__lede { margin-top: var(--s-4); max-width: 620px; }

/* --- Hero ------------------------------------------------------ */
.hero { position: relative; text-align: center; padding-top: var(--s-9); }

.hero .display { margin: 0 auto; max-width: 14ch; }
.hero__sub { margin: 24px auto 0; max-width: 560px; }
.hero__cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-top: 36px;
}
.hero .chips { margin-top: 20px; }

/* --- How it works: three beats --------------------------------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.how-card { padding: 28px; }
.how-card__step {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--faint);
  margin-bottom: var(--s-4);
}
.how-card__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  color: var(--ice);
  margin-bottom: 6px;
}
.how-card__body { font-size: 14.5px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* --- The five trials ------------------------------------------- */
.trials-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-4);
}
.trial-card { padding: 22px 20px; }
.trial-card__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ice);
  margin-bottom: 4px;
}
.trial-card__body { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* --- Split: copy one side, a panel the other ------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s-8);
  align-items: center;
}
.split__copy .eyebrow { display: block; margin-bottom: 14px; }
.split__copy .h1 { max-width: 14ch; }
.split__body { margin-top: var(--s-4); max-width: 50ch; }
.split__pull {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ice);
  margin-top: 20px;
}
/* keep the panel before the copy in source for the compete section,
   but under 700px the copy should lead */
@media (max-width: 700px) {
  .split--panel-first .split__copy { order: -1; }
}

/* --- Actually free --------------------------------------------- */
.free-card {
  max-width: 780px;
  margin-inline: auto;
  padding: var(--s-7) 52px;
  border-radius: var(--r-card);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur-2)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-2)) saturate(140%);
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--hi);
  position: relative;
  overflow: hidden;
}
.free-card__glow {
  position: absolute;
  left: 50%;
  bottom: -180px;
  width: 480px;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(232, 79, 176, .16), transparent 75%);
  filter: blur(30px);
  pointer-events: none;
}
.free-card__inner { position: relative; }
.free-card .chips { margin-top: 26px; }
.free-card__body { margin: 26px auto 0; max-width: 520px; font-size: 16px; }
.free-card__provenance { font-size: 14px; color: var(--faint); margin-top: 18px; }

/* --- Final CTA -------------------------------------------------- */
.final-cta { position: relative; padding-bottom: var(--s-9); }
.final-cta__glow {
  position: absolute;
  left: 50%;
  bottom: -240px;
  width: min(900px, 94vw);
  height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(232, 79, 176, .15), transparent 75%);
  filter: blur(var(--blur-3));
  pointer-events: none;
}
.final-cta > * { position: relative; }
.final-cta .display-2 { max-width: 16ch; margin-inline: auto; }
.final-cta .badges { margin-top: 30px; }

/* --- Footer ------------------------------------------------------ */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin-top: var(--s-10);
  padding: var(--s-6) 0 var(--s-7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.site-footer__brand { display: flex; align-items: center; gap: var(--s-4); }
.site-footer__links { display: flex; gap: 24px; font-size: 13.5px; }
.site-footer__links a { color: var(--muted); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__legal {
  width: 100%;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.6;
}
.site-footer__legal a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; }
.site-footer__legal a:hover { color: var(--muted); }

/* --- Sub-pages: back-pill nav + one narrow column ---------------- */
.nav--back { gap: 20px; }
.nav--back .nav__back { font-size: 14px; color: var(--muted); }
.nav--back .nav__back:hover { color: var(--text); }

.legal { max-width: 680px; margin-inline: auto; padding-top: var(--s-9); }
.legal .eyebrow { display: block; margin-bottom: 14px; }
.legal h1 { margin-bottom: var(--s-3); }
.legal__meta { color: var(--faint); font-size: 15px; margin-bottom: var(--s-7); }
.legal h2 {
  font-size: 22px;
  font-weight: 600;
  margin: var(--s-7) 0 var(--s-3);
}
.legal p, .legal li { color: var(--muted); font-size: 16px; line-height: 1.7; }
.legal p + p { margin-top: var(--s-4); }
.legal ul { padding-left: 20px; margin: var(--s-3) 0 0; }
.legal li + li { margin-top: var(--s-2); }
.legal strong { color: var(--text); font-weight: 600; }
.legal a:hover { text-decoration: underline; }

.legal-page { max-width: 760px; padding-bottom: var(--s-8); }
.legal-page .site-footer { margin-top: var(--s-9); justify-content: center; text-align: center; }

/* support cards */
.support-cards { display: flex; flex-direction: column; gap: var(--s-4); }
.support-card { padding: 26px 30px; }
.support-card__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ice);
  margin-bottom: 6px;
}
.support-card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* --- Changelog --------------------------------------------------- */
.releases { display: flex; flex-direction: column; gap: var(--s-5); margin-top: var(--s-7); }
.release { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: var(--s-4); }

.release__head { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.release__version {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
}
.release-latest {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap; padding: 4px 9px; border-radius: var(--r-pill);
  background: var(--accent-grad); color: var(--accent-ink);
}
.release__meta { margin: 0; font-size: 14px; color: var(--faint); }
.release__permalink {
  flex: none;
  font-size: 16px; font-weight: 600; color: var(--faint);
  padding: 2px 6px; border-radius: 8px;
  opacity: 0; transition: opacity .16s, color .16s;
}
.release:hover .release__permalink { opacity: 1; }
.release__permalink:focus { opacity: 1; }
.release__permalink:hover { color: var(--accent); }
@media (hover: none) { .release__permalink { opacity: 1; } }

.release__summary { margin: 0; font-size: 17px; color: var(--text); }
.release__group { display: flex; flex-direction: column; gap: 12px; }
.release__group h3 {
  margin: 0; font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.release__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.release__list li {
  position: relative; padding-left: 19px;
  font-size: 15.5px; line-height: 1.55; color: var(--muted);
}
.release__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.release__list b { color: var(--text); font-weight: 600; }

/* --- Scroll reveal -------------------------------------------------
   Gated on .js (set by the inline head script) so that with JavaScript
   disabled the content is simply visible rather than permanently hidden. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* --- Responsive --------------------------------------------------- */
@media (max-width: 1100px) {
  .trials-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .nav { padding-left: 18px; }
  .nav__links a:not(.btn) { display: none; }
  .section { padding-top: var(--s-9); }
  .split { gap: var(--s-6); }
}

@media (max-width: 640px) {
  .trials-grid { grid-template-columns: repeat(2, 1fr); }
  .trials-grid .trial-card:last-child { grid-column: 1 / -1; }
  .free-card { padding: var(--s-6) var(--s-5); }
}

@media (max-width: 520px) {
  .wrap { padding-inline: var(--s-4); }
  .trials-grid { grid-template-columns: 1fr; }
  .trials-grid .trial-card:last-child { grid-column: auto; }
  .site-footer { justify-content: center; text-align: center; }
  .site-footer__links { justify-content: center; flex-wrap: wrap; }
  .store-badge img { height: 48px; }
}
