/* Vrachi Pro app landing — tokens from Flutter app (#00CCFF, #858585, Roboto) */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #858585;
  --line: #e0e0e0;
  --sheet: #f5f5f5;
  --sheet-2: #f8f8f8;
  --accent: #00ccff;
  --accent-ink: #0a0a0a;
  --shadow: 0 18px 50px rgba(10, 10, 10, 0.1);
  --font: "Roboto", system-ui, sans-serif;
  --max: 1240px;
  --radius: 20px;
  --deck-interval: 120s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
}

.logo {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.logo-text {
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 12px;
  flex: 1;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--sheet);
}

.nav-stores {
  display: flex;
  gap: 8px;
}

.store {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line);
  color: var(--muted);
}

.store:hover {
  border-color: var(--accent);
  color: var(--ink);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.28) 0%, rgba(10, 10, 10, 0.72) 78%),
    linear-gradient(90deg, rgba(0, 204, 255, 0.18), transparent 55%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
  max-width: 14ch;
}

.lede {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 34rem;
  margin-bottom: 28px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-ios,
.badge-android {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #0a0a0a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.15s, background 0.15s;
}

.badge-ios:hover,
.badge-android:hover {
  transform: translateY(-2px);
  background: #161616;
}

.badge-ios span,
.badge-android span {
  display: grid;
  line-height: 1.1;
}

.badge-ios small,
.badge-android small {
  font-size: 0.68rem;
  opacity: 0.75;
}

.badge-ios strong,
.badge-android strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.badge-android {
  background: #111;
}

/* —— Features —— */
.features,
.how,
.bottom-cta {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px;
}

.features h2,
.how h2,
.role-copy h2,
.bottom-cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.section-lede,
.role-copy > p:not(.eyebrow),
.bottom-cta p {
  color: var(--muted);
  max-width: 36rem;
}

.eyebrow {
  color: #fff !important;
  background: var(--accent);
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.feat-grid,
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.feat,
.how-grid article {
  background: var(--sheet-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.feat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: var(--accent);
}

.feat-icon svg {
  width: 28px;
  height: 28px;
}

.feat h3,
.how-grid h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.feat p,
.how-grid p {
  color: var(--muted);
  font-size: 0.95rem;
}

.how-grid span {
  display: block;
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

/* —— Role bands —— */
.role-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px;
}

.role-band.doctor {
  background: var(--sheet);
  border-radius: 40px;
}

.steps {
  margin-top: 22px;
  padding-left: 1.15rem;
  display: grid;
  gap: 10px;
  color: var(--ink);
}

.steps li {
  color: var(--muted);
}

.steps strong {
  color: var(--ink);
}

/* —— Deck of phone cards —— */
.deck {
  position: relative;
  width: min(100%, 300px);
  height: 460px;
  margin: 0 auto;
  justify-self: center;
}

.deck-card {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 210px;
  margin: 0;
  transform-origin: center bottom;
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.7s ease,
    filter 0.7s ease;
  will-change: transform, opacity;
}

.deck-card[data-pos="0"] {
  z-index: 4;
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  filter: none;
}

.deck-card[data-pos="1"] {
  z-index: 3;
  transform: translate(calc(-50% + 18px), 14px) scale(0.96);
  opacity: 0.95;
  filter: brightness(0.98);
}

.deck-card[data-pos="2"] {
  z-index: 2;
  transform: translate(calc(-50% + 36px), 28px) scale(0.92);
  opacity: 0.9;
  filter: brightness(0.96);
}

.deck-card[data-pos="3"] {
  z-index: 1;
  transform: translate(calc(-50% + 54px), 42px) scale(0.88);
  opacity: 0.85;
  filter: brightness(0.94);
}

.deck-card.is-cycling {
  z-index: 5;
  transform: translate(calc(-50% - 40px), -28px) scale(1.02) rotate(-4deg);
  opacity: 0.35;
}

.phone-screen {
  height: 420px;
  border-radius: 28px;
  border: 3px solid #1a1a1a;
  background: #fff;
  padding: 14px 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone-accent .phone-screen {
  background: #0c0d10;
  color: #f3f4f6;
}

.ui-bar {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 8px 4px 16px;
  letter-spacing: -0.02em;
}

.ui-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--sheet);
  margin-bottom: 10px;
}

.phone-accent .ui-card {
  background: #1a1b22;
}

.ui-card.thin {
  display: block;
}

.ui-card b {
  display: block;
  font-size: 0.92rem;
}

.ui-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #7ae6ff);
  flex-shrink: 0;
}

.ui-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 700;
}

