/*
 * Landing sections below the hero ("More information").
 *
 * Builds on the existing hero in ../styles.css: same text colour and the same
 * blue / cyan / green / violet palette as the animated background blobs.
 * Motion is layered:
 *   - .reveal       fades and slides elements in once they scroll into view
 *   - .float        a slow, endless hover on screenshots
 *   - --tilt-*      scroll-linked tilt of the large app window (set by JS)
 * Everything motion-related is switched off for prefers-reduced-motion.
 */

:root {
  --lp-text: #17203a;
  --lp-muted: #5e6780;
  --lp-soft: #f5f6f8;
  --lp-card: #ffffff;
  --lp-line: rgba(23, 32, 58, 0.08);
  --lp-blue: #3b82f6;
  --lp-cyan: #22d3ee;
  --lp-green: #4ade80;
  --lp-violet: #8b5cf6;
  --lp-radius: 28px;
  --lp-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --lp-gutter: clamp(16px, 5vw, 64px);
  --lp-max: 1180px;
}

/* ---------- Hero: always exactly one window high ---------- */
/*
 * styles.css gives the hero a minimum height of 920 px. On short windows
 * (phones, small laptops) the content then sits below the fold and collides
 * with the pinned "More information" link. Here the hero is exactly one
 * viewport high, everything inside scales with the window HEIGHT as well as
 * its width, and the bottom keeps a reserved strip for the link.
 */
:root {
  /* Distance of the "More information" link from the window bottom ... */
  --lp-more-bottom: clamp(14px, 3.5vh, 44px);
  /* ... and the strip the hero content must leave free for it. */
  --lp-more-space: calc(var(--lp-more-bottom) + 64px);
}

.coming-soon-page { min-height: 100svh; }
/* styles.css repeats the 920 px minimum for wide screens; override it too. */
@media (min-width: 1024px) {
  .coming-soon-page { min-height: 100svh; }
}

.coming-soon-page > .coming-soon-content {
  min-height: 100svh;
  gap: clamp(8px, 2.4vh, 26px);
  padding-top: max(clamp(12px, 3vh, 32px), env(safe-area-inset-top));
  padding-bottom: calc(var(--lp-more-space) + env(safe-area-inset-bottom, 0px));
}

/* Logo and title shrink on short windows, not only on narrow ones. */
.coming-soon-page .logo-card {
  width: clamp(76px, min(30vw, 17vh), 170px);
  height: clamp(76px, min(30vw, 17vh), 170px);
}
.coming-soon-page .coming-soon-title {
  margin-top: 0;
  font-size: clamp(2.2rem, min(6vw + 1rem, 8.5vh), 4.8rem);
}

/* Very short windows (landscape phones): tighter still. */
@media (max-height: 520px) {
  :root { --lp-more-space: calc(var(--lp-more-bottom) + 52px); }
  .coming-soon-page .logo-card { width: clamp(56px, 15vh, 90px); height: clamp(56px, 15vh, 90px); }
}

/* ---------- "More information" link, pinned to the bottom of the window ---------- */

.lp-more {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--lp-more-bottom));
  z-index: 20;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Text only — no capsule, border or shadow. */
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--lp-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.4s var(--lp-ease), transform 0.4s var(--lp-ease);
}
.lp-more:hover { opacity: 1; }
.lp-more:focus-visible { opacity: 1; outline: 2px solid var(--lp-blue); outline-offset: 4px; border-radius: 6px; }
.lp-more svg { width: 18px; height: 18px; animation: lpNudge 2.2s var(--lp-ease) infinite; }
/* Hidden once the visitor has started scrolling (class set by landing.js). */
.lp-more.is-hidden { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }

