/* Bloom — same family as sweatdiary.app and christoph-werner.com:
   Things-style quiet surfaces, system type, one gradient taken from the app icon. */

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --white:    #ffffff;
  --gray-50:  #f5f5f7;
  --gray-200: #e8e8ed;
  --gray-400: #b0b0b8;
  --gray-600: #6e6e73;
  --gray-900: #1d1d1f;
  --border:   rgba(0, 0, 0, 0.07);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 24px 72px rgba(0, 0, 0, 0.13);
  --r-md: 14px;
  --r-lg: 20px;
  /* Apple system font (SF Pro) in every browser on Apple devices; the platform UI font elsewhere */
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;

  /* App icon colors: coral top-left to pink bottom-right, red record dot */
  --coral:  #ff8a5c;
  --pink:   #ea4c89;
  --record: #f23d4f;
  --gradient: linear-gradient(135deg, var(--coral), var(--pink));
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  /* Keeps the footer at the bottom of the window on short pages */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 0; box-shadow: 0 0 0 2px rgba(234, 76, 137, 0.5); border-radius: 6px; }

/* ─── Nav ────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.nav-brand img { width: 26px; height: 26px; }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-size: 13.5px; color: var(--gray-600);
}
.nav-links a { transition: color 0.15s; }
.nav-links a:hover { color: var(--gray-900); }
.nav-cta {
  background: var(--gray-900); color: #fff !important;
  padding: 7px 16px; border-radius: 980px;
  font-size: 13.5px; font-weight: 500;
  transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover { background: #333 !important; transform: translateY(-1px); }

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 120px 24px 88px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  overflow-x: clip;
  /* A faint wash of the icon colors at the top; the demo below carries the color */
  background:
    radial-gradient(48rem 30rem at 20% 0%, rgba(255, 138, 92, 0.22), transparent 62%),
    radial-gradient(48rem 30rem at 85% 10%, rgba(234, 76, 137, 0.18), transparent 62%);
}
.hero-icon {
  width: 104px; height: 104px;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 18px rgba(200, 60, 90, 0.18));
  animation: fade-down 0.5s ease 0.08s both;
}
.hero h1 {
  font-size: clamp(52px, 8vw, 84px);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1.0;
  margin-bottom: 18px;
  animation: fade-down 0.5s ease 0.14s both;
}
/* The tight h1 letter-spacing pulls the box in past the last glyph's ink, and
   background-clip: text cuts off whatever sticks out — pad it back out. */
.gradient-text {
  padding-right: 0.08em;
  margin-right: -0.08em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--gray-600);
  line-height: 1.5;
  max-width: 600px;
  margin-bottom: 32px;
  animation: fade-down 0.5s ease 0.2s both;
}
.hero-cta {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  animation: fade-down 0.5s ease 0.26s both;
}
.hero-cta img { height: 44px; transition: transform 0.15s; }
.hero-cta a:hover img { transform: translateY(-2px); }
.hero-cta-note { font-size: 13px; color: var(--gray-600); }

.hero-stage {
  position: relative;
  isolation: isolate;
  width: 100%; max-width: 1040px;
  margin-top: 56px;
  animation: fade-up 0.7s ease 0.35s both;
}
/* Soft glow in the icon colors, so the demo sits in the hero instead of floating on white */
.hero-stage::before {
  content: "";
  position: absolute; inset: 14% 8% 6%;
  z-index: -1;
  background: var(--gradient);
  filter: blur(64px);
  opacity: 0.28;
  border-radius: 50%;
}
.hero-stage video {
  display: block; width: 100%; height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* ─── Screenshot placeholders ────────────────────────────────── */
/* Swap a .shot-placeholder for an <img> once real screenshots exist. */
.shot-placeholder {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: var(--r-lg);
  background: var(--gradient);
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
}

/* ─── Shared section utilities ───────────────────────────────── */
.section { padding: 72px 24px; }
.section--alt { background: var(--gray-50); }
.container { max-width: 1040px; margin: 0 auto; }
.section-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--pink);
  margin-bottom: 14px;
}
.section-heading {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 14px;
}
.section-body {
  font-size: 17px; color: var(--gray-600);
  line-height: 1.65; max-width: 560px;
}
.section-header { margin-bottom: 40px; }

/* ─── Features ───────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(234, 76, 137, 0.10);
  color: var(--pink);
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-text { font-size: 15px; color: var(--gray-600); line-height: 1.55; }

/* ─── Screenshots ────────────────────────────────────────────── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 40px;
}
/* Each window sits centered on an equal-size stage, at the same scale, so the two
   captures' different heights read as framing rather than misalignment. The tints echo
   each page's accent: red for Record, blue for Review. The captures bring their own
   macOS shadow. */