.ui-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.slot-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 8px;
}

.slot-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.slot-pills .on {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

.ui-chat .bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.ui-chat .in {
  background: var(--sheet);
  color: var(--ink);
}

.ui-chat .out {
  background: var(--accent);
  color: #0a0a0a;
  margin-left: auto;
}

.file-chip {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #eefbff;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, #fff);
  color: #0a0a0a;
  font-size: 0.8rem;
  font-weight: 600;
}

.seg {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  background: var(--sheet);
  border-radius: 999px;
}

.seg span {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.seg .on {
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ui-call {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  position: relative;
}

.call-stage {
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(0, 204, 255, 0.25), transparent 50%),
    url("https://images.unsplash.com/photo-1612349317150-e413f6a5b16d?auto=format&fit=crop&w=600&q=70")
      center/cover;
  display: grid;
  place-items: end start;
  padding: 14px;
  font-weight: 700;
  min-height: 280px;
}

.call-stage.doctor-cam {
  background:
    linear-gradient(160deg, rgba(0, 204, 255, 0.25), transparent 50%),
    url("https://images.unsplash.com/photo-1559839734-2b71ea197ec2?auto=format&fit=crop&w=600&q=70")
      center/cover;
}

.call-pip {
  position: absolute;
  top: 56px;
  right: 18px;
  width: 72px;
  height: 96px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background:
    url("https://images.unsplash.com/photo-1559839734-2b71ea197ec2?auto=format&fit=crop&w=200&q=70")
      center/cover;
}

.call-dock {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding-bottom: 8px;
}

.call-dock span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2a2c34;
}

.call-dock .end {
  background: #e53935;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.cal-grid i {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #eee;
}

.cal-grid i.slot {
  background: #c4c4c4;
}

.cal-grid i.book {
  background: var(--accent);
}

/* —— Bottom —— */
.bottom-cta {
  text-align: center;
  padding-bottom: 100px;
}

.bottom-cta p {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.bottom-cta .store-row {
  justify-content: center;
  margin-top: 24px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px;
  max-width: var(--max);
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .feat-grid,
  .how-grid,
  .role-band {
    grid-template-columns: 1fr;
  }
  .role-band.doctor .deck {
    order: 2;
  }
  .hero h1 {
    max-width: none;
  }
  .deck {
    height: 480px;
  }
  .deck-card {
    width: 180px;
  }
  .phone-screen {
    height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
  .hero-media {
    background:
      url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1800&q=80")
      center/cover;
  }
  .deck-card {
    transition: none;
  }
}

/* Compact language switch in sticky nav */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  margin-right: 4px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.nav-lang a {
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  text-decoration: none;
}
.nav-lang a:hover { color: var(--ink); }
.nav-lang a.is-active {
  color: var(--ink);
  background: var(--sheet);
}
.nav-lang__sep { color: var(--line); }

/* Install page (same design system) */
.install-page {
  min-height: 100vh;
  background: var(--bg);
}
.install-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.install-main h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.install-lede {
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 36em;
}
.install-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 720px) {
  .install-grid { grid-template-columns: 1fr 1fr; }
}
.install-card {
  background: var(--sheet-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.install-card h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.install-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.install-card .note {
  font-size: 0.82rem;
  margin-top: 12px;
  margin-bottom: 0;
}
.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-ink);
}
.install-btn.android {
  background: #111;
  color: #fff;
}
.install-version {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.install-back {
  display: inline-block;
  margin-top: 28px;
  color: var(--muted);
  font-weight: 500;
}
.install-back:hover { color: var(--ink); }

@media (max-width: 900px) {
  .nav-links { display: none; }
}
