:root {
  --bg-ink: #081017;
  --bg-tint: #0f766e;
  --surface: #ffffff;
  --surface-soft: #f6faf9;
  --text-strong: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border-soft: #dbe7e4;
  --accent: #0f766e;
  --accent-strong: #0b5f58;
  --focus-ring: #22c55e;
  --shadow-panel: 0 24px 70px rgba(2, 8, 23, 0.12);
  --shadow-device: 0 24px 60px rgba(15, 23, 42, 0.34);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --font-title: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: #e8efee;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 4% 2%, rgba(15, 118, 110, 0.16) 0%, rgba(15, 118, 110, 0) 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0) 65%),
    linear-gradient(145deg, #f3f7f7 0%, #ecf2f1 100%);
  z-index: -1;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 14px 20px 12px;
  background: var(--surface);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  /* row-gap guarantees breathing space between the hero and the footer
     even when content exactly fits the viewport. The footer also gets
     margin-top:auto below so it hugs the bottom of the shell at fresh
     loads but is pushed naturally by content when the page scrolls. */
  row-gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 600;
}

.promo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.promo-header .brand {
  font-size: 1.4rem;
  font-family: var(--font-title);
}

.promo-header__guest {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
}

.hero__content,
.hero__visual {
  min-width: 0;
}

.hero__title-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.hero__title-logo {
  display: block;
  width: auto;
  height: clamp(300px, 32vw, 460px);
  flex: 0 0 auto;
}

.hero__content h1 {
  margin: 0;
  margin-left: -104px;
  font-family: var(--font-title);
  color: var(--text-strong);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-size: clamp(1.8rem, 3.1vw, 2.9rem);
  text-wrap: balance;
}

.hero__lead {
  margin: -80px 0 0;
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  color: #1f2937;
  line-height: 1.6;
}

.hero__supporting {
  margin: 10px 0 0;
  color: var(--text-body);
  line-height: 1.62;
  font-size: clamp(0.95rem, 1.25vw, 1.05rem);
  max-width: 64ch;
}

.hero__steps-title {
  margin: 16px 0 0;
  color: var(--text-strong);
  font-family: var(--font-title);
  font-size: 1.2rem;
}

.feature-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.feature-list li {
  position: relative;
  padding: 9px 12px 9px 42px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: #213346;
  line-height: 1.35;
  font-size: 0.9rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(160deg, #14b8a6, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.cta-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  min-height: 44px;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: 1px solid var(--accent-strong);
  color: #ffffff;
}

.btn--secondary {
  color: var(--text-strong);
  border: 1px solid #c9d6d2;
  background: #ffffff;
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.device-frame {
  position: relative;
  width: min(352px, 100%, max(220px, calc((100dvh - 280px) * 0.461)));
  aspect-ratio: 430 / 932;
  border-radius: 48px;
  padding: 12px;
  background:
    radial-gradient(120% 100% at 20% 10%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, #19303f 0%, #102531 100%);
  box-shadow: var(--shadow-device);
  animation: floatDevice 7s ease-in-out infinite;
}

.device-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 132px;
  height: 22px;
  border-radius: 0 0 12px 12px;
  transform: translateX(-50%);
  background: rgba(8, 16, 23, 0.72);
  z-index: 2;
}

.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: #021017;
}

.hero-main-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 360ms ease;
}

.device-screen.is-ready .hero-main-image {
  opacity: 1;
}

/* The new device-preview.jpg already includes its own phone frame baked
   into the image, so we render it bare (no synthetic .device-frame
   wrapper, no notch overlay) and let it size to its natural aspect. */
.hero-main-image--bare {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  max-width: 420px;
  margin: 0 auto;
  object-fit: contain;
  opacity: 1;
  transition: none;
  display: block;
}

.hero-thumbs--hidden {
  display: none !important;
}

.hero-thumbs {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 4px 0 2px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.hero-thumb {
  appearance: none;
  border: 1px solid #c9d6d2;
  background: #f8fbfa;
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
  flex: 0 0 auto;
  width: 76px;
  height: 114px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.hero-thumb img {
  display: block;
  width: 62px;
  height: 98px;
  object-fit: cover;
  border-radius: 8px;
}

.hero-thumb:hover,
.hero-thumb:focus-visible {
  border-color: #8db7af;
  transform: translateY(-1px);
}

.hero-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
  background: #ffffff;
}

.device-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.02) 20%, rgba(255, 255, 255, 0.18) 40%, rgba(255, 255, 255, 0.02) 60%),
    radial-gradient(120% 100% at 20% 8%, rgba(15, 118, 110, 0.28), rgba(15, 118, 110, 0.06) 45%, rgba(2, 16, 23, 0.2) 100%);
  background-size: 220% 100%, 100% 100%;
  animation: screenShimmer 2.4s linear infinite;
  pointer-events: none;
}

