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

:root {
  --bg-top: #b8eed8;
  --bg-mid: #e4f8ee;
  --text: #111111;
  --text-muted: #4a5568;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
  --phone-width: 300px;
  --phone-height: 620px;
  --fade-duration: 0.85s;
  --carousel-interval: 4500ms;
  --fade-up-distance: 40px;
  --fade-from-right-distance: 72px;
  --carousel-fade-duration: 0.8s;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #ffffff;
  background-image: linear-gradient(
    180deg,
    var(--bg-top) 0%,
    var(--bg-mid) 42%,
    #ffffff 100%
  );
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
}

.hero {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "brand phone"
    "intro phone"
    "download phone"
    "social phone";
  gap: 0 64px;
  align-items: center;
}

.brand {
  grid-area: brand;
  margin-bottom: 32px;
  max-width: 520px;
}

.brand__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(280px, 100%);
  max-height: 168px;
  object-fit: contain;
}

.brand__tagline {
  margin: 8px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.hero__intro {
  grid-area: intro;
  max-width: 520px;
  margin-bottom: 32px;
}

.headline {
  margin: 0 0 24px;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.description {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.65;
}

.store-buttons {
  grid-area: download;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
  max-width: 520px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  min-width: 180px;
  background: var(--white);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.1);
}

.store-btn__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-btn__label {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.site-footer {
  padding: 20px 24px 32px;
  text-align: center;
}

.site-footer__text {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.social {
  grid-area: social;
  display: flex;
  gap: 12px;
  max-width: 520px;
}

.social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--white);
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social__link:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.social__link svg {
  width: 18px;
  height: 18px;
}

.hero__visual {
  grid-area: phone;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
}

.hero--policy .hero__visual {
  grid-area: mascot;
}

.phone {
  position: relative;
  width: var(--phone-width);
  height: var(--phone-height);
  background: var(--white);
  border-radius: 44px;
  border: 3px solid #1a1a1a;
  box-shadow: var(--shadow);
  padding: 14px 12px;
  transform: rotate(-4deg);
}

.phone__notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 18px 18px;
  z-index: 2;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #f8fafc;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.screenshot {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity var(--carousel-fade-duration) ease-in-out;
  pointer-events: none;
  will-change: opacity;
}

.screenshot--active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.screenshot__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

@keyframes rise-in {
  from {
    opacity: 0;
    filter: grayscale(1) saturate(0.2);
    transform: translateY(var(--fade-up-distance));
  }

  to {
    opacity: 1;
    filter: grayscale(0) saturate(1);
    transform: translateY(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    filter: grayscale(1) saturate(0.2);
    transform: translateX(var(--fade-from-right-distance));
  }

  to {
    opacity: 1;
    filter: grayscale(0) saturate(1);
    transform: translateX(0);
  }
}

.anim-rise-in {
  animation: rise-in var(--fade-duration) cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--fade-delay, 0ms);
}

.anim-slide-in-right {
  animation: slide-in-right var(--fade-duration) cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--fade-delay, 0ms);
}

[data-fade-order="0"] {
  --fade-delay: 0ms;
}

[data-fade-order="1"] {
  --fade-delay: 180ms;
}

[data-fade-order="2"] {
  --fade-delay: 360ms;
}

[data-fade-order="3"] {
  --fade-delay: 540ms;
}

[data-fade-order="4"] {
  --fade-delay: 720ms;
}

[data-fade-order="6"] {
  --fade-delay: 1080ms;
}

.brand__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page--policy {
  align-items: stretch;
}

.hero--policy {
  grid-template-areas:
    "intro mascot";
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 0 64px;
  align-items: start;
}

.hero--policy .brand {
  grid-area: auto;
  margin-bottom: 24px;
  max-width: none;
}

.brand--policy {
  display: flex;
  justify-content: center;
}

.brand--policy .brand__logo {
  width: min(240px, 100%);
  height: auto;
}

.hero__intro--policy {
  margin-bottom: 0;
  max-width: 640px;
}

.policy-content {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

.policy-content h2 {
  margin: 32px 0 12px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.policy-content h3 {
  margin: 24px 0 10px;
  font-size: 1.03125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.policy-content p {
  margin: 0 0 16px;
}

.policy-content ul {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

.policy-content li {
  margin: 0 0 10px;
}

.policy-content li:last-child {
  margin-bottom: 0;
}

.policy-content a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.policy-path {
  font-weight: 600;
  color: var(--text);
}

.policy-contact {
  color: var(--text);
}

.policy-content > :last-child {
  margin-bottom: 0;
}

.hero__visual--mascot {
  align-self: start;
  position: sticky;
  top: 32px;
  flex-direction: column;
  gap: 8px;
}

.mascot {
  display: block;
  width: min(420px, 100%);
  height: auto;
  object-fit: contain;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "phone"
      "intro"
      "download"
      "social";
    gap: 0;
    text-align: center;
  }

  .brand,
  .hero__intro,
  .store-buttons,
  .social {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .brand {
    margin-bottom: 28px;
  }

  .hero__intro {
    margin-bottom: 28px;
  }

  .description {
    margin-left: auto;
    margin-right: auto;
  }

  .store-buttons {
    justify-content: center;
    margin-bottom: 28px;
  }

  .social {
    justify-content: center;
  }

  .brand__logo {
    margin: 0 auto;
  }

  .hero__visual {
    margin-bottom: 36px;
  }

  .phone {
    transform: rotate(0);
    width: min(var(--phone-width), 280px);
    height: min(var(--phone-height), 580px);
  }

  .hero--policy {
    grid-template-areas:
      "mascot"
      "intro";
    grid-template-columns: 1fr;
  }

  .hero__visual--mascot {
    margin-bottom: 28px;
    position: static;
  }

  .hero--policy .brand {
    margin-bottom: 16px;
  }

  .mascot {
    width: min(320px, 85vw);
    margin: 0 auto;
  }

  .hero__intro--policy,
  .policy-content {
    margin-left: auto;
    margin-right: auto;
    max-width: none;
  }

  .policy-content {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 32px 16px 16px;
  }

  .site-footer {
    padding: 16px 16px 28px;
  }

  .store-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .store-btn {
    justify-content: center;
    min-width: unset;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anim-rise-in,
  .anim-slide-in-right {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .screenshot {
    transition: none;
  }
}
