/* Lisuvo landing — same material as the app (LisuvoTheme):
   backgroundPrimary, surfaceRaised/surfaceDeep, accentSmooth,
   light from top-left, shadow bottom-right. */
:root {
  --bg: #e3e8ee;
  --raised: #ebeff4;
  --ink: #2a2f37;
  --muted: #7c8490;
  --accent: #230903;
  --on-accent: #ffffff;
  --hi: rgba(255, 255, 255, 1);
  --shade: rgba(152, 168, 191, .9);
  --phone-scale: 1; /* set in landing.js from the viewport */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --raised: #15191e;
    --ink: #f5f7f8;
    --muted: #8b9299;
    --accent: #e9d3c9;
    --on-accent: #230903;
    --hi: rgba(255, 255, 255, .05);
    --shade: rgba(0, 0, 0, .9);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#flow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
  pointer-events: none;
}

/* Layout: one screen, no scroll. Copy on the left, phone anchored bottom-right. */
.hero {
  position: relative;
  height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 4vw;
}
.copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 62%;
}
.logo { display: block; width: clamp(84px, 8vw, 110px); margin-bottom: 22px; aspect-ratio: 1303 / 364; }
.logo img { display: block; width: 100%; height: auto; aspect-ratio: 1303 / 364; }
.copy h1 {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -.025em;
  font-weight: 700;
  text-wrap: balance;
}
.copy h1 span { display: block; }
.sub {
  margin-top: 16px;
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 40ch;
  text-wrap: pretty;
}

/* Button — like .softProminent: raised pill, accent fill */
.store-btn {
  margin-top: 28px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  padding: 14px 30px 14px 24px;
  border-radius: 22px;
  box-shadow:
    -9px -9px 18px var(--hi),
    9px 9px 18px var(--shade);
  transition: transform .15s ease, box-shadow .15s ease;
}
.store-btn:hover { transform: translateY(-1px); }
.store-btn:active {
  transform: scale(.985);
  box-shadow:
    inset 4px 4px 8px rgba(0, 0, 0, .35),
    inset -4px -4px 8px rgba(255, 255, 255, .12);
}
.store-btn .apple { width: 30px; height: 30px; }
.store-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-text small { font-size: 12px; font-weight: 400; opacity: .75; }
.store-text strong { font-size: 21px; font-weight: 600; }

