@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --section-bg: #f7f7f8;
  --text: #111111;
  --muted: #444444;
  --muted-strong: #666666;
  --accent: #3b82f6;
  --border: #e6e7eb;
  --soft-border: rgba(17, 17, 17, 0.08);
  --hero-surface: #f7fbff;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 96px;
}

h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: normal;
}

h1 {
  font-size: clamp(2.75rem, 4vw, 3.25rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.75rem, 2.6vw, 2rem);
  line-height: 1.25;
  margin-bottom: 20px;
}

p {
  font-size: 1rem;
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration: none;
}

.button {
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1rem;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  transition: background 0.2s ease;
}

.button:hover {
  background: #2f6fe0;
  color: #ffffff;
}

.button.wide {
  width: 100%;
  padding: 18px 24px;
  border-radius: 14px;
  font-size: 1rem;
}

.sticky-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--soft-border);
  padding: 10px 16px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  min-height: 56px;
  backdrop-filter: blur(12px);
}

.sticky-cta span {
  font-size: 0.95rem;
  color: var(--text);
}

.sticky-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sticky-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero {
  display: flex;
  flex-direction: column;
}

.hero-surface {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 40px;
  background: var(--hero-surface);
  border-radius: 28px;
  padding: 28px 28px 36px;
  box-shadow: 0 24px 48px rgba(17, 17, 17, 0.08);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.hero-title {
  max-width: min(90%, 36ch);
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: start;
}

.hero-story-block {
  max-width: 48ch;
}

.hero-footer {
  display: grid;
  gap: 18px;
  width: 100%;
  justify-items: center;
  text-align: center;
}

.hero-footer .hero-callout,
.hero-footer .hero-transition {
  max-width: 56ch;
  width: 100%;
  margin: 0 auto;
}

.hero-story {
  list-style: none;
  padding: 0 0 0 22px;
  margin: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
  position: relative;
  line-height: 1.7;
}

.hero-story::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(59, 130, 246, 0.2);
}

.hero-story li {
  position: relative;
  padding-left: 12px;
}

.hero-story li::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.35);
}

.hero-callout {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 18px;
  padding: 20px 22px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  position: relative;
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.06);
}

.hero-callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.25);
}

.hero-callout p {
  margin: 0;
}

.hero-transition {
  color: var(--text);
  font-weight: 600;
  padding: 16px 18px;
  border-left: 3px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
  border-radius: 16px;
  line-height: 1.6;
}

.video-frame {
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 20px;
  padding: 12px;
  width: min(480px, 100%);
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.08);
}

.video-frame video {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.how-it-works {
  background: #f3f7ff;
  border-radius: 28px;
  padding: 12px;
}

.how-it-works-card {
  background: #fff;
  border-radius: 28px;
  padding: 32px 24px;
  border: 1px solid rgba(17, 17, 17, 0.05);
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.06);
  display: grid;
  gap: 32px;
}

.how-it-works-header {
  text-align: center;
  display: grid;
  gap: 16px;
}

.how-it-works-header h2 {
  margin-bottom: 0;
}

.how-it-works-divider {
  width: min(120px, 40%);
  height: 1px;
  background: rgba(17, 17, 17, 0.08);
  margin: 0 auto;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 68ch;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

.step-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.step-item:first-child {
  border-top: none;
  padding-top: 0;
}

.step-item:last-child {
  padding-bottom: 0;
}

.step-marker {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #2f6fe0;
  font-weight: 500;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.step-body {
  display: grid;
  gap: 10px;
}

.step-body p {
  margin: 0;
  line-height: 1.7;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}

.step-detail {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted-strong);
  line-height: 1.75;
}

.step-highlight {
  background: none;
  border: none;
  padding: 0;
}

.cases {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px;
  background: var(--section-bg);
  border-radius: 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.ghost {
  background: transparent;
  border: 1px solid var(--soft-border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.cases-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.case-slide {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--soft-border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
  min-width: 0;
  overflow: hidden;
}

.case-slide h3 {
  font-size: 1rem;
  color: var(--text);
}

.case-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}

.case-content > * {
  min-width: 0;
}

.case-shot {
  border: 1px solid var(--soft-border);
  background: #fafafa;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.85rem;
  color: var(--muted-strong);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-inline-size: 100%;
}

.case-shot--image {
  width: 100%;
  max-width: 360px;
  padding: 0;
  background: #f4f5f7;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(17, 17, 17, 0.08);
  font: inherit;
  color: inherit;
  text-align: left;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-self: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.case-shot--image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  display: block;
  max-inline-size: 100%;
}

.case-shot-fallback {
  display: none;
  min-height: 220px;
  padding: 24px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted-strong);
  background: #f4f5f7;
}

.case-shot--image.is-error img {
  display: none;
}

.case-shot--image.is-error .case-shot-fallback {
  display: flex;
}

.case-shot-label {
  display: block;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--muted-strong);
  background: #ffffff;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image.is-hidden {
  display: none;
}

.lightbox-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  min-height: 200px;
  max-width: 100%;
  color: #111;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--soft-border);
}

