/* BloomyPic landing. Tokens mirror the Flutter theme (Design Spec §2). */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #FAF7F0;
  --surface: #FFFDF9;
  --ink: #2B2228;
  --muted: #665A61;
  --primary: #7B3756;
  --primary-hover: #663047;
  --on-primary: #FFFFFF;
  --selected-surface: #F3E6EC;
  --sage-surface: #E9EEE3;
  --divider: #DFD3D7;
  --control-border: #8F7E86;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-card: 24px;
  --r-photo: 16px;
  --r-control: 12px;
  --gutter: 16px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}
@media (min-width: 390px) { :root { --gutter: 20px; } }
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: 8px; z-index: 10;
  padding: 12px 16px; border-radius: var(--r-control);
  background: var(--surface); font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap { max-width: calc(1160px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Type */
h1 { font: 400 44px/46px var(--serif); letter-spacing: -0.01em; }
h2 { font: 400 32px/34px var(--serif); letter-spacing: -0.01em; }
h3 { font: 600 20px/26px var(--sans); }
@media (min-width: 600px) {
  h1 { font-size: 64px; line-height: 64px; }
}
@media (min-width: 1024px) {
  h2 { font-size: 40px; line-height: 42px; }
}
.lead { margin-top: 12px; max-width: 34em; color: var(--muted); }
@media (min-width: 600px) {
  .lead { margin-top: 16px; font-size: 18px; line-height: 28px; }
}
.fineprint { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 20px; }
.section-sub { margin-top: 8px; max-width: 40em; color: var(--muted); }

/* Header */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.wordmark {
  padding-block: 8px;
  font: 400 28px/1 var(--serif); letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; margin-right: -12px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px;
  border-radius: var(--r-control);
  color: var(--muted); font-weight: 500; text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--primary);
  text-decoration-thickness: 1.5px; text-underline-offset: 8px;
}
@media (max-width: 599px) {
  .site-nav .nav-tool { display: none; }
}
@media (min-width: 1024px) {
  .site-header .wrap { min-height: 72px; }
  .site-nav { gap: 8px; }
}

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 20px;
  border: 1.5px solid var(--primary); border-radius: var(--r-control);
  background: var(--primary); color: var(--on-primary);
  font: 600 16px/1 var(--sans); white-space: nowrap; text-decoration: none;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn--outline { background: transparent; color: var(--primary); }
.btn--outline:hover { background: var(--selected-surface); color: var(--primary-hover); }
.more {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 500;
}

/* Photos */
.ph { position: relative; overflow: hidden; border-radius: var(--r-photo); background: var(--selected-surface); }
.ph > img, .shot > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
img.pos-high { object-position: 50% 8%; }
.tag {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  max-width: calc(100% - 24px);
  padding: 4px 8px; border-radius: 8px;
  background: rgb(255 253 249 / .9); color: var(--ink);
  font: 500 12px/16px var(--sans);
}
.stage {
  padding: 12px; border: 1px solid var(--divider); border-radius: var(--r-card);
  background: var(--surface);
}
.stage--sage { background: var(--sage-surface); border-color: var(--sage-surface); }
.stage figcaption { color: var(--muted); font-size: 14px; line-height: 20px; }
@media (min-width: 600px) { .stage { padding: 16px; } }

/* Triptych: one large frame left, two stacked right */
.tri {
  display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.tri > :first-child { grid-row: span 2; }
.tri > img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 50% 15%; }
.tri > img:first-child { object-position: 50% 30%; }

/* Home: hero + two tool cards */
.hero { padding-top: 24px; }
@media (min-width: 600px) { .hero { padding-top: 40px; } }
@media (min-width: 1024px) {
  .hero { padding-top: 48px; }
  .hero-head { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: end; }
  .hero-head .lead { margin: 0 0 4px; }
}

.cards { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 768px) { .cards { grid-template-columns: 7fr 5fr; gap: 24px; margin-top: 40px; } }

.card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--divider); border-radius: var(--r-card);
  background: var(--surface);
}
.shot { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--selected-surface); }
.shot--sage { background: var(--sage-surface); }
.shot > .tri { position: absolute; inset: 0; background: var(--surface); }
@media (min-width: 768px) { .shot { aspect-ratio: auto; height: 280px; } }
@media (min-width: 1024px) { .shot { height: 300px; } }

.zoom { transition: transform 300ms var(--ease-out); }
@media (hover: hover) { .card:hover .zoom { transform: scale(1.03); } }

/* Two input avatars on the Future Baby card: "two photos in" */
.duo { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: flex; }
.duo img {
  width: 48px; height: 48px; border: 3px solid #fff; border-radius: 50%;
  object-fit: cover;
}
.duo img + img { margin-left: -12px; }
@media (min-width: 768px) {
  .duo { left: 16px; bottom: 16px; }
  .duo img { width: 64px; height: 64px; }
  .duo img + img { margin-left: -16px; }
}

.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
.card-title { font: 400 32px/34px var(--serif); letter-spacing: -0.01em; }
.card-info { margin: 4px 0 16px; color: var(--muted); }
.card .btn { margin-top: auto; }
@media (min-width: 768px) {
  .card-body { padding: 24px; }
  .card-info { margin-bottom: 24px; }
  .card .btn { align-self: flex-start; }
}
@media (min-width: 1024px) {
  .card--lead .card-title { font-size: 40px; line-height: 42px; }
}

/* Sections */
.section { padding-top: 48px; }
@media (min-width: 1024px) { .section { padding-top: 64px; } }