/* Feature row: what the app actually does */
.feats {
  list-style: none;
  margin-top: 30px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; line-height: 1.35;
  color: var(--muted);
}
.feats li { display: flex; align-items: center; gap: 12px; }
.feats svg {
  flex: none; width: 22px; height: 22px;
  fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* Legal links in footer */
.legal-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.legal-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.legal-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.legal-footer .sep {
  opacity: .5;
}

/* Language picker */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: inherit;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.lang-btn:hover {
  color: var(--accent);
}
.lang-btn .globe-icon {
  width: 14px;
  height: 14px;
}
.lang-btn .arrow-icon {
  width: 9px;
  height: 9px;
  transition: transform .2s ease;
}
.lang-picker.open .lang-btn .arrow-icon {
  transform: rotate(180deg);
}
.lang-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #141a21;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 6px;
  list-style: none;
  min-width: 140px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  display: none;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.lang-picker.open .lang-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lang-menu li {
  margin: 0;
  padding: 0;
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #c0c7d0;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.lang-menu a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-decoration: none;
}
.lang-menu a.active {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.lang-backdrop,
.lang-sheet-header {
  display: none;
}

/* Phone: devices.css iPhone frame scaled from its right edge,
   vertically centered, fully in view. */
.stage {
  position: absolute;
  z-index: 1;
  right: 9vw;
  top: 50%;
  width: 425px; height: 884px;
  transform: translateY(-50%) scale(var(--phone-scale));
  transform-origin: center right;
}
.stage .device { filter: drop-shadow(-16px -16px 30px var(--hi)) drop-shadow(18px 18px 36px var(--shade)); }
.stage .device-screen { overflow: hidden; position: relative; }

/* iPhone 15 Pro frame: exact proportions 393x852 */
.device-iphone-14-pro { height: 884px !important; width: 425px !important; position: relative; }
.device-iphone-14-pro .device-frame {
  background: #010101; border: 1px solid #28242e;
  border-radius: 64px !important; height: 884px !important; width: 425px !important; padding: 16px !important;
}
.device-iphone-14-pro .device-screen {
  border-radius: 46px !important; height: 852px !important; width: 393px !important; background: #000;
}

/* Скрываем CSS Dynamic Island и сенсоры: в реальном видео с iPhone 15 Pro уже есть свой нативный островок и статус-бар */
.device-iphone-14-pro .device-header,
.device-iphone-14-pro .device-sensors {
  display: none !important;
}

.device-screen video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity .4s ease;
}
.device-screen video.on { opacity: 1; }
/* Screen placeholder (RecordingView: timer + metrics) until demo.mp4 is there */
.screen-mock {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: end;
  gap: 14px;
  padding: 70px 22px 30px;
  background:
    radial-gradient(300px 200px at 80% 10%, rgba(120, 140, 170, .25), transparent),
    linear-gradient(180deg, #141a21 0%, #0b0e12 100%);
  color: #f5f7f8;
}
.mock-status {
  align-self: center;
  font-size: 13px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #ff6b6b;
  display: flex; align-items: center; gap: 8px;
}
.mock-status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #ff3b30;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
.mock-timer, .mock-metric {
  background: #1c222b;
  box-shadow:
    inset 3px 3px 8px rgba(0, 0, 0, .7),
    inset -3px -3px 8px rgba(255, 255, 255, .06);
}
.mock-timer {
  text-align: center;
  font-size: 64px; font-weight: 200;
  font-variant-numeric: tabular-nums;
  border-radius: 24px;
  padding: 10px 0;
}
.mock-metrics { display: flex; gap: 12px; }
.mock-metric {
  flex: 1; text-align: center;
  border-radius: 18px;
  padding: 12px 0;
  display: flex; flex-direction: column; gap: 4px;
}
.mock-metric strong { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mock-metric span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8b9299; }
.mock-finish {
  text-align: center;
  font-size: 17px; font-weight: 600;
  background: #e9d3c9; color: #230903;
  border-radius: 20px;
  padding: 18px 0;
}

/* Narrow: copy on top, phone centered below, still no scroll */
@media (max-width: 860px) {
  .hero { padding: 0 20px; }
  .copy {
    position: static; /* the button below is pinned to .hero, not the copy */
    max-width: none; height: auto;
    padding-top: 24px;
    align-items: flex-start; text-align: left;
  }
  .logo { width: 76px; margin-bottom: 12px; }
  .copy h1 { font-size: clamp(28px, 7.4vw, 38px); text-align: left; }
  .sub { margin-top: 10px; font-size: 15px; text-align: left; }
  /* Button sits under the phone, pinned above the legal footer (matching .softProminent: 60px height, 22px radius) */
  .store-btn {
    position: absolute; z-index: 2;
    left: max(20px, env(safe-area-inset-left));
    right: max(20px, env(safe-area-inset-right));
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--footer-h, 44px) + 12px);
    transform: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    height: 60px;
    margin: 0; padding: 0 24px;
    border-radius: 22px;
  }
  .store-btn:hover { transform: translateY(-1px); }
  .store-btn:active { transform: scale(.985); }
  .store-btn .apple { width: 22px; height: 22px; }
  .store-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    line-height: 1;
  }
  .store-text small { display: none; }
  .store-text strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
  .feats { display: none; }
  /* Legal footer under the download button on mobile: wraps gracefully without overlapping button */
  .legal-footer {
    position: absolute; z-index: 2;
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
    font-size: 12px;
    gap: 6px 14px;
  }
  .legal-footer .sep {
    display: none;
  }
  .legal-footer a,
  .legal-footer .lang-picker {
    white-space: nowrap;
  }
  .legal-footer a {
    padding: 2px 2px;
  }
  /* Footer language button on mobile: plain text without shell, exactly like desktop */
  .legal-footer .lang-btn {
    background: none;
    border: none;
    padding: 2px 2px;
    font-size: inherit;
    color: var(--muted);
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
  }
  .legal-footer .lang-btn:active,
  .legal-footer .lang-btn:hover {
    color: var(--accent);
  }

  /* When language bottom sheet is open, elevate footer to top level */
  body.lang-open .legal-footer,
  .legal-footer:has(.lang-picker.open) {
    z-index: 10000;
  }

  .lang-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .lang-picker.open .lang-backdrop,
  .lang-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .lang-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    max-height: 84dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    transform: translateY(100%);
    background: var(--raised);
    color: var(--ink);
    border: none;
    border-top: 1px solid var(--hi);
    border-radius: 28px 28px 0 0;
    padding: 12px 18px calc(max(18px, env(safe-area-inset-bottom)) + 12px);
    box-shadow:
      0 -16px 40px var(--shade),
      0 -1px 0 var(--hi);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 12px;
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
  }
  .lang-picker.open .lang-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(0);
    visibility: visible;
  }

  /* Recessed drag indicator groove */
  .lang-menu::before {
    content: "";
    display: block;
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: var(--bg);
    box-shadow:
      inset 1.5px 1.5px 3px var(--shade),
      inset -1.5px -1.5px 3px var(--hi);
    margin: 2px auto 14px;
    flex-shrink: 0;
  }

  /* Sheet header with title and SoftCircleButton */
  .lang-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 12px;
    border-bottom: 1px solid var(--shade);
    box-shadow: 0 1px 0 var(--hi);
    margin-bottom: 4px;
    flex-shrink: 0;
  }
  .lang-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.015em;
  }
  /* SoftCircleButtonStyle */
  .lang-sheet-close {
    background: var(--raised);
    border: 0.75px solid var(--hi);
    color: var(--ink);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    box-shadow:
      -3px -3px 6px var(--hi),
      3px 3px 6px var(--shade);
    transition: transform .15s ease, box-shadow .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .lang-sheet-close:active {
    transform: scale(0.96);
    box-shadow:
      inset 2px 2px 4px var(--shade),
      inset -2px -2px 4px var(--hi);
    color: var(--accent);
  }

  .lang-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  /* SoftCard / SoftButtonStyle for each language */
  .lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 14px 20px;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    background: var(--raised);
    border: 0.75px solid var(--hi);
    box-shadow:
      -4px -4px 10px var(--hi),
      4px 4px 10px var(--shade);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .lang-menu a:hover {
    color: var(--ink);
  }
  .lang-menu a:active {
    transform: scale(0.985);
    box-shadow:
      inset 3px 3px 6px var(--shade),
      inset -3px -3px 6px var(--hi);
  }

  /* Active language: SoftProminent (accent fill with textOnAccent) */
  .lang-menu a.active {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--hi);
    font-weight: 600;
    box-shadow:
      -4px -4px 10px var(--hi),
      4px 4px 10px var(--shade);
  }
  .lang-menu a.active:active {
    transform: scale(0.985);
    box-shadow:
      inset 3px 3px 6px rgba(0, 0, 0, .45),
      inset -3px -3px 6px rgba(255, 255, 255, .15);
  }
  .lang-menu a.active::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
  }
  .stage {
    right: 50%; top: calc(var(--copy-h, 40vh) + 16px);
    transform: translateX(50%) scale(var(--phone-scale));
    transform-origin: top center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mock-status .dot { animation: none; }
  .store-btn { transition: none; }
}
