:root {
  color-scheme: light;
  --fmm-wash: #d6cbbb;
  --fmm-page: #ede5d8;
  --fmm-ivory: #f5efe4;
  --fmm-ivory-low: #f0eae0;
  --fmm-card: #fbf7f1;
  --fmm-raised: #fefcf9;
  --fmm-float: #faf6f0;
  --fmm-ink: #1c1a12;
  --fmm-ink-soft: #3d3020;
  --fmm-stage: #0f0e08;
  --fmm-stage-blue: #11293a;
  --fmm-gold: #ebaf49;
  --fmm-gold-soft: #ffcd81;
  --fmm-border: rgba(181, 164, 140, 0.15);
  --fmm-border-strong: rgba(181, 164, 140, 0.28);
  --fmm-shadow: 0 24px 70px rgba(15, 14, 8, 0.12);
  --fmm-focus: #1c1a12;
  --fmm-focus-halo: rgba(255, 205, 129, 0.82);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--fmm-page);
}

body {
  margin: 0;
  background: var(--fmm-page);
  color: var(--fmm-ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body::selection {
  background: rgba(235, 175, 73, 0.35);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--fmm-focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px var(--fmm-focus-halo);
}

.font-display {
  font-family: var(--font-display);
}

.page-shell {
  min-height: 100vh;
  background: var(--fmm-ivory);
}

.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--fmm-border);
  background: var(--fmm-ivory);
}

.site-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
  font-size: 1.25rem;
  white-space: nowrap;
  text-decoration: none;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  box-shadow: 0 6px 18px rgba(15, 14, 8, 0.12);
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  font-size: 0.95rem;
  color: var(--fmm-ink-soft);
}

.nav-links a {
  text-decoration: none;
}

.nav-links > a:not(.gold-button) {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

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

.nav-cta {
  min-height: 2.75rem;
  padding: 0 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.gold-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  background: var(--fmm-gold);
  color: var(--fmm-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
  text-align: center;
}

.gold-button:hover {
  background: var(--fmm-gold-soft);
}

.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--fmm-border);
  color: var(--fmm-ink);
  text-decoration: none;
  background: rgba(254, 252, 249, 0.86);
  text-align: center;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1rem, 3vw, 2rem);
}

.section-tight {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 3vw, 2rem);
}

.eyebrow {
  color: var(--fmm-ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.display-xl {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
  font-size: clamp(3rem, 9vw, 6.8rem);
}

.display-lg {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.lead {
  font-size: 1.1rem;
  color: var(--fmm-ink-soft);
  max-width: 64ch;
}

.stage {
  background: var(--fmm-stage-blue);
  color: #e7e2d6;
  border-radius: clamp(1.4rem, 4vw, 2.8rem);
  box-shadow: none;
  overflow: hidden;
}

.phone-frame {
  position: relative;
  width: min(19rem, 78vw);
  aspect-ratio: 9 / 19.5;
  margin: 0 auto;
  border-radius: 2.4rem;
  padding: 0.78rem;
  background: #15140c;
  box-shadow: 0 24px 60px rgba(15, 14, 8, 0.2);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 1.8rem;
  overflow: hidden;
  background: var(--fmm-card);
  color: var(--fmm-ink);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.28rem;
}

.memory-tile {
  aspect-ratio: 3 / 4.2;
  background: linear-gradient(145deg, #496b83, #d9a777 54%, #5f4054);
}

.feature-band {
  background: var(--fmm-ivory-low);
}

.fact-list {
  display: grid;
  gap: 0.7rem;
}

.fact-list li {
  list-style: none;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--fmm-border);
}

.reading-page {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 3vw, 2rem);
}

.reading-page h1,
.reading-page h2 {
  color: var(--fmm-ink);
  letter-spacing: 0;
}

.reading-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 9vw, 4.2rem);
  line-height: 1.02;
}

.reading-page h2 {
  margin-top: 3rem;
  font-family: var(--font-body);
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.14;
  font-weight: 750;
}

.reading-page h3 {
  margin-top: 2rem;
  font-weight: 800;
  color: var(--fmm-ink);
}

.reading-page p,
.reading-page li {
  color: var(--fmm-ink-soft);
  font-size: 1.05rem;
}

