/*
  My Life Stories — site styles.

  The palette, type, and sizing match the iOS app's design system
  (cream paper, navy ink, amber accents, a serif for the heartfelt copy).
  To change a color everywhere, change it once in :root below.
*/

:root {
  color-scheme: light;

  /* Palette — the same values as the app */
  --cream: #fdfbf7;        /* page background */
  --cream-deep: #f7f1e6;   /* raised sections, secondary buttons */
  --surface: #ffffff;      /* cards */
  --navy: #0f172a;         /* main text */
  --navy-soft: #1e293b;    /* secondary text */
  --amber: #d97706;        /* decoration only — never behind text */
  --amber-deep: #b45309;   /* buttons and links */
  --amber-darker: #92400e; /* button hover */
  --sage: #5b7561;         /* gentle positive accents */
  --sage-deep: #3f5445;
  --success-tint: #eef3ec;
  --paper-line: #e7dfcf;   /* hairlines and borders */

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Sizing */
  --radius: 14px;
  --touch: 60px;           /* every button and link target is at least this tall */
  --gutter: 16px;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1.25rem; /* 20px — large, easy reading */
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--amber-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--amber-darker);
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

/* Skip link for keyboard and screen-reader users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 20px;
  background: var(--navy);
  color: var(--cream);
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  color: var(--cream);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--paper-line);
  background: var(--cream);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  color: var(--navy);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
}

.brand:hover {
  color: var(--navy);
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 14px;
  color: var(--navy-soft);
  text-decoration: none;
  font-size: 1.125rem;
  border-radius: 10px;
}

.site-nav a:hover {
  color: var(--navy);
  background: var(--cream-deep);
}

@media (max-width: 640px) {
  .site-nav {
    display: none; /* the page is one scroll on phones; every section is reachable below */
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 28px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}

.button-primary {
  background: var(--amber-deep);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--amber-darker);
  color: #ffffff;
}

.button-secondary {
  background: var(--cream-deep);
  color: var(--navy);
  border-color: var(--paper-line);
}

.button-secondary:hover {
  background: var(--paper-line);
  color: var(--navy);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 480px) {
  .button-row .button {
    width: 100%;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 80px;
}

.hero .container {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero .container {
    grid-template-columns: 1.2fr 1fr;
  }
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--success-tint);
  color: var(--sage-deep);
  font-size: 1.0625rem;
  font-weight: 600;
}

.lede {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--navy-soft);
  max-width: 34ch;
  margin-bottom: 32px;
}

.hero-note {
  margin: 20px 0 0;
  font-size: 1.0625rem;
  color: var(--navy-soft);
}

/* The prompt card — a picture of what the app actually asks */
.prompt-card {
  position: relative;
  background: var(--cream-deep);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  box-shadow: 0 2px 0 var(--paper-line);
  padding: 32px 28px;
}

.prompt-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--amber-deep), #f2b14d);
}

.prompt-label {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.prompt-question {
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.35;
  margin: 0 0 28px;
}

.prompt-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.prompt-methods li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  background: var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.prompt-methods svg {
  width: 28px;
  height: 28px;
  color: var(--amber-deep);
}

.prompt-progress {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--sage-deep);
  font-weight: 600;
}

.progress-track {
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--paper-line);
  overflow: hidden;
}

.progress-fill {
  width: 80%;
  height: 100%;
  background: var(--sage);
}

/* ---------- Sections ---------- */

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--cream-deep);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
}

.section-intro {
  max-width: 44ch;
  margin-bottom: 48px;
}

.section-intro p {
  color: var(--navy-soft);
}

.steps {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 28px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--navy-soft);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.features {
  display: grid;
  gap: 24px;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--sage);
}

/* ---------- Gift ---------- */

.gift {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .gift {
    grid-template-columns: auto 1fr;
    gap: 56px;
  }
}

.gift-mark {
  width: 140px;
  height: 140px;
  padding: 22px;
  border-radius: 32px;
  background: var(--amber);
}

.gift p {
  color: var(--navy-soft);
  max-width: 52ch;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 820px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--touch);
  padding: 16px 24px;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* A visible plus/minus, so it's clear each question opens */
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--amber-deep);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > div {
  padding: 0 24px 20px;
  color: var(--navy-soft);
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

/* ---------- Sign-up form ---------- */

.notify {
  max-width: 640px;
}

.notify-form {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.field .hint {
  font-weight: 400;
  color: var(--navy-soft);
}

.field input,
.field textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 16px;
  border: 2px solid var(--navy-soft);
  border-radius: 12px;
  background: var(--surface);
  color: var(--navy);
  font: inherit;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid var(--amber);
  outline-offset: 1px;
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

.form-note {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--navy-soft);
}

/* ---------- Plain text pages (privacy, support) ---------- */

.page {
  padding: 64px 0 80px;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 1.75em;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.5em;
}

.updated {
  color: var(--navy-soft);
  font-size: 1.0625rem;
}

.callout {
  background: var(--success-tint);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--paper-line);
  padding: 40px 0;
  font-size: 1.0625rem;
  color: var(--navy-soft);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  color: var(--navy-soft);
}

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

.site-footer p {
  margin: 0;
}