.rules { display: grid; gap: 24px; margin-top: 24px; }
.rules li { padding-top: 16px; border-top: 1px solid var(--divider); }
.rules p { margin-top: 8px; color: var(--muted); }
@media (min-width: 768px) { .rules { grid-template-columns: repeat(3, 1fr); margin-top: 32px; } }
.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 8px;
  font: 400 40px/42px var(--serif); color: var(--primary);
}

.assurance {
  margin-top: 48px; padding: 16px 20px;
  border-radius: var(--r-photo); background: var(--selected-surface);
}
@media (min-width: 600px) { .assurance { padding: 20px 24px; } }

/* Tool pages: copy + example stage */
.tool-hero { display: grid; gap: 32px; padding-top: 24px; }
.tool-hero .stage { max-width: 720px; }
.facts { margin-top: 24px; font-weight: 600; }
.tool-copy .btn { margin-top: 16px; }
@media (max-width: 599px) { .tool-copy .btn { width: 100%; } }
@media (min-width: 600px) { .tool-hero { padding-top: 40px; } }
@media (min-width: 1024px) {
  .tool-hero { grid-template-columns: 5fr 7fr; gap: 24px; align-items: center; padding-top: 48px; }
  .tool-hero .stage { max-width: none; }
  .tool-copy { padding-right: 24px; }
}

/* Future Baby example: Person 1 + Person 2 -> result */
.baby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.baby-grid .p1 { grid-column: 1; grid-row: 1; aspect-ratio: 1; }
.baby-grid .p2 { grid-column: 2; grid-row: 1; aspect-ratio: 1; }
.baby-grid .result { grid-column: 1 / -1; grid-row: 2; aspect-ratio: 4 / 5; }
.plus {
  grid-column: 1 / -1; grid-row: 1; place-self: center; z-index: 2;
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--divider); border-radius: 50%;
  background: var(--surface); color: var(--primary);
  font: 500 20px/1 var(--sans);
}
.stage > figcaption { margin-top: 12px; }
@media (min-width: 600px) {
  .baby-grid { grid-template-columns: 1fr 2.4fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .baby-grid .p1 { grid-column: 1; grid-row: 1; aspect-ratio: auto; }
  .baby-grid .p2 { grid-column: 1; grid-row: 2; aspect-ratio: auto; }
  .baby-grid .result { grid-column: 2; grid-row: 1 / span 2; }
  .plus { grid-column: 1; grid-row: 1 / span 2; }
  .stage > figcaption { margin-top: 16px; }
}

.look-boy { opacity: 0; transition: opacity 250ms var(--ease-out); }
.result[data-look="boy"] .look-boy { opacity: 1; }
.seg {
  position: absolute; left: 50%; bottom: 12px; z-index: 2;
  display: flex; gap: 4px; padding: 4px;
  border-radius: var(--r-control); background: rgb(255 253 249 / .92);
  transform: translateX(-50%);
}
.seg button {
  min-width: 72px; height: 48px; padding: 0 16px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink);
  font: 600 14px/20px var(--sans); cursor: pointer;
  transition: background-color 150ms, color 150ms;
}
.seg button:hover { background: var(--selected-surface); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
@media (min-width: 600px) {
  .seg { bottom: 16px; }
  .seg button { height: 40px; }
}

/* Kids Photoset example: child's photo -> triptych */
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px 16px; }
.set-in { grid-column: 1; grid-row: 1; aspect-ratio: 4 / 5; }
.set-grid figcaption { grid-column: 2; grid-row: 1; align-self: center; margin: 0; }
.set-grid .tri { grid-column: 1 / -1; grid-row: 2; gap: 8px; }
.set-grid .tri > :first-child { aspect-ratio: 4 / 5; }
.set-grid .tri > :not(:first-child) > img { object-position: 50% 15%; }
@media (min-width: 600px) {
  .set-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); grid-template-rows: auto 1fr; }
  .set-grid figcaption { grid-column: 1; grid-row: 2; align-self: end; }
  .set-grid .tri { grid-column: 2; grid-row: 1 / span 2; gap: 12px; }
}

.styles { display: grid; gap: 24px; margin-top: 24px; }
.styles .ph { aspect-ratio: 4 / 3; }
.styles figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 20px; }
.styles figcaption strong { display: block; color: var(--ink); font-size: 16px; line-height: 24px; font-weight: 600; }
@media (min-width: 600px) {
  .styles { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
  .styles .ph { aspect-ratio: 4 / 5; }
}
@media (min-width: 1024px) { .styles { gap: 24px; } }

/* Legal pages */
.prose { padding-top: 24px; }
.prose > * { max-width: 680px; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { margin-top: 32px; font: 600 20px/26px var(--sans); letter-spacing: 0; }
.prose p { margin-top: 12px; }
.prose .note { color: var(--muted); font-size: 14px; line-height: 20px; }
@media (min-width: 600px) { .prose { padding-top: 40px; } }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--divider); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px;
  padding-block: 16px 32px;
  color: var(--muted); font-size: 14px; line-height: 20px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 1024px) { .site-footer { margin-top: 96px; } }

/* The single page-load moment: hero photos settle in (staggered, <= 600ms total) */
@keyframes settle { from { opacity: 0; transform: translateY(10px); } }
.settle { animation: settle 360ms var(--ease-out) both; }
.d1 { animation-delay: 80ms; }
.d2 { animation-delay: 160ms; }
.d3 { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover .zoom { transform: none; }
}
