/* Family Memories — Marketing Site
   Warm nostalgic design system with editorial typography */

:root {
  /* Warm Nostalgic palette */
  --ink:        #1f1a14;
  --ink-2:      #5b4f42;
  --ink-3:      #8b7e6e;
  --paper:      #fbf7f0;
  --paper-2:    #f3ead9;
  --paper-3:    #ede2cd;
  --line:       #e3d6bf;
  --line-soft:  #efe6d2;
  --primary:    #b8492c;
  --primary-d:  #8c2e16;
  --primary-soft:#f5dccf;
  --primary-tint:#fbeee5;
  --accent:     #c9941f;
  --accent-soft:#f4e4bd;
  --success:    #5c8a5c;
  --error:      #b84a47;

  /* Typography */
  --font-serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', cursive;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(46,34,18,.05);
  --shadow-md: 0 4px 12px rgba(46,34,18,.08), 0 1px 3px rgba(46,34,18,.05);
  --shadow-lg: 0 12px 36px rgba(46,34,18,.10), 0 2px 8px rgba(46,34,18,.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

/* Typography */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.display {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8.4vw, 116px);
  line-height: 0.96;
  letter-spacing: -.025em;
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}

.display em {
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}

.h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -.022em;
  font-weight: 400;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.01em;
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-2);
  text-wrap: pretty;
}

.body { font-size: 16px; color: var(--ink-2); line-height: 1.65; }
.small { font-size: 13px; color: var(--ink-3); }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}

.nav-logo svg {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-2);
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  padding: 6px 4px;
  transition: color .15s;
}

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

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.btn-primary:hover {
  background: var(--primary-d);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.btn-ghost:hover {
  background: var(--paper-2);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Hero */
.hero {
  position: relative;
  padding: 64px 0 96px;
  min-height: 84vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -100px;
  background:
    radial-gradient(circle at 18% 20%, rgba(184,73,44,.10) 0, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(201,148,31,.12) 0, transparent 38%),
    radial-gradient(circle at 50% 110%, rgba(184,73,44,.06) 0, transparent 50%);
  pointer-events: none;
  animation: drift 28s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0,0); }
  to   { transform: translate(20px, -16px); }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.social-proof {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-3);
}

.avatars {
  display: flex;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  border: 2px solid var(--paper);
  margin-left: -8px;
}

.avatar:first-child {
  margin-left: 0;
}

/* Hero art (Polaroid stack) */
.hero-art {
  position: relative;
  aspect-ratio: 5 / 6;
  min-height: 480px;
}

.hero-art > * {
  position: absolute;
}

.photo {
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(46,34,18,.18), 0 4px 12px rgba(46,34,18,.08);
}

.polaroid {
  padding: 12px 12px 38px;
}

.polaroid figcaption {
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--ink-2);
  text-align: center;
  margin-top: 10px;
}

.photo-placeholder {
  background: linear-gradient(135deg, #c9a47a, #8a6a4a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-placeholder svg {
  color: rgba(255,255,255,.3);
}

/* Rotating word */
.rotate-word {
  display: inline-block;
  position: relative;
  min-width: 5ch;
  font-style: italic;
}

/* Marquee */
.marquee {
  padding: 40px 0;
  overflow: hidden;
  background: var(--paper-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.marquee-track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--ink-3);
  animation: scroll 40s linear infinite;
}

.marquee-track span {
  flex-shrink: 0;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Sections */
.section {
  padding: 96px 0;
  position: relative;
}

.section-cream {
  background: var(--paper-2);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 56px;
  max-width: 720px;
}

.section-head.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Manifesto */
.manifesto {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.25;
  letter-spacing: -.012em;
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 24px;
}

.manifesto em {
  color: var(--primary);
  font-style: italic;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}

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

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

.step {
  position: relative;
  padding-top: 24px;
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: -12px;
  left: 0;
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--primary);
  opacity: .25;
  font-weight: 500;
}

.step h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

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

.feature-card {
  padding: 28px 26px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-icon {
  font-size: 32px;
}

.feature-card h3 {
  font-size: 22px;
  margin-bottom: 6px;
}

/* Privacy grid */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

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

.privacy-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.privacy-item svg {
  color: var(--primary);
}

.privacy-item h4 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}

.privacy-item p {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 280px;
}

/* Waitlist CTA */
.cta-section {
  background: var(--ink);
  color: var(--paper);
}

.cta-section .h2 {
  color: var(--paper);
}

.cta-section .lead {
  color: rgba(255,255,255,.8);
}

.cta-box {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.waitlist-form {
  display: flex;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.waitlist-form input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  padding: 8px 0;
  min-width: 0;
}

.waitlist-form input::placeholder {
  color: var(--ink-3);
}

@media (max-width: 560px) {
  .waitlist-form {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
    border-radius: 16px;
  }

  .waitlist-form input {
    padding: 12px;
  }

  .waitlist-form .btn {
    width: 100%;
  }
}

/* Footer */
.footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

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

.footer h5 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
}

.footer a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
  .hero::before { animation: none !important; }
}
