:root {
  --blue: #071b65;
  --purple: #603bb8;
  --light-purple: #9b84df;
  --gradient-footer: linear-gradient(135deg, #5a3aaf, #a189e3);
  --focus: #ffffff;
  --bottom-bar-h: clamp(92px, 13vh, 132px);
  --logo-w: clamp(210px, 20.5vw, 340px);
  --slogan-w: clamp(252px, 30vw, 468px);
  --badges-w: clamp(300px, 33vw, 480px);
}

* { box-sizing: border-box; }

html {
  width: 100%;
  min-height: 100%;
  background: #ffffff;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: #ffffff;
  color: var(--blue);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.home-page { overflow: hidden; }

img { max-width: 100%; }

.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;
}

.landing {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
}

.hero {
  position: absolute;
  inset: 0 0 var(--bottom-bar-h) 0;
  z-index: 1;
  background-image: image-set(
    url("../images/hero-clinic-cool.webp") type("image/webp"),
    url("../images/hero-clinic-cool.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-position: center calc(100% + 64px);
  background-size: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,0.96) 11%,
      rgba(255,255,255,0.62) 21%,
      rgba(255,255,255,0.16) 34%,
      rgba(255,255,255,0) 48%
    );
}

.brand {
  position: absolute;
  top: max(32px, calc(env(safe-area-inset-top) + 10px));
  left: 50%;
  z-index: 3;
  display: grid;
  width: min(86vw, 620px);
  gap: clamp(16px, 2vh, 28px);
  justify-items: center;
  transform: translateX(-50%);
}

.logo,
.slogan,
.store-badge {
  display: block;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.logo {
  width: var(--logo-w);
  object-fit: contain;
}

.slogan {
  width: var(--slogan-w);
  max-width: 92vw;
  object-fit: contain;
}

.bottom-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  height: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--gradient-footer);
  box-shadow: 0 -18px 38px rgba(7, 27, 101, 0.12);
}

.store-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.9vw, 14px);
  width: var(--badges-w);
  max-width: 84vw;
  transform: translate(-50%, -36%);
}

.store-badge { width: 100%; }

.store-link {
  flex: 1 1 0;
  display: block;
  border-radius: 14px;
  cursor: pointer;
  filter: drop-shadow(0 15px 18px rgba(7, 27, 101, 0.28));
  transition:
    filter 180ms ease,
    transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.store-link:hover,
.store-link:focus-visible {
  filter: drop-shadow(0 20px 24px rgba(7, 27, 101, 0.38));
  transform: translateY(-2px) scale(1.035);
}

.store-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.legal-line {
  position: absolute;
  right: 16px;
  bottom: max(21px, calc(env(safe-area-inset-bottom) + 9px));
  left: 16px;
  z-index: 5;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.2;
  text-align: center;
}

.legal-line a,
.legal-line a:visited,
.privacy-legal-line a,
.privacy-legal-line a:visited {
  color: #ffffff;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-line a:hover,
.legal-line a:focus-visible,
.privacy-legal-line a:hover,
.privacy-legal-line a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.legal-line a:focus-visible,
.privacy-legal-line a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-radius: 3px;
}

.privacy-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(246,248,255,1) 100%);
}

.privacy-shell {
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) 0 72px;
}

.privacy-logo-link {
  display: block;
  width: fit-content;
  margin: 0 auto clamp(36px, 5vw, 54px);
  border-radius: 8px;
  transition: transform 180ms ease;
}

.privacy-logo-link:hover,
.privacy-logo-link:focus-visible {
  transform: translateY(-2px) scale(1.035);
}

.privacy-logo-link:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 8px;
}

.privacy-logo {
  display: block;
  width: clamp(180px, 26vw, 280px);
  height: auto;
}

.privacy-content {
  color: #172a63;
  font-size: 18px;
  line-height: 1.7;
}

.privacy-kicker {
  margin: 0 0 8px;
  color: #6d75a1;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.privacy-content h1 {
  margin: 0 0 28px;
  color: var(--blue);
  font-size: clamp(34px, 5.4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.privacy-content h2 {
  margin: 38px 0 10px;
  color: var(--blue);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  letter-spacing: 0;
}

.privacy-content p {
  margin: 0 0 18px;
}

.privacy-content strong {
  color: var(--blue);
}

.privacy-content a,
.privacy-content a:visited {
  color: var(--purple);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 120ms ease;
}

.privacy-content a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.privacy-content a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 3px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.privacy-legal-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.2;
  text-align: center;
}

.privacy-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 18px 16px;
  height: 88px;
  background: var(--gradient-footer);
}

@media (prefers-reduced-motion: reduce) {
  .store-link {
    transition: none;
  }

  .store-link:hover,
  .store-link:focus-visible,
  .privacy-logo-link:hover,
  .privacy-logo-link:focus-visible {
    transform: none;
  }
}

@media (max-width: 768px) {
  :root {
    --bottom-bar-h: 92px;
    --logo-w: clamp(214px, 54vw, 308px);
    --slogan-w: clamp(260px, 71vw, 400px);
    --badges-w: clamp(280px, 74vw, 420px);
  }

  .landing { min-height: 560px; }

  .hero {
    background-position: calc(50% + 20px) calc(100% + 88px);
    background-size: auto 100%;
  }

  .hero::before {
    background:
      linear-gradient(
        to bottom,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.97) 13%,
        rgba(255,255,255,0.66) 27%,
        rgba(255,255,255,0.16) 43%,
        rgba(255,255,255,0) 58%
      );
  }

  .brand {
    top: max(74px, calc(env(safe-area-inset-top) + 62px));
    gap: 14px;
  }

  .bottom-bar { box-shadow: 0 -14px 30px rgba(7, 27, 101, 0.11); }

  .store-wrap {
    max-width: 88vw;
    transform: translate(-50%, -33%);
  }

  .legal-line {
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 8px));
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  :root {
    --bottom-bar-h: 86px;
    --logo-w: min(67vw, 280px);
    --slogan-w: min(82vw, 354px);
    --badges-w: min(86vw, 380px);
  }

  .landing { min-height: 600px; }
  .hero { background-position: calc(50% + 20px) calc(100% + 96px); }

  .legal-line {
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px));
  }

  .privacy-shell {
    width: min(100% - 28px, 860px);
    padding-top: 30px;
  }

  .privacy-content {
    font-size: 16px;
    line-height: 1.65;
  }
}

@media (min-width: 1200px) {
  .brand { top: clamp(30px, calc(3.2vh + 10px), 52px); }
}

@supports not (height: 100svh) {
  .landing { height: 100vh; }
}