@keyframes lpNudge {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* ---------- Shared section layout ---------- */

.lp {
  position: relative;
  color: var(--lp-text);
  background: #fff;
  overflow: hidden;
}

.lp-section {
  position: relative;
  padding: clamp(80px, 14vh, 160px) var(--lp-gutter);
}
.lp-inner { max-width: var(--lp-max); margin: 0 auto; }

/*
 * Consecutive white highlight sections (import, facial analysis, KOIS Glasses)
 * would otherwise stack the bottom padding of one and the top padding of the
 * next into a very large empty band. Only the top padding of the following
 * section is reduced, so each section keeps its breathing room below.
 */
.lp-section.lp-tight + .lp-section.lp-tight { padding-top: clamp(24px, 4vh, 56px); }

.lp-eyebrow {
  margin: 0 0 14px;
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--lp-blue), var(--lp-cyan) 55%, var(--lp-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-title {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 72px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.lp-title-md { font-size: clamp(30px, 4.2vw, 54px); }
.lp-lead {
  margin: 22px 0 0;
  max-width: 640px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--lp-muted);
}
.lp-center { text-align: center; }
.lp-center .lp-lead { margin-left: auto; margin-right: auto; }

/* ---------- Statement + large app window ---------- */

.lp-intro { padding-top: clamp(100px, 16vh, 180px); }

.lp-stage {
  position: relative;
  margin: clamp(48px, 8vh, 90px) auto 0;
  max-width: 1080px;
  perspective: 1600px;
}
/* Soft coloured glow behind the window, in the hero's palette. */
.lp-stage::before {
  content: "";
  position: absolute;
  inset: 8% 6% -6%;
  background:
    radial-gradient(40% 50% at 30% 50%, rgba(96, 165, 250, 0.45), transparent 70%),
    radial-gradient(40% 50% at 70% 55%, rgba(34, 211, 238, 0.35), transparent 70%),
    radial-gradient(30% 40% at 55% 80%, rgba(139, 92, 246, 0.25), transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

/* A neutral desktop-window frame drawn in CSS around real screenshots. */
.lp-window {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 32, 58, 0.1);
  box-shadow: 0 40px 90px -20px rgba(15, 23, 42, 0.35), 0 12px 30px -10px rgba(15, 23, 42, 0.18);
}
.lp-window::before {
  content: "";
  display: block;
  height: 30px;
  background:
    radial-gradient(circle at 18px 15px, #ff5f57 5px, transparent 5.5px),
    radial-gradient(circle at 36px 15px, #febc2e 5px, transparent 5.5px),
    radial-gradient(circle at 54px 15px, #28c840 5px, transparent 5.5px),
    #eef1f5;
  border-bottom: 1px solid rgba(23, 32, 58, 0.07);
}
.lp-window img,
.lp-window video { display: block; width: 100%; height: auto; }
/* Videos end at fractional pixel heights; pulling the next pixel row up
   keeps the frame's white background from showing as a thin line below. */
.lp-window video { margin-bottom: -1px; }

/* Scroll-linked tilt: landing.js sets --tilt (0 = flat, 1 = fully tilted). */
.lp-tilt {
  transform-origin: 50% 100%;
  transform:
    rotateX(calc(var(--tilt, 1) * 22deg))
    scale(calc(1 - var(--tilt, 1) * 0.08))
    translateY(calc(var(--tilt, 1) * 30px));
  will-change: transform;
}

/* ---------- Highlights: one big feature per row ---------- */

.lp-highlight {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.lp-highlight.is-flipped { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); }
.lp-highlight.is-flipped .lp-copy { order: 2; }

/* Small "NEW" capsule above the eyebrow of a freshly added feature. */
.lp-new-badge-row { margin: 0 0 12px; line-height: 1; }
.lp-new-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Rows whose graphic deserves more room (e.g. the facial analysis video):
   on wide screens the row may exceed the usual content width and the media
   column gets a larger share. Below 920 px all rows stack anyway. */
@media (min-width: 921px) {
  .lp-highlight.is-wide-media {
    max-width: calc(var(--lp-max) + 220px);
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.5fr);
  }
  .lp-highlight.is-wide-media.is-flipped { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.75fr); }
}

.lp-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.lp-points li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 16px;
  line-height: 1.45;
  color: var(--lp-muted);
}
.lp-points li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--lp-blue), var(--lp-cyan));
}

.lp-media { position: relative; }
.lp-media::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow, rgba(96, 165, 250, 0.4)), transparent);
  filter: blur(36px);
}
.lp-media .lp-window { border-radius: 12px; }

