:root {
  --home-pink: #ff72b6;
  --home-pink-strong: #ff4da6;
  --home-gold: #f4ca63;
  --home-ink: #10121c;
  --home-muted: rgba(255, 255, 255, 0.72);
  --home-line: rgba(255, 255, 255, 0.18);
  --home-glass: rgba(14, 15, 26, 0.58);
}

* { box-sizing: border-box; }

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--home-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.home-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #10121c url('../wallpaper/5/JFES190.webp') center / cover no-repeat;
  pointer-events: none;
}

.home-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 450ms ease;
  will-change: opacity;
}

.home-slide img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130%;
  height: 130%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  filter: saturate(1.05) brightness(0.92);
  will-change: transform;
}

.home-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(6, 8, 18, 0.94) 0%, rgba(8, 10, 20, 0.76) 42%, rgba(9, 10, 18, 0.38) 100%),
    linear-gradient(180deg, rgba(11, 12, 22, 0.30), rgba(8, 8, 15, 0.82)),
    radial-gradient(900px 600px at 82% 14%, rgba(255, 114, 182, 0.16), transparent 62%);
}

.home-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 0px) + clamp(22px, 4vw, 52px))
    clamp(24px, 7vw, 112px)
    calc(env(safe-area-inset-bottom, 0px) + clamp(20px, 3vw, 42px));
}

.home-hero {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 780px;
  padding: clamp(36px, 8vh, 94px) 0;
}

.home-kicker {
  margin: 0 0 14px;
  color: var(--home-pink);
  font-size: clamp(12px, 1.1vw, 16px);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  animation: home-enter-up 760ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(58px, 10vw, 142px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.18),
    0 16px 36px rgba(0, 0, 0, 0.42);
  animation: home-enter-up 820ms 150ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-subtitle {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--home-muted);
  font-size: clamp(16px, 1.55vw, 24px);
  line-height: 1.55;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.58);
  animation: home-enter-up 820ms 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 1.8vw, 22px);
  margin-top: clamp(34px, 5vw, 58px);
  animation: home-enter-up 820ms 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-action {
  position: relative;
  display: inline-flex;
  width: clamp(240px, 24vw, 320px);
  height: 72px;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  padding: 14px 28px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.home-action:hover,
.home-action:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.36);
}

.home-action:active { transform: translateY(-1px); }

.home-action-label,
.home-action-note {
  position: relative;
  z-index: 1;
}

.home-action-label {
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.14;
  font-weight: 800;
}

.home-action-note {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(11px, 0.86vw, 14px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.home-action.is-download {
  background: #ff5fae;
  border-color: rgba(255, 255, 255, 0.28);
}

.home-action.is-download:hover,
.home-action.is-download:focus-visible {
  background: #ff4da6;
  border-color: rgba(255, 255, 255, 0.58);
}

.home-action.is-cloud {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  overflow: visible;
  z-index: 5;
  background: #202235;
  border-color: rgba(255, 255, 255, 0.28);
}

.home-action.is-cloud:hover,
.home-action.is-cloud:focus-within {
  border-color: rgba(255, 114, 182, 0.72);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.36);
}

.home-cloud-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 13px 0 0 13px;
  color: #fff;
  text-decoration: none;
}

.home-cloud-main:hover,
.home-cloud-main:focus-visible {
  background: #2b2d43;
}

.home-cloud-menu {
  position: static;
  display: flex;
  flex: 0 0 58px;
}

.home-cloud-toggle {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0 13px 13px 0;
  background: #171927;
  color: #fff;
  cursor: pointer;
  list-style: none;
}

.home-cloud-toggle::-webkit-details-marker { display: none; }

.home-cloud-toggle::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
  transition: transform 160ms ease;
}

.home-cloud-menu[open] .home-cloud-toggle::after {
  transform: rotate(180deg);
}

.home-cloud-toggle:hover,
.home-cloud-toggle:focus-visible {
  background: #24263a;
}

.home-cloud-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: #171927;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
}

.home-cloud-option {
  display: flex;
  width: 100%;
  height: 72px;
  flex-direction: column;
  justify-content: center;
  padding: 14px 22px;
  color: #fff;
  text-decoration: none;
}

.home-cloud-option:hover,
.home-cloud-option:focus-visible {
  background: #2b2d43;
}

.home-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--home-line);
  color: rgba(255, 255, 255, 0.58);
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.4;
  font-weight: 700;
  animation: home-enter-up 760ms 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-footer > :first-child { justify-self: start; }
.home-footer > :last-child { justify-self: end; }

.home-footer a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  transition: color 160ms ease;
}

.home-footer a:hover,
.home-footer a:focus-visible {
  color: var(--home-pink);
}

.home-preview-link {
  justify-self: center;
  opacity: 0;
  transition: opacity 160ms ease, color 160ms ease;
}

.home-preview-link:hover,
.home-preview-link:focus-visible {
  opacity: 1;
  color: var(--home-pink);
}

@keyframes home-enter-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .home-shell {
    padding-left: 22px;
    padding-right: 22px;
  }

  .home-hero {
    justify-content: flex-start;
    padding-top: clamp(60px, 14vh, 110px);
  }

  .home-hero h1 {
    font-size: clamp(54px, 17vw, 92px);
  }

  .home-actions {
    width: 100%;
    flex-direction: column;
  }

  .home-action {
    width: 100%;
    min-width: 0;
  }

  .home-footer {
    grid-template-columns: 1fr;
  }

  .home-footer > :first-child,
  .home-footer > :last-child,
  .home-preview-link {
    justify-self: center;
  }
}

@media (max-height: 620px) and (min-width: 761px) {
  .home-shell { padding-top: 18px; padding-bottom: 18px; }
  .home-hero { padding: 22px 0; }
  .home-hero h1 { font-size: clamp(54px, 8vw, 92px); }
  .home-subtitle { margin-top: 14px; }
  .home-actions { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-kicker,
  .home-hero h1,
  .home-subtitle,
  .home-actions,
  .home-footer {
    animation: none;
  }

  .home-action {
    transition: none;
  }
}
