/* Pim — getpim.app */

:root {
  --cream: #FFFAF6;
  --card: #FFFFFF;
  --border: #F0E5DC;
  --ink: #1A1A1A;
  --muted: #78716D;
  --sage: #46B25E;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px;
}

.site-header .wordmark img {
  height: 30px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease-out;
}

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

/* ---------- hero (index) ---------- */

.hero-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* full-bleed rotating photo covers with a constant scrim for text legibility.
   body must stay transparent here: html has its own bg, so a body bg would
   paint OVER the negative-z-index .bg-rotator. */
.on-photo { background: transparent; }

.bg-rotator {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--cream);
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.bg-slide.is-active { opacity: 1; }

.bg-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(28, 18, 8, 0.46), rgba(28, 18, 8, 0.18) 30%, rgba(28, 18, 8, 0) 48%),
    linear-gradient(to top, rgba(28, 18, 8, 0.46), rgba(28, 18, 8, 0) 32%);
}

/* slide indicator — stories-style dashes, the active one fills over the slide */
.slides-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-bottom: 4px;
}

.seg {
  width: 26px;
  height: 4px;
  border-radius: 2px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.32);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background .25s ease-out;
}

.seg:hover { background: rgba(255, 255, 255, 0.5); }

.seg .fill {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: #FFFFFF;
  transform: scaleX(0);
  transform-origin: left;
}

.seg.is-active .fill { animation: segfill 7s linear forwards; }

@keyframes segfill {
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .seg.is-active .fill { animation: none; transform: scaleX(1); }
}

.on-photo .site-nav a { color: rgba(255, 255, 255, 0.82); }
.on-photo .site-nav a:hover { color: #FFFFFF; }

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.hero h1 {
  font-family: ui-rounded, 'Nunito', 'Inter', -apple-system, sans-serif;
  font-size: clamp(36px, 6.2vw, 56px);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 18px;
  max-width: 800px;
}

.on-photo .hero h1 {
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28), 0 3px 32px rgba(0, 0, 0, 0.48);
}

.hero .sub {
  font-size: 21px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 690px;
  margin: 0 auto;
}

.on-photo .hero .sub {
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.32), 0 2px 26px rgba(0, 0, 0, 0.52);
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero .store-badge img {
  height: 56px;
  width: auto;
  display: block;
}

.hero .store-badge {
  display: inline-block;
  transition: transform .15s ease-out;
}

.hero .store-badge:hover { transform: scale(1.03); }
.hero .store-badge:active { transform: scale(0.97); }

.hero .caption {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.on-photo .hero .caption { color: rgba(255, 255, 255, 0.85); }

.on-photo .site-footer,
.on-photo .site-footer a { color: rgba(255, 255, 255, 0.72); }
.on-photo .site-footer a:hover { color: #FFFFFF; }

/* gentle staggered entrance */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    opacity: 0;
    transform: translateY(14px);
    animation: rise .7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .rise-1 { animation-delay: .05s; }
  .rise-2 { animation-delay: .15s; }
  .rise-3 { animation-delay: .25s; }
  .rise-4 { animation-delay: .38s; }
  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--ink); }

/* ---------- legal pages ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.legal h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 24px 0 6px;
}

.legal .updated {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 36px;
}

.legal h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

.legal p, .legal li {
  font-size: 16px;
  line-height: 1.65;
  color: #3D3A38;
}

.legal li { margin-bottom: 8px; }

.legal strong { color: var(--ink); }

.legal a { color: var(--sage); text-decoration: none; }
.legal a:hover { text-decoration: underline; }

.legal .summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 28px;
  margin: 28px 0;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 16px 0;
}

.legal th, .legal td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  vertical-align: top;
}

.legal th { color: var(--muted); font-weight: 600; }

.legal .closing {
  margin-top: 48px;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 560px) {
  .site-header { padding: 20px 20px; }
  .site-nav { gap: 18px; }
  .hero .sub { font-size: 18px; }
  /* per-slide portrait crops: keep Pim in frame on each scene */
  .bg-slide.s1 { background-position: 68% center; }  /* café — Pim right */
  .bg-slide.s2 { background-position: 18% center; }  /* picnic — Pim left */
  .bg-slide.s3 { background-position: 47% center; }  /* porch — Pim too big for portrait; frame his notebook+lantern instead */
  .bg-slide.s4 { background-position: 30% center; }  /* campfire — Pim left */
  .bg-slide.s5 { background-position: 95% center; }  /* meadow — Pim too big for portrait; frame the cottage instead */
}