.device-screen.is-ready::before {
  animation: none;
  opacity: 0;
}

.screen-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation-duration: 16s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: opacity, filter;
  transition: opacity 480ms ease, filter 560ms ease;
  filter: blur(0);
}

.screen-image.is-deferred {
  filter: blur(12px) saturate(0.88);
}

.screen-image.is-loaded {
  filter: blur(0);
}

.screen-image--1 {
  animation-name: frameOne;
}

.screen-image--2 {
  animation-name: frameTwo;
}

.screen-image--3 {
  animation-name: frameThree;
}

.screen-image--4 {
  animation-name: frameFour;
}

.site-footer {
  /* margin-top:auto pushes the footer to the bottom of the flex shell
     when content is short, but is overridden by row-gap above and the
     natural document flow when content overflows (zoomed-in users). */
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.promo-final {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: #ecfdf5;
}

.promo-final h2,
.promo-final p {
  margin: 0;
}

.promo-final h2 {
  color: var(--text-strong);
  font-family: var(--font-title);
}

.promo-final p {
  margin-top: 6px;
}

@media (max-width: 640px) {
  .promo-header,
  .promo-final {
    align-items: stretch;
    flex-direction: column;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: #f8fbfa;
  border-color: #b8ccc7;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #118579, #0e6f65);
}

@keyframes frameOne {
  0%, 24% {
    opacity: 1;
  }
  28%, 100% {
    opacity: 0;
  }
}

@keyframes frameTwo {
  0%, 24% {
    opacity: 0;
  }
  28%, 48% {
    opacity: 1;
  }
  52%, 100% {
    opacity: 0;
  }
}

@keyframes frameThree {
  0%, 48% {
    opacity: 0;
  }
  52%, 72% {
    opacity: 1;
  }
  76%, 100% {
    opacity: 0;
  }
}

@keyframes frameFour {
  0%, 72% {
    opacity: 0;
  }
  76%, 96% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes floatDevice {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes screenShimmer {
  0% {
    background-position: 130% 0, 0 0;
  }
  100% {
    background-position: -130% 0, 0 0;
  }
}

/* Desktop ≥981px: aim for a one-screen hero on a fresh load, but
   always allow the page to scroll if content exceeds the viewport —
   e.g. when the user zooms past ~110%, uses a larger system font, or
   has a short window. Locking overflow:hidden previously hid the CTA
   buttons behind the footer at >125% zoom. min-height keeps the shell
   filling the screen at fresh loads; row-gap on the shell + margin-
   top:auto on the footer keep the CTAs clear of it. */
@media (min-width: 981px) {
  .page-shell {
    min-height: 100dvh;
  }

  .hero__title-logo {
    height: clamp(240px, 36vh, 440px);
  }

  /* Heading + lead offsets track the vh-scaled logo so they stay
     tucked against the wordmark without overlapping it as the logo
     shrinks on shorter screens (~20% of the logo = its padding). */
  .hero__content h1 {
    margin-left: clamp(-86px, -7vh, -47px);
  }

  .hero__lead {
    margin-top: clamp(-74px, -5.5vh, -34px);
  }

  .hero-main-image--bare {
    max-height: 68vh;
  }
}

@media (max-width: 980px) {
  /* Tablet logo is ~300px (clamp floor) — the desktop offsets
     over-pull and overlap it; modest fixed offsets instead. */
  .hero__content h1 {
    margin-left: -56px;
  }

  .hero__lead {
    margin-top: -44px;
  }

  .page-shell {
    width: min(980px, calc(100% - 20px));
    min-height: auto;
    margin: 10px auto;
    padding: 16px;
  }

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

  .hero__visual {
    order: 2;
    padding: 10px 0 0;
  }

  .hero__content {
    order: 1;
  }

  .device-frame {
    width: min(300px, 100%);
  }
}

@media (max-width: 640px) {
  /* Stack logo above heading on phones — side-by-side is too cramped
     below ~640px, and the desktop negative margins must be reset. */
  .hero__title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .hero__title-logo {
    height: 200px;
  }

  .hero__content h1 {
    margin-left: 0;
    margin-top: -24px;
  }

  .hero__lead {
    margin-top: 12px;
  }

  .hero__lead,
  .hero__supporting {
    text-wrap: pretty;
  }

  .feature-list li {
    font-size: 0.92rem;
    padding: 10px 10px 10px 40px;
  }

  .cta-row {
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .hero-thumbs {
    justify-content: flex-start;
  }

  .site-footer {
    margin-top: 18px;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .device-frame,
  .screen-image,
  .device-screen::before,
  .btn {
    animation: none !important;
    transition: none !important;
  }

  .screen-image {
    opacity: 0;
  }

  .screen-image--1 {
    opacity: 1;
  }
}