/* Dark variant for the CBCT row: black stage like a viewing room. */
.lp-dark { background: #000; color: #f5f7fb; }
.lp-dark .lp-lead,
.lp-dark .lp-points li { color: #a3acbf; }
.lp-dark .lp-window { border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 40px 120px -20px rgba(59, 130, 246, 0.35); }
.lp-dark .lp-window::before { background:
    radial-gradient(circle at 18px 15px, #ff5f57 5px, transparent 5.5px),
    radial-gradient(circle at 36px 15px, #febc2e 5px, transparent 5.5px),
    radial-gradient(circle at 54px 15px, #28c840 5px, transparent 5.5px),
    #1b1e24; border-bottom-color: rgba(255, 255, 255, 0.06); }

/* ---------- Bento grid: "And so much more" ---------- */

.lp-soft { background: var(--lp-soft); }
.lp-bento {
  margin-top: clamp(40px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.lp-card {
  position: relative;
  grid-column: span 2;
  padding: 28px 28px 30px;
  border-radius: var(--lp-radius);
  background: var(--lp-card);
  box-shadow: 0 1px 0 var(--lp-line), 0 18px 40px -28px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  transition: transform 0.5s var(--lp-ease), box-shadow 0.5s var(--lp-ease);
}
.lp-card:hover { transform: translateY(-6px); box-shadow: 0 1px 0 var(--lp-line), 0 30px 60px -30px rgba(15, 23, 42, 0.35); }
.lp-card.is-wide { grid-column: span 3; }
.lp-card.is-full { grid-column: span 6; display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; align-items: center; }
.lp-card h3 { margin: 16px 0 8px; font-size: 21px; letter-spacing: -0.015em; }
.lp-card p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--lp-muted); }
.lp-card img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 22px;
  border-radius: 12px;
  border: 1px solid var(--lp-line);
}
.lp-card.is-full img { margin-top: 0; }
.lp-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--c1, var(--lp-blue)), var(--c2, var(--lp-cyan)));
}
.lp-icon svg { width: 22px; height: 22px; }

/* ---------- Benefits ---------- */

.lp-benefits {
  margin-top: clamp(48px, 7vh, 80px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.lp-benefit h3 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--a, var(--lp-blue)), var(--b, var(--lp-cyan)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-benefit p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--lp-muted); }
.lp-benefit strong { color: var(--lp-text); font-weight: 600; }

/* ---------- Final call to action ---------- */

.lp-cta { text-align: center; }
.lp-cta .lp-lead { margin-left: auto; margin-right: auto; }
.lp-cta-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 28px;
  border-radius: 24px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 24px 50px -18px rgba(59, 130, 246, 0.45);
}
.lp-cta-logo svg { width: 78%; height: 78%; }
.lp-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 16px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--lp-text);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 36px -14px rgba(23, 32, 58, 0.6);
  transition: transform 0.3s var(--lp-ease), box-shadow 0.3s var(--lp-ease);
}
.lp-button:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -16px rgba(23, 32, 58, 0.7); }
.lp-note { margin-top: 16px; font-size: 13px; color: var(--lp-muted); }

/* The site footer now sits below the last section, on the same soft grey. */
.lp-footer-wrap { background: var(--lp-soft); padding-top: 8px; }

/* ---------- Motion ---------- */

/* Reveal on scroll: hidden until landing.js adds .is-in. */
.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 1s var(--lp-ease), transform 1.1s var(--lp-ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Endless gentle hover for screenshots; the phase offset avoids lock-step. */
.float { animation: lpFloat 7s ease-in-out infinite; animation-delay: var(--float-delay, 0s); }
@keyframes lpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Scroll parallax wrapper: landing.js sets --shift in px. */
.parallax { transform: translateY(var(--shift, 0px)); will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float, .lp-more svg { animation: none; }
  .lp-tilt, .parallax { transform: none; }
  .lp-card, .lp-card:hover { transition: none; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .lp-highlight,
  .lp-highlight.is-flipped { grid-template-columns: 1fr; }
  .lp-highlight.is-flipped .lp-copy { order: 0; }
  .lp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-card,
  .lp-card.is-wide { grid-column: span 1; }
  .lp-card.is-full { grid-column: span 2; grid-template-columns: 1fr; }
  .lp-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .lp-bento,
  .lp-benefits { grid-template-columns: 1fr; }
  .lp-card.is-full { grid-column: span 1; }
  .lp-window::before { height: 22px; background-size: auto; }
}
