:root {
  --ink: #172033;
  --muted: #5d6878;
  --soft-blue: #dff5ff;
  --blue: #58afe6;
  --blue-deep: #286fb0;
  --pink: #ff9fbd;
  --mint: #bfead6;
  --butter: #ffe4a6;
  --surface: rgba(255, 255, 255, 0.82);
  --line: rgba(43, 69, 96, 0.12);
  --shadow: 0 24px 70px rgba(46, 80, 118, 0.16);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: #f7fbfd;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(223, 245, 255, 0.92), rgba(255, 247, 238, 0.86) 48%, rgba(239, 250, 244, 0.9)),
    #f7fbfd;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand-mark {
  width: 30px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: url("assets/bubbly-app-icon.png") center / cover no-repeat;
  box-shadow: 0 8px 20px rgba(40, 111, 176, 0.22);
}

.nav-links {
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(54, 78, 108, 0.08);
}

.nav-links a {
  padding: 8px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
}

main {
  overflow: hidden;
}

.hero,
.preview-section,
.features-section,
.download-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(330px, 0.98fr);
  align-items: center;
  min-height: calc(100svh - 74px);
  padding: 42px 0 76px;
  gap: clamp(34px, 7vw, 92px);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #4b7d86;
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 12px;
  font-size: clamp(4.5rem, 12vw, 9.5rem);
  line-height: 0.82;
  letter-spacing: 0;
}

.subheadline {
  max-width: 620px;
  margin-bottom: 16px;
  color: #283548;
  font-size: clamp(1.42rem, 3vw, 2.3rem);
  line-height: 1.08;
  font-weight: 720;
  letter-spacing: 0;
}

.hero-description,
.section-heading p,
.download-section p,
.site-footer p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-description {
  max-width: 610px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 21px;
  border: 1px solid rgba(16, 76, 128, 0.12);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  box-shadow: 0 14px 30px rgba(40, 111, 176, 0.26);
  font-weight: 760;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(40, 111, 176, 0.32);
}

.primary-button:focus-visible,
.nav-links a:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(88, 175, 230, 0.46);
  outline-offset: 3px;
}

.supporting-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.product-hunt-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 22px;
  border-radius: 8px;
}

.product-hunt-badge img {
  display: block;
  width: 250px;
  max-width: 100%;
  height: auto;
}

.hero-product {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.bubbly-stage {
  position: relative;
  width: min(100%, 430px);
  min-height: 430px;
}

.bubbly-stage::after {
  position: absolute;
  right: 22%;
  bottom: 12%;
  width: 46%;
  height: 18px;
  border-radius: 50%;
  background: rgba(56, 94, 130, 0.1);
  filter: blur(10px);
  content: "";
}

.bubbly-drift {
  position: absolute;
  inset: 8% 6% auto auto;
  width: 76%;
  aspect-ratio: 1;
  animation: pageWander 9s ease-in-out infinite;
}

.bubbly-face {
  border: 5px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 255, 255, 0.54) 0 13%, transparent 14%),
    linear-gradient(145deg, #94d9ef 0%, #70b9e7 42%, #5c89ce 100%);
  box-shadow:
    inset 0 -18px 28px rgba(37, 88, 150, 0.15),
    0 28px 64px rgba(45, 94, 153, 0.2);
}

.bubbly-face {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  animation: breathe 5.4s ease-in-out infinite;
}

.bubble-shine,
.bubble-eye,
.bubble-cheek,
.bubble-smile {
  position: absolute;
  display: block;
}

.bubble-shine.large {
  top: 17%;
  left: 16%;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(227, 250, 255, 0.74);
}

.bubble-shine.small {
  top: 5%;
  right: 1%;
  width: 26%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
}

.bubble-eye {
  top: 42%;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
    #182941;
  animation: blink 7s ease-in-out infinite;
}

.bubble-eye.left {
  left: 32%;
}

.bubble-eye.right {
  right: 32%;
}

.bubble-cheek {
  top: 60%;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(201, 139, 203, 0.62);
}

