/* Lungrot marketing site — layout language inspired by thebrainrotapp.com,
   recolored to LungrotTheme sky blues and greens. */

@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800;900&display=swap");

:root {
  /* LungrotTheme / cleanAir sky */
  --sky-top: #8cc7f5;
  --sky-mid: #c7e8fc;
  --sky-low: #edf7fc;
  --ink: #14171c;
  --ink-2: #59616b;
  --muted: #7a8490;
  --primary: #3880fa;
  --primary-deep: #2a66d4;
  --paper: #ffffff;
  --cream: #f4f9fc;
  --star: #f5a623;
  --grass-1: #71c678;
  --grass-2: #4a9f51;
  --lung: #faadb8;
  --display: "Rubik", system-ui, -apple-system, sans-serif;
  --pad: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

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

html {
  background: var(--sky-top);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

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

h1,
h2 {
  text-wrap: balance;
}

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

.inner {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

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

/* ---------- world pieces ---------- */
.world {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-low) 100%);
}

.cloud {
  position: absolute;
  opacity: 0.95;
  pointer-events: none;
  animation: drift 70s linear infinite;
}

.cloud.c1 {
  width: min(26vw, 300px);
  top: 9%;
  left: -30%;
  animation-duration: 85s;
}

.cloud.c2 {
  width: min(32vw, 380px);
  top: 20%;
  left: -40%;
  animation-duration: 110s;
  animation-delay: -55s;
}

@keyframes drift {
  to {
    transform: translateX(170vw);
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes float-y-centered {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

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

.hill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  pointer-events: none;
}

.hill svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- nav ---------- */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding-top: max(18px, env(safe-area-inset-top, 0px));
}

.nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(20, 23, 28, 0.12);
}

.nav-cta span {
  color: var(--muted);
  font-weight: 500;
}

.coming-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(20, 23, 28, 0.08);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.coming-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

/* ---------- hero ---------- */
.hero {
  min-height: max(720px, 100svh);
  display: grid;
}

.hero > .inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 0;
  padding-top: 120px;
  padding-bottom: 0;
  width: 100%;
  animation: rise-in 0.7s ease both;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.hero .eyebrow img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  max-width: 14ch;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero .sub {
  margin-top: 18px;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ink-2);
  max-width: 34ch;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 28px;
  position: relative;
  z-index: 4;
}

.store-badge {
  display: inline-block;
  position: relative;
}

.store-badge img {
  height: 58px;
  width: auto;
}

.store-badge.is-placeholder {
  cursor: default;
}

.store-badge .note {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: min(640px, 92vw);
  margin: 40px auto 0;
  min-height: min(480px, 58vw);
  display: grid;
  place-items: end center;
  padding-bottom: 0;
}

.hero-mascot {
  position: absolute;
  left: 8%;
  bottom: 28%;
  width: min(220px, 28vw);
  z-index: 2;
  filter: drop-shadow(0 18px 24px rgba(40, 80, 120, 0.22));
  animation: float-y 4.5s ease-in-out infinite;
  pointer-events: none;
}

.hero-phone {
  position: relative;
  z-index: 3;
  width: min(260px, 42vw);
  filter: drop-shadow(0 24px 30px rgba(24, 60, 30, 0.28));
}

.hero-phone img {
  width: 100%;
  height: auto;
  border-radius: 28px;
}

.hero .hill {
  height: 22%;
}

@media (min-width: 761px) {
  .hero {
    min-height: 0;
    background: linear-gradient(180deg, #8cc7f5 0%, #c7e8fc 46%, #edf7fc 68%, var(--cream) 100%);
  }

  .hero .cloud {
    display: none;
  }

  .hero > .inner {
    padding-top: 112px;
  }

  .hero-stage {
    width: min(720px, 70vw);
    min-height: min(520px, 54vh);
    margin-top: 36px;
  }

  .hero-mascot {
    left: 6%;
    bottom: 30%;
    width: min(240px, 18vw);
  }

  .hero-phone {
    width: min(280px, 22vw);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: auto;
  }

  .hero > .inner {
    padding-top: 96px;
    padding-bottom: 8px;
  }

  .hero .cloud.c2 {
    display: none;
  }

  .nav-links {
    display: none;
  }

  /* Phone already shows the lung — hide the separate mascot on small screens */
  .hero-mascot {
    display: none;
  }

  .hero-stage {
    width: min(280px, 72vw);
    min-height: 0;
    margin-top: 28px;
  }

  .hero-phone {
    width: 100%;
  }

  .store-badge img {
    height: 52px;
  }
}

/* ---------- feature bands ---------- */
.band {
  position: relative;
  padding: 88px 0 0;
  background: var(--cream);
}

.band h2,
.shots h2,
.faq h2,
.proof h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}