.lightbox-fallback.is-visible {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 30, 0.68);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  max-width: 90vw;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: stretch;
  justify-items: stretch;
  gap: 12px;
  box-shadow: 0 30px 80px rgba(10, 10, 10, 0.3);
}

.lightbox-content {
  width: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  display: block;
  height: auto;
  object-fit: contain;
  width: auto;
  transform: none;
  transform-origin: center center;
}

.lightbox-close {
  align-self: start;
  justify-self: end;
  border: 1px solid var(--soft-border);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.case-caption {
  font-size: 0.9rem;
  color: var(--muted);
}

.control {
  display: grid;
  gap: 48px;
  padding: 48px;
  background: #f1f6ff;
  border-radius: 28px;
}

.control-card {
  background: #fcfcfd;
  border-radius: 24px;
  padding: 32px 36px;
  border: 1px solid rgba(17, 17, 17, 0.05);
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.control-lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.control-label {
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.control-list {
  list-style: none;
  margin: 0;
  padding-left: 8px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.7;
}

.control-footnote {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--muted-strong);
  font-size: 0.95rem;
  line-height: 1.7;
}

.control-details {
  list-style: none;
  margin: 0;
  padding-left: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #5b5b5b;
  font-size: 0.92rem;
  line-height: 1.7;
}

.main-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
}

.caption {
  color: var(--muted-strong);
  font-size: 0.875rem;
}

.contacts {
  padding: 24px 0 8px;
}

.contacts-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.contacts h2 {
  color: var(--text);
  margin: 0;
}

.contacts-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.contacts-grid {
  display: grid;
  gap: 24px;
}

.contacts-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contacts-label {
  font-size: 0.85rem;
  color: var(--muted-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contacts-link {
  color: #2f6fe0;
  font-size: 1.05rem;
  text-decoration: none;
  word-break: break-word;
}

.contacts-link:hover {
  text-decoration: underline;
}

.contacts-value {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.6;
}

.footer {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 24px 16px 40px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--soft-border);
}

.footer a {
  color: var(--muted);
}

a:hover {
  text-decoration: underline;
  color: #2f6fe0;
}

.how-it-works {
  padding: 0 0 8px;
}

.legal-page main {
  max-width: 820px;
  padding: 72px 20px 64px;
  gap: 48px;
}

.legal-card {
  background: var(--section-bg);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--soft-border);
  display: grid;
  gap: 24px;
}

.legal-card h1 {
  margin-bottom: 0;
}

.legal-section {
  display: grid;
  gap: 12px;
}

.legal-section h2 {
  margin-bottom: 0;
}

.legal-list {
  list-style: disc;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

@media (min-width: 900px) {
  main {
    padding-top: 96px;
    gap: 96px;
  }

  .sticky-cta {
    left: auto;
    right: 32px;
    bottom: auto;
    top: 24px;
    width: 320px;
  }

  .hero-surface {
    gap: 48px;
    padding: 48px 64px 64px;
  }

  .how-it-works-card {
    padding: 56px 64px;
    border-radius: 32px;
  }

  .how-it-works {
    border-radius: 32px;
    padding: 16px;
  }

  .control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
  }

  .cases-slider {
    grid-auto-columns: minmax(360px, 1fr);
  }

  .case-shot--image {
    max-width: 480px;
  }

  .contacts-card {
    padding: 48px 56px;
  }

  .contacts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
  }
}

@media (max-width: 640px) {
  main {
    padding-top: 56px;
    gap: 64px;
  }

  h1 {
    font-size: clamp(1.9rem, 8vw, 2.1rem);
  }

  h2 {
    font-size: clamp(1.35rem, 5vw, 1.5rem);
  }

  .cases,
  .control {
    padding: 28px 20px;
  }

  .control {
    gap: 32px;
    border-radius: 24px;
  }

  .control-card {
    padding: 24px 22px;
    border-radius: 20px;
  }

  .control-title {
    font-size: 1.25rem;
  }

  .control-details {
    font-size: 0.9rem;
  }

  .case-content {
    grid-template-columns: 1fr;
  }

  .sticky-cta {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }

  .hero-surface {
    padding: 28px 20px 36px;
    border-radius: 24px;
    gap: 32px;
  }

  .contacts-card {
    padding: 28px 24px;
    border-radius: 20px;
  }

  .hero-title {
    max-width: 100%;
  }

  .hero-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-media {
    order: 1;
  }

  .hero-story-block {
    order: 2;
  }

  .hero-footer {
    gap: 24px;
  }

  .hero-footer .hero-callout,
  .hero-footer .hero-transition {
    max-width: 100%;
  }

  .hero-transition {
    padding: 16px 18px;
  }

  .how-it-works-card {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .how-it-works {
    border-radius: 24px;
  }

  .step-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
  }

  .step-marker {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .step-title {
    font-size: 1.05rem;
  }

  .step-detail {
    font-size: 0.88rem;
  }
}

@media (max-width: 900px) {
  main {
    max-width: 720px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: clamp(1.9rem, 8vw, 2.1rem);
  }

  h2 {
    font-size: clamp(1.35rem, 6vw, 1.5rem);
  }

  .button.wide {
    min-height: 60px;
  }

  .sticky-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sticky-cta .button {
    width: 100%;
  }
}