.bubble-cheek.left {
  left: 24%;
}

.bubble-cheek.right {
  right: 24%;
}

.bubble-smile {
  left: 39%;
  bottom: 30%;
  width: 22%;
  height: 12%;
  border-bottom: 7px solid rgba(24, 41, 65, 0.84);
  border-radius: 0 0 999px 999px;
}

.preview-section,
.features-section {
  padding: 70px 0;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 30px;
}

.section-heading.compact {
  max-width: 760px;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.desktop-preview {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.window-bar span {
  width: 11px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.window-bar span:nth-child(1) {
  background: #ff8f9a;
}

.window-bar span:nth-child(2) {
  background: var(--butter);
}

.window-bar span:nth-child(3) {
  background: var(--mint);
}

.video-scene {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(219, 244, 255, 0.72), rgba(255, 255, 255, 0.52)),
    repeating-linear-gradient(90deg, rgba(40, 111, 176, 0.05) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(40, 111, 176, 0.04) 0 1px, transparent 1px 92px);
}

.product-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #eef8fc;
  object-fit: cover;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(53, 82, 112, 0.1);
}

.feature-card:nth-child(2) {
  background: rgba(244, 251, 255, 0.86);
}

.feature-card:nth-child(3) {
  background: rgba(255, 250, 237, 0.86);
}

.feature-card:nth-child(4) {
  background: rgba(246, 255, 250, 0.86);
}

.feature-card.wide {
  grid-column: span 2;
  background: rgba(255, 248, 252, 0.86);
}

.feature-card.quiet-card {
  background: rgba(246, 255, 250, 0.86);
}

.feature-card.controls-card {
  background: rgba(244, 251, 255, 0.86);
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.16rem;
  letter-spacing: 0;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

.download-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
  margin-bottom: 38px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  scroll-margin-top: 92px;
}

.download-section h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.download-section p {
  max-width: 760px;
  margin-bottom: 0;
}

.secondary-placement {
  white-space: nowrap;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin-bottom: 0;
  font-size: 0.94rem;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes pageWander {
  0%,
  100% {
    transform: translate(-18px, 8px) rotate(-2deg);
  }

  32% {
    transform: translate(18px, -16px) rotate(1deg);
  }

  66% {
    transform: translate(6px, 18px) rotate(-1deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }
}

@keyframes blink {
  0%,
  88%,
  92%,
  100% {
    transform: scaleY(1);
  }

  90% {
    transform: scaleY(0.12);
  }
}

@media (max-width: 900px) {
  .site-header {
    position: static;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
  }

  .hero-product {
    order: -1;
  }

  .bubbly-stage {
    width: min(100%, 340px);
    min-height: 340px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card.wide {
    grid-column: span 2;
  }

  .download-section {
    grid-template-columns: 1fr;
  }

  .secondary-placement {
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .preview-section,
  .features-section,
  .download-section,
  .site-footer {
    width: min(100% - 24px, 366px);
    margin-right: auto;
    margin-left: 12px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
  }

  .nav-links {
    width: 100%;
    max-width: 366px;
    justify-content: space-between;
  }

  .nav-links a {
    flex: 1;
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    text-align: center;
  }

  h1 {
    font-size: clamp(3.7rem, 18vw, 4.7rem);
  }

  h2 {
    font-size: clamp(1.9rem, 7vw, 2.45rem);
  }

  .subheadline {
    font-size: clamp(1.18rem, 6vw, 1.42rem);
  }

  .hero {
    gap: 20px;
    padding-bottom: 18px;
  }

  .bubbly-stage {
    width: min(100%, 220px);
    min-height: 240px;
  }

  .hero-actions,
  .primary-button {
    width: 100%;
  }

  .supporting-note {
    max-width: 280px;
  }

  .product-hunt-badge {
    margin-top: 18px;
  }

  .preview-section,
  .features-section {
    padding: 50px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card.wide {
    grid-column: auto;
    min-height: auto;
  }

  .download-section {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