.details-shot {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 10 / 13;
  margin-bottom: 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #fff1ea 0%, #ffe0e6 100%);
}
.details-shot--review {
  background: linear-gradient(160deg, #eef4ff 0%, #e4ecfb 100%);
}
.details-shot img {
  display: block;
  /* Same width for both, so the windows share one scale */
  width: 86%; height: auto;
}
.details-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.details-card p { font-size: 15px; color: var(--gray-600); line-height: 1.55; }

/* ─── Privacy flower ─────────────────────────────────────────── */
/* The icon's flower (petals.svg) as a faint motif, peeking in from the right edge */
#privacy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
#privacy::before {
  content: "";
  position: absolute;
  z-index: -1;
  background: url("petals.svg") center / contain no-repeat;
  pointer-events: none;
  width: 520px; height: 520px;
  right: -160px; top: 50%;
  margin-top: -260px;
  opacity: 0.13;
  transform: rotate(15deg);
}

/* ─── Privacy ────────────────────────────────────────────────── */
.privacy-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
  margin-top: 32px;
  max-width: 720px;
}
.privacy-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; color: var(--gray-900);
}
/* Green checkmarks: these are promises kept, not warnings */
.privacy-list li::before {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #e2f5e7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.4l3 3 6-6.4' fill='none' stroke='%2328a745' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
}

/* ─── Get the app ────────────────────────────────────────────── */
.getapp-section {
  text-align: center;
  padding-bottom: 96px;
}
.getapp-section h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 12px;
}
.getapp-section p { font-size: 17px; color: var(--gray-600); margin-bottom: 28px; }
.getapp-section img.badge { height: 44px; margin: 0 auto; transition: transform 0.15s; }
.getapp-section a:hover img.badge { transform: translateY(-2px); }
.getapp-req { font-size: 13px; color: var(--gray-400); margin-top: 14px; }

/* ─── Legal and support pages ───────────────────────────────── */
.legal {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 128px 24px 88px;
}
/* The hero's faint icon-color wash, behind the page title */
body:has(.legal) {
  background:
    radial-gradient(48rem 26rem at 15% 0%, rgba(255, 138, 92, 0.14), transparent 62%),
    radial-gradient(48rem 26rem at 90% 0%, rgba(234, 76, 137, 0.11), transparent 62%),
    var(--white);
  background-repeat: no-repeat;
}
.legal h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.05;
  margin-bottom: 16px;
}
.legal h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.015em;
  margin: 44px 0 12px;
}
.legal h3 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  margin: 24px 0 6px;
}
.legal p { font-size: 16px; line-height: 1.65; color: #3a3a3c; margin-bottom: 14px; }
.legal .legal-lead { font-size: 18px; color: var(--gray-600); margin-bottom: 8px; }
.legal p a {
  color: var(--pink);
  text-decoration: underline;
  text-decoration-color: rgba(234, 76, 137, 0.35);
  text-underline-offset: 3px;
}
.legal p a:hover { text-decoration-color: var(--pink); }
.legal address { font-style: normal; font-size: 16px; line-height: 1.65; color: #3a3a3c; }
.legal-updated { font-size: 13px !important; color: var(--gray-400) !important; margin-top: 24px; }
.legal-mail {
  display: inline-block;
  margin-top: 20px;
  background: var(--gray-900); color: #fff;
  padding: 11px 22px; border-radius: 980px;
  font-size: 15px; font-weight: 500;
  transition: background 0.15s, transform 0.15s;
}
.legal-mail:hover { background: #333; transform: translateY(-1px); }

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--gray-50);
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  font-size: 13px; color: var(--gray-400);
}
footer > span:nth-child(2) { text-align: center; }
.footer-links { display: flex; justify-content: flex-end; gap: 20px; }
.footer-links a:hover { color: var(--gray-600); }

/* ─── Scroll animations ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.visible > * { opacity: 1; transform: none; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.07s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.14s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.21s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.stagger.visible > *:nth-child(n+6) { transition-delay: 0.35s; }

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stagger > * { opacity: 1; transform: none; transition: none; }
  .hero-icon, .hero h1, .hero-sub, .hero-cta, .hero-stage { animation: none; }
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  nav { padding: 0 20px; }
  .nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  nav .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 100px 16px 56px; }
  .hero-stage { margin-top: 40px; }
  .section { padding: 56px 16px; }
  .legal { padding: 100px 16px 56px; }
  .features-grid, .details-grid, .privacy-list { grid-template-columns: 1fr; }
  #privacy::before { width: 360px; height: 360px; right: -150px; margin-top: -180px; }
  footer { grid-template-columns: 1fr; gap: 10px; text-align: center; padding: 24px 16px; }
  footer > span:nth-child(2) { text-align: center; }
  .footer-links { flex-direction: column; align-items: center; gap: 10px; }
}