.answer-block {
  border: 1px solid var(--fmm-border);
  background: var(--fmm-card);
  border-radius: 1rem;
  padding: clamp(1.15rem, 3vw, 1.75rem);
}

.faq-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.faq-index a {
  display: inline-flex;
  align-items: center;
  min-height: 2.45rem;
  border-radius: 999px;
  border: 1px solid var(--fmm-border-strong);
  padding: 0 0.95rem;
  background: var(--fmm-raised);
  color: var(--fmm-ink);
  font-weight: 700;
  text-decoration: none;
}

.faq-cluster {
  margin-top: 3rem;
  border-top: 1px solid var(--fmm-border-strong);
}

.faq-cluster h2 {
  margin-top: 1.3rem;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.faq-list details {
  border-top: 1px solid var(--fmm-border);
  padding: 1rem 0;
}

.faq-list details:first-child {
  border-top: 0;
}

.faq-list summary {
  cursor: pointer;
  color: var(--fmm-ink);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.24;
}

.faq-list details p {
  margin-top: 0.75rem;
}

.app-hero {
  background: var(--fmm-ivory);
}

.hero-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6.25rem) clamp(1rem, 3vw, 2rem);
  display: grid;
  align-items: center;
  gap: clamp(2.25rem, 6vw, 5rem);
}

.hero-copy {
  max-width: 44rem;
  min-width: 0;
}

