:root {
  --sky-top: #eef9fc;
  --sky-mid: #c8eaf5;
  --sky-deep: #9dd4e8;
  --water: #5eb4cf;
  --card-sky-top: #e6f7ff;
  --card-sky-bottom: #ccecf9;
  --card-cyan: #38b8e6;
  --card-cyan-deep: #1f85b3;
  --card-ink: #244860;
  --card-ink-soft: #5c7a94;
  --ink: #1c3d4a;
  --ink-soft: #3d6573;
  --foam: #ffffff;
  --foam-soft: rgba(255, 255, 255, 0.72);
  --shadow: rgba(47, 110, 132, 0.18);
  --focus: #2a7f97;
}

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

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

body {
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Figtree", "Segoe UI", sans-serif;
  font-weight: 500;
  line-height: 1.45;
  background: var(--sky-mid);
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 78% 18%, #ffffff 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 12% 88%, #a8dceb 0%, transparent 50%),
    linear-gradient(165deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-deep) 100%);
}

.haze {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
}

.haze-a {
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  top: -8%;
  right: 8%;
  background: #ffffff;
  animation: drift 14s ease-in-out infinite alternate;
}

.haze-b {
  width: min(60vw, 520px);
  height: min(40vw, 360px);
  bottom: -12%;
  left: -8%;
  background: #7ec8de;
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

.ripple {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(70vw, 640px);
  height: 28%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    transparent 70%
  );
  animation: breathe 7s ease-in-out infinite;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1120px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 3rem);
}

.copy {
  max-width: 30rem;
  animation: rise 0.9s ease-out both;
}

.brand {
  margin: 0 0 0.85rem;
  font-family: "Baloo 2", "Figtree", sans-serif;
  font-size: clamp(4.5rem, 14vw, 7.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 28ch;
  font-family: "Baloo 2", "Figtree", sans-serif;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-width: 36rem;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(28, 61, 74, 0.22);
  background: var(--foam-soft);
  color: var(--ink);
  font-family: "Figtree", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: none;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.download:hover {
  background: #ffffff;
  border-color: rgba(28, 61, 74, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(47, 110, 132, 0.12);
}

.download:active {
  transform: translateY(0);
}

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

.platform {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  opacity: 0.85;
}

.install-one-liner {
  margin: 0 0 1.1rem;
  max-width: 36rem;
}

.install-label {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.command-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.command {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(28, 61, 74, 0.08);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: clamp(0.68rem, 1.6vw, 0.8rem);
  font-weight: 500;
  line-height: 1.4;
  overflow-x: auto;
  white-space: nowrap;
  user-select: all;
}

.copy-btn {
  flex-shrink: 0;
  min-width: 4.25rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(28, 61, 74, 0.22);
  border-radius: 10px;
  background: var(--foam-soft);
  color: var(--ink);
  font-family: "Figtree", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.copy-btn:hover {
  background: var(--foam);
  border-color: rgba(28, 61, 74, 0.4);
}

.copy-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.install-note {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
  opacity: 0.85;
}

.install {
  margin: 0;
  max-width: 42ch;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft);
  opacity: 0.8;
}

.install strong {
  font-weight: 600;
  color: var(--ink);
}

.demo {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr);
  align-items: end;
  justify-items: stretch;
  gap: 0.75rem;
  width: 100%;
  min-height: min(58vh, 480px);
  animation: rise 0.9s ease-out 0.08s both;
}

.nudge-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 260px;
  justify-self: center;
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    var(--card-sky-top) 0%,
    var(--card-sky-bottom) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 8px 28px rgba(31, 133, 179, 0.16),
    0 2px 6px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.nudge-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nudge-prompt {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--card-ink);
}

.nudge-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
  line-height: 1;
  filter: grayscale(0.15);
}

.nudge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: "Figtree", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nudge-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.nudge-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.nudge-btn-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.nudge-btn-water {
  color: #fff;
  background: linear-gradient(
    145deg,
    var(--card-cyan) 0%,
    var(--card-cyan-deep) 100%
  );
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(31, 133, 179, 0.28);
}

.nudge-btn-water:hover:not(:disabled) {
  filter: brightness(1.05);
}

.nudge-btn.is-done {
  opacity: 0.72;
  cursor: default;
  box-shadow: none;
}

.nudge-btn-water.is-done {
  color: var(--card-cyan-deep);
  background: rgba(56, 184, 230, 0.18);
  border-color: rgba(56, 184, 230, 0.25);
  filter: none;
}

.pet-stage {
  position: relative;
  justify-self: stretch;
  align-self: stretch;
  min-height: min(36vh, 280px);
  width: 100%;
  overflow: visible;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.pet-stage:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 6px;
  border-radius: 24px;
}

.pet-actor {
  position: absolute;
  left: 0;
  bottom: 10%;
  width: 220px;
  height: 238px;
  background-repeat: no-repeat;
  background-position: 0 0;
  filter: drop-shadow(0 16px 24px rgba(47, 110, 132, 0.22));
  will-change: transform;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.pet-hint {
  position: absolute;
  left: 50%;
  bottom: 0;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.pet-hint.is-visible {
  opacity: 0.9;
  transform: translateX(-50%) translateY(0);
}

.pet-hint.is-hidden {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(4px);
  transition-duration: 0.25s;
}

.pet-fallback {
  display: block;
  width: min(58vw, 260px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 18px 28px rgba(47, 110, 132, 0.22));
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-18px, 12px);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-50%) scaleX(1);
  }
  50% {
    opacity: 0.85;
    transform: translateX(-50%) scaleX(1.06);
  }
}

@media (max-width: 760px) {
  .stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.35rem;
    padding-top: clamp(1.75rem, 6vw, 3rem);
    padding-bottom: 2.5rem;
  }

  .copy {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .demo {
    order: 0;
    min-height: 0;
    width: min(100%, 400px);
    gap: 0.5rem;
  }

  .nudge-card {
    max-width: 240px;
    text-align: left;
  }

  .nudge-prompt {
    font-size: 0.88rem;
  }

  .nudge-btn {
    min-height: 2.55rem;
    font-size: 0.88rem;
  }

  .pet-stage {
    min-height: min(38vw, 200px);
  }

  .pet-actor {
    bottom: 14%;
  }

  .lede {
    max-width: 28ch;
  }

  .cta-group {
    justify-content: center;
  }

  .install-one-liner {
    width: 100%;
    max-width: 34rem;
  }

  .command-row {
    flex-direction: column;
  }

  .command {
    white-space: normal;
    word-break: break-all;
    text-align: left;
  }

  .copy-btn {
    align-self: center;
  }

  .install {
    max-width: 34ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .haze,
  .ripple,
  .copy,
  .demo {
    animation: none !important;
  }

  .nudge-card,
  .pet-hint,
  .nudge-btn {
    transition: none !important;
  }

  .nudge-card.is-visible {
    transform: none;
  }
}