.band .lead,
.shots .lead,
.faq .lead {
  text-align: center;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 44ch;
  margin: 14px auto 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.feature {
  background: var(--paper);
  border-radius: 28px;
  padding: 26px 24px 22px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: 0 2px 0 rgba(20, 23, 28, 0.05);
}

.feature .icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #d7ecff, #b8dbff);
  position: relative;
}

.feature .icon span {
  display: block;
  position: relative;
}

.icon-timer span {
  width: 22px;
  height: 22px;
  border: 3px solid var(--primary);
  border-radius: 50%;
}

.icon-timer span::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 3px;
  width: 2px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
}

.icon-lung span {
  width: 26px;
  height: 18px;
  background: var(--lung);
  border-radius: 14px 14px 10px 10px;
  box-shadow: 12px 2px 0 var(--lung);
  transform: translateX(-6px);
}

.icon-photo span {
  width: 26px;
  height: 20px;
  border: 3px solid var(--primary);
  border-radius: 5px;
}

.icon-photo span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  top: 4px;
  left: 4px;
}

.icon-jar span {
  width: 18px;
  height: 22px;
  border: 3px solid var(--primary);
  border-radius: 0 0 8px 8px;
  border-top: 0;
  box-shadow: inset 0 -8px 0 rgba(56, 128, 250, 0.25);
}

.icon-card span {
  width: 24px;
  height: 18px;
  border: 3px solid var(--primary);
  border-radius: 4px;
}

.icon-sky span {
  width: 22px;
  height: 14px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 8px 4px 0 #fff, -6px 6px 0 rgba(255, 255, 255, 0.85);
}

.feature h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.feature p {
  color: var(--ink-2);
  font-size: 1.02rem;
}

.feature:nth-child(2) {
  transform: translateY(18px);
}

.feature:nth-child(5) {
  transform: translateY(18px);
}

/* Progressive enhancement: fade cards in only when JS motion is active */
.js-motion .feature,
.js-motion .step {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js-motion .feature.in-view,
.js-motion .step.in-view {
  opacity: 1;
  transform: none;
}

.js-motion .feature.in-view:nth-child(2),
.js-motion .feature.in-view:nth-child(5) {
  transform: translateY(18px);
}

@media (max-width: 760px) {
  .js-motion .feature.in-view:nth-child(2),
  .js-motion .feature.in-view:nth-child(5) {
    transform: none;
  }
}

@media (max-width: 760px) {
  .features {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 4px;
  }

  .feature:nth-child(2),
  .feature:nth-child(5) {
    transform: none;
  }
}

/* ---------- screenshots ---------- */
.shots {
  padding: 96px 0 0;
  background: var(--cream);
}

.meadow {
  position: relative;
  margin-top: 44px;
  padding: 24px 0 56px;
}

.meadow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  background: linear-gradient(180deg, var(--grass-1), var(--grass-2));
  border-radius: 50% 50% 0 0 / 48px 48px 0 0;
}

.phones {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 2.4vw, 28px);
  max-width: 980px;
  margin: 0 auto;
  align-items: end;
  padding: 0 var(--pad);
}

.phones figure {
  margin: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.phones img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 18px 28px rgba(20, 40, 20, 0.22);
}

