/* Bloom: Sleep Garden — product site. Styled after the app: cream panels with
   brown crayon outlines, chunky game buttons, night and day skies, Nunito. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Variable.ttf?v=bb55a5ca5c") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --night: #211b46;
  --night-2: #33296b;
  --lavender: #7b67d6;
  --lavender-soft: #ece6ff;
  --paper: #fdf4e7;
  --paper-2: #f7e6cf;
  --card: #fbeedd;
  --ink: #4a2e1c;
  --ink-soft: #7a5a45;
  --outline: #6b4423;
  --leaf: #a3d987;
  --leaf-dark: #3e7a2c;
  --sky: #a9e1f7;
  --peach: #f6c7a5;
  --gold: #f6c544;
  --white: #fffaf2;
  --radius: 28px;
  --shadow: 0 18px 40px rgba(46, 26, 12, 0.14);
  --phone-shadow: 0 30px 60px rgba(18, 10, 46, 0.42);
  --page: min(1120px, calc(100% - 32px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--leaf-dark); font-weight: 800; text-underline-offset: 3px; }

h1, h2, h3 {
  margin: 0 0 14px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(42px, 7vw, 76px); }
h2 { font-size: clamp(32px, 4.6vw, 52px); }
h3 { font-size: 24px; }

p { margin: 0 0 16px; }

.wrap { width: var(--page); margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--white);
  z-index: 10;
}
.skip:focus { left: 8px; }

/* Buttons: the game's chunky green and cream buttons. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 26px;
  border: 3px solid var(--leaf-dark);
  border-radius: 18px;
  background: var(--leaf);
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--leaf-dark);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--leaf-dark); }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--leaf-dark); }
.button.secondary {
  background: var(--card);
  border-color: var(--outline);
  box-shadow: 0 5px 0 var(--outline);
}
.button.secondary:hover { box-shadow: 0 6px 0 var(--outline); }
.button.secondary:active { box-shadow: 0 1px 0 var(--outline); }
.button img { width: 26px; height: 26px; }

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding: 18px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
}
.brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: rgba(255, 250, 242, 0.88); text-decoration: none; font-weight: 800; font-size: 16px; }
.site-nav a:hover { color: var(--white); }
.site-nav .button { min-height: 44px; padding: 8px 18px; font-size: 16px; color: var(--ink); }
@media (max-width: 760px) {
  .site-nav a:not(.button) { display: none; }
}

/* Hero: the garden's night sky. */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 90px;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(25, 18, 60, 0.35), rgba(25, 18, 60, 0.15) 60%, rgba(25, 18, 60, 0.6)),
    url("img/sky-night.webp?v=85878db267") center / cover no-repeat,
    var(--night);
}
.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}
.hero .eyebrow { color: #d9cffd; }
.hero h1 { color: var(--white); text-shadow: 0 4px 24px rgba(10, 6, 30, 0.35); }
.hero .lead { max-width: 560px; font-size: 21px; color: #ece6ff; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.hero .fine { font-size: 15px; font-weight: 800; color: #cfc4f6; }
.hero .sparkle { position: absolute; z-index: 1; animation: twinkle 3.2s ease-in-out infinite; }
.hero .sparkle.one { top: 150px; left: 8%; width: 30px; }
.hero .sparkle.two { top: 64%; left: 44%; width: 24px; animation-delay: 1.1s; }
.hero .sparkle.three { top: 22%; left: 52%; width: 20px; animation-delay: 2s; }
.hero .cloud { position: absolute; z-index: 1; opacity: 0.55; animation: drift 46s linear infinite; }
.hero .cloud.one { bottom: 40px; left: -10%; width: 380px; }
.hero .cloud.two { top: 38%; right: -6%; width: 300px; animation-duration: 60s; animation-direction: reverse; }

.hero-phones { position: relative; display: flex; justify-content: center; }
.hero-phones .island {
  position: absolute;
  left: -24px;
  bottom: -20px;
  width: 170px;
  z-index: 3;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 18px 24px rgba(10, 6, 30, 0.35));
}

@keyframes twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(40vw); } }

@media (max-width: 900px) {
  .hero { padding-top: 104px; text-align: center; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .lead { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .hero-phones .island { width: 120px; left: 4%; }
}

/* Phones: the screenshots in a dark bezel. The bezel wraps the image, which
   keeps its own shape (from its width and height), so no edge is cropped. */
.phone {
  width: min(310px, 72vw);
  padding: 9px;
  border-radius: 46px;
  background: #18132f;
  box-shadow: var(--phone-shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.09);
  flex: none;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 37px; }
.phone.small { width: min(250px, 60vw); border-radius: 38px; padding: 8px; }
.phone.small img { border-radius: 31px; }
.phone.tilt-left { transform: rotate(-4deg); }
.phone.tilt-right { transform: rotate(4deg); }

/* Sections */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 20px; color: var(--ink-soft); }

.paper { background: var(--paper); }
.paper-2 { background: var(--paper-2); }
.sky-band {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0)),
    url("img/sky-day.webp?v=d2040ef743") center / cover no-repeat,
    var(--sky);
}