.hero-title {
  max-width: 14.25ch;
  font-family: var(--font-display);
  font-size: clamp(3.35rem, 8.2vw, 6.2rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.hero-lead {
  max-width: 37rem;
  margin-top: 1.5rem;
  color: var(--fmm-ink-soft);
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  line-height: 1.48;
  overflow-wrap: normal;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.trust-row {
  margin-top: 2rem;
  display: grid;
  gap: 0.55rem;
  color: var(--fmm-ink-soft);
  font-size: 0.98rem;
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.trust-row span::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--fmm-gold);
  flex: 0 0 auto;
}

.app-proof-stage {
  position: relative;
  isolation: isolate;
  min-height: 0;
  border-radius: clamp(1.35rem, 4vw, 2.5rem);
  background: var(--fmm-stage-blue);
  overflow: hidden;
  display: grid;
  place-items: end center;
  padding: clamp(4.2rem, 7vw, 5.25rem) clamp(1.1rem, 4vw, 2rem) clamp(1.2rem, 4vw, 2rem);
}

.app-proof-stage::before {
  content: "inside FreeMyMemories";
  position: absolute;
  left: 1.25rem;
  top: 1.15rem;
  z-index: 2;
  color: #e7e2d6;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.app-shot {
  display: block;
  width: min(18rem, 72vw);
  height: auto;
  border-radius: 1.7rem;
  background: var(--fmm-ivory);
  border: 1px solid rgba(231, 226, 214, 0.22);
}

.app-shot-primary {
  position: relative;
  z-index: 2;
  width: min(18rem, 82%);
}

.app-shot-secondary {
  position: absolute;
  left: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: min(13.5rem, 44vw);
  opacity: 0.96;
  z-index: 1;
}

.section-kicker {
  color: var(--fmm-ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.split-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.75rem, 7vw, 6.5rem) clamp(1rem, 3vw, 2rem);
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.truth-list {
  display: grid;
  gap: 1rem;
}

.truth-item {
  padding: 1.1rem 0;
  border-top: 1px solid var(--fmm-border-strong);
}

.truth-item strong {
  display: block;
  color: var(--fmm-ink);
  font-size: 1.15rem;
  line-height: 1.2;
}

.truth-item span {
  display: block;
  margin-top: 0.35rem;
  color: var(--fmm-ink-soft);
}

.workflow-steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.workflow-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0;
  border-top: 1px solid var(--fmm-border-strong);
}

.workflow-step::before {
  content: counter(step, decimal-leading-zero);
  color: var(--fmm-gold);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.workflow-step h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.workflow-step p {
  margin: 0.35rem 0 0;
  color: var(--fmm-ink-soft);
}

.product-stage {
  background: var(--fmm-stage-blue);
  color: #e7e2d6;
}

.product-stage-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.75rem, 7vw, 6.5rem) clamp(1rem, 3vw, 2rem);
}

.product-stage .section-kicker,
.product-stage .lead,
.product-stage p {
  color: #d9d1c0;
}

.screen-rail {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: 1rem;
}

.screen-card {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.screen-card img {
  width: 100%;
  max-width: 20rem;
  border-radius: 1.45rem;
  border: 1px solid rgba(231, 226, 214, 0.2);
  background: var(--fmm-ivory);
}

.screen-card h3 {
  margin: 0;
  color: #e7e2d6;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.05;
}

.screen-card p {
  margin-top: 0.65rem;
  max-width: 26rem;
}

.photo-proof-band {
  background: var(--fmm-page);
}

.privacy-split {
  align-items: center;
}

.privacy-copy {
  align-self: center;
}

.asset-grid {
  display: grid;
  gap: 1rem;
}

.asset-tile {
  display: grid;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.asset-tile img {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--fmm-border-strong);
  background: var(--fmm-card);
}

.asset-tile strong {
  font-size: 1.08rem;
}

.page-hero-title {
  overflow-wrap: normal;
}

.section-tight table,
.reading-page table {
  table-layout: fixed;
}

.section-tight th,
.section-tight td,
.reading-page th,
.reading-page td {
  overflow-wrap: anywhere;
}

.site-footer {
  border-top: 1px solid var(--fmm-border);
  background: var(--fmm-float);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 3vw, 2rem);
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-inner a {
  display: block;
  margin: 0.45rem 0;
  color: var(--fmm-ink-soft);
  text-decoration: none;
}

.footer-inner .brand-mark {
  display: inline-flex;
  margin: 0;
  color: var(--fmm-ink);
}

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

.legal-disclosure {
  margin-top: 1rem;
  max-width: 22rem;
  color: var(--fmm-ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .site-nav {
    align-items: center;
    gap: 0.75rem;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.7rem;
    font-size: 0.92rem;
  }

  .nav-optional {
    display: none;
  }

  .nav-links > a.nav-optional {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .site-nav {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .hero-grid {
    padding-top: 2.25rem;
    padding-bottom: 2.75rem;
    gap: 1.6rem;
  }

  .hero-copy,
  .app-proof-stage {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
    justify-self: center;
  }

  .hero-title {
    max-width: 10.25ch;
    font-size: clamp(2.65rem, 10.5vw, 3.1rem);
    line-height: 0.98;
  }

  .hero-lead {
    margin-top: 1rem;
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .hero-actions {
    margin-top: 1.35rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .hero-actions a {
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    padding-inline: 0.9rem;
    font-size: 0.95rem;
  }

  .trust-row {
    margin-top: 1.35rem;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    font-size: 0.88rem;
    line-height: 1.28;
  }

  .trust-row span {
    align-items: flex-start;
  }

  .app-shot-primary {
    width: min(14.75rem, 74vw);
  }

  .app-shot-secondary {
    display: none;
  }

  .section-tight > h1.font-display,
  .page-hero-title {
    font-size: clamp(2.35rem, 10.5vw, 3rem) !important;
    line-height: 0.98 !important;
  }
}

@media (max-width: 520px) {
  .section,
  .section-tight,
  .reading-page,
  .split-section,
  .product-stage-inner {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
    padding-left: 0;
    padding-right: 0;
  }

  .hero-copy,
  .app-proof-stage {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
  }

  .nav-links > a.nav-support {
    display: none;
  }

  .nav-cta {
    display: inline-flex;
    min-height: 2.5rem;
    padding: 0 0.85rem;
    font-size: 0.82rem;
  }

  .brand-mark {
    font-size: 1rem;
  }

  .brand-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.48rem;
  }
}

@media (min-width: 760px) {
  .hero-grid,
  .split-section {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 31rem);
  }

  .trust-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen-rail,
  .asset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screen-card {
    grid-template-rows: auto 1fr;
  }

  .lead {
    font-size: 1.22rem;
  }
}

@media (min-width: 1120px) {
  .footer-inner {
    grid-template-columns: minmax(13rem, 1.45fr) repeat(auto-fit, minmax(8.25rem, 1fr));
  }

  .lead {
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .reveal-up {
    animation: fmmRevealUp 640ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes fmmRevealUp {
    from {
      opacity: 0;
      transform: translateY(22px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