.phones figcaption {
  font-weight: 700;
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.phones.mid figure:nth-child(2) img {
  transform: translateY(-18px);
}

.shot-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px var(--pad) 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.shot-rail::-webkit-scrollbar {
  display: none;
}

.shot-rail figure {
  margin: 0;
  flex: none;
  width: min(200px, 58vw);
  scroll-snap-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.shot-rail::after {
  content: "";
  flex: none;
  width: 12px;
}

.shot-rail img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 14px 28px rgba(20, 40, 20, 0.2);
}

.shot-rail figcaption {
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 760px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .mobile-only.shot-rail {
    display: flex !important;
  }

  .meadow::before {
    height: 56%;
  }
}

/* ---------- how / loop ---------- */
.loop {
  padding: 96px 0 40px;
  background: var(--cream);
}

.loop h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 16ch;
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.step {
  display: grid;
  gap: 8px;
  background: #eef8ff;
  border-radius: 24px;
  padding: 22px;
}

.step .n {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.step p {
  color: var(--ink-2);
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- faq ---------- */
.faq {
  padding: 48px 0 96px;
  background: var(--cream);
}

.faq .list {
  max-width: 760px;
  margin: 32px auto 0;
  display: grid;
  gap: 12px;
}

details {
  background: var(--paper);
  border-radius: 20px;
  padding: 18px 22px;
}

summary {
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--primary);
  font-weight: 800;
}

details[open] summary::after {
  content: "–";
}

details p {
  margin-top: 10px;
  color: var(--ink-2);
}

summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ---------- final cta ---------- */
.final {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #9ed4f8 0%, #c9ebfc 55%, #e8f6ff 100%);
  padding: 96px 0 48px;
  text-align: center;
}

.final .mascot {
  display: block;
  width: min(280px, 55vw);
  margin: 0 auto 18px;
  filter: drop-shadow(0 16px 24px rgba(40, 80, 120, 0.2));
  animation: float-y 5s ease-in-out infinite;
}

.final h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin: 0 auto;
}

.final .sub {
  margin: 16px auto 0;
  color: var(--ink-2);
  max-width: 36ch;
  font-size: 1.1rem;
}

.final .cta-row {
  margin-top: 28px;
}

.foot {
  margin-top: 56px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: 10px;
  font-weight: 600;
}

.foot nav a:hover {
  color: var(--ink);
}

.foot .copy {
  color: var(--muted);
}

/* ---------- sticky bar (mobile) ---------- */
.bar {
  position: fixed;
  z-index: 20;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-radius: 22px;
  padding: 10px 10px 10px 12px;
  box-shadow: 0 10px 30px rgba(20, 23, 28, 0.18);
  transform: translateY(160%);
  transition: transform 0.35s ease;
}

.bar.show {
  transform: none;
}

.bar img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.bar div {
  flex: 1;
  display: grid;
  line-height: 1.2;
}

.bar b {
  font-size: 1rem;
}

.bar span {
  font-size: 0.8rem;
  color: var(--muted);
}

.bar a,
.bar .pill {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .bar {
    display: flex;
  }

  .final {
    padding-bottom: 120px;
  }

  .foot {
    padding-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud,
  .hero-mascot,
  .final .mascot {
    animation: none;
  }

  .cloud {
    left: auto;
    right: 6%;
  }

  .hero-mascot {
    transform: none;
  }
}

/* ============================================================
   Legal pages (privacy / terms)
   ============================================================ */

body.legal {
  background: linear-gradient(180deg, var(--sky-low) 0%, var(--cream) 220px);
}

.legal-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.legal-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(237, 247, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(20, 23, 28, 0.06);
  padding: 14px 0;
}

.legal-nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-main {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px var(--pad) 64px;
  width: 100%;
}

.legal-main h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 12px;
}

.effective-date {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  font-style: italic;
}

.todo-callout {
  background: #fff6df;
  border: 1px dashed #e0b84a;
  color: #6b5310;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 28px;
  font-size: 0.95rem;
  font-weight: 600;
}

.policy-section {
  margin-bottom: 2.2rem;
}

.policy-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.policy-section p,
.policy-section li {
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.policy-section ul {
  padding-left: 1.35rem;
  margin: 0 0 1rem;
}

.policy-section a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-foot {
  border-top: 1px solid rgba(20, 23, 28, 0.08);
  padding: 28px var(--pad) 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--ink-2);
}

.legal-foot nav a:hover {
  color: var(--ink);
}