/* Game-style cards */
.card {
  position: relative;
  padding: 28px;
  border: 4px solid var(--outline);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 6px rgba(255, 255, 255, 0.35);
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps .card { text-align: center; }
.steps .art { height: 150px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 18px; }
.steps .art img { max-height: 150px; width: auto; }
.steps .art .pair img { max-height: 108px; }
.steps .number {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--gold);
  font-weight: 900;
}
.steps p { color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}
.feature + .feature { margin-top: 110px; }
.feature.reverse .feature-text { order: 2; }
.feature-text p { font-size: 20px; color: var(--ink-soft); }
.feature-text ul { padding: 0; margin: 18px 0 0; list-style: none; }
.feature-text li {
  position: relative;
  padding-left: 34px;
  margin: 10px 0;
  font-weight: 700;
}
.feature-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  background: url("img/petal.png?v=2950a02151") center / contain no-repeat;
}
.feature-text .badge { width: 72px; margin-bottom: 14px; }
.feature-media { display: flex; justify-content: center; align-items: center; gap: 18px; }
.feature-media .phone + .phone { margin-top: 70px; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .feature.reverse .feature-text { order: 0; }
  .feature-text ul { display: inline-block; text-align: left; }
  .feature-media .phone + .phone { margin-top: 40px; }
}
@media (max-width: 560px) {
  .feature-media { gap: 10px; }
  .feature-media .phone.small { width: 44vw; border-radius: 28px; padding: 6px; }
  .feature-media .phone.small img { border-radius: 23px; }
}

/* Floating flowers along the edges of a section */
.decor { position: relative; }
.decor .flower { position: absolute; width: 64px; opacity: 0.95; pointer-events: none; }

/* Privacy band: back to the night sky. */
.night-band {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(25, 18, 60, 0.5), rgba(25, 18, 60, 0.25)),
    url("img/sky-night.webp?v=85878db267") center 30% / cover no-repeat,
    var(--night);
}
.night-band .eyebrow { color: #d9cffd; }
.night-band p { color: #e3dcff; }
.privacy-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.privacy-points { display: grid; gap: 16px; }
.privacy-point {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}
.privacy-point img { width: 52px; height: 52px; object-fit: contain; }
.privacy-point h3 { font-size: 20px; margin-bottom: 4px; }
.privacy-point p { margin: 0; font-size: 17px; }
.night-band a { color: var(--leaf); }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; text-align: center; } .privacy-point { text-align: left; } }

/* Gallery: every screen in a row. */
.gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 10px max(16px, calc((100% - 1120px) / 2)) 30px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: center; text-align: center; }
.gallery figcaption { margin-top: 14px; font-weight: 800; color: var(--ink-soft); font-size: 16px; }
.gallery .phone { width: 230px; border-radius: 36px; padding: 7px; }
.gallery .phone img { border-radius: 30px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq details {
  padding: 4px 24px;
  border: 3px solid var(--outline);
  border-radius: 22px;
  background: var(--card);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-size: 20px;
  font-weight: 900;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 26px; line-height: 1; color: var(--leaf-dark); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); }

/* Beta call to action */
.beta { text-align: center; }
.beta .card { max-width: 760px; margin: 0 auto; padding: 44px 32px; }
.beta .island { width: 210px; margin: -120px auto 10px; filter: drop-shadow(0 14px 18px rgba(46, 26, 12, 0.25)); animation: float 6s ease-in-out infinite; }
.beta p { font-size: 20px; color: var(--ink-soft); }
.beta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 24px; }

/* Footer */
.site-footer { padding: 46px 0 60px; background: var(--night); color: #d6cdf7; font-size: 16px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .brand { font-size: 20px; }
.site-footer .brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: #ece6ff; font-weight: 800; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { width: 100%; margin: 6px 0 0; color: #a99fd3; font-size: 14px; }

/* Simple pages (support, 404) */
.page-hero { padding: 120px 0 60px; color: var(--white); background: linear-gradient(180deg, rgba(25, 18, 60, 0.4), rgba(25, 18, 60, 0.2)), url("img/sky-night.webp?v=85878db267") center / cover, var(--night); }
.page-hero p { color: #e3dcff; font-size: 20px; max-width: 640px; }
.page-hero .eyebrow { color: #d9cffd; }
.page-body { padding: 64px 0 96px; }
.page-body .card + .card { margin-top: 22px; }
.page-body h2 { font-size: 30px; }
.page-body ol, .page-body ul { padding-left: 24px; }
.page-body li { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
