/* As Life Unfolds — public pages. Palette and typefaces come from the app (TodayBookStyle). */
@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Schoolbell"; src: url("fonts/Schoolbell-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --paper: #f8f0de;
  --paper-deep: #efe3c8;
  --ink: #453a30;
  --title-ink: #725d49;
  --green: #33614f;
  --line: #a6916d;
  --cover: #7a5940;
  --note-bg: #fff4d6;
  --note-ink: #6b4b12;
  --max: 46rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 "EB Garamond", Georgia, "Times New Roman", serif;
}

a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--cover); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 0.75rem; z-index: 10; }

/* Shared header and footer */
.site-header {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  background: var(--paper);
}
.site-header .inner, .site-footer .inner, main {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--title-ink); font-size: 1.25rem; font-weight: 500; }
.brand img { width: 2.1rem; height: 2.1rem; border-radius: 0.55rem; }
.site-header nav ul { list-style: none; display: flex; gap: 1.1rem; margin: 0; padding: 0; flex-wrap: wrap; }
.site-header nav a { font-family: "Schoolbell", "Comic Sans MS", cursive; font-size: 1.05rem; text-decoration: none; }
.site-header nav a[aria-current="page"] { text-decoration: underline; color: var(--cover); }

.site-footer { margin-top: 3.5rem; border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent); background: var(--paper-deep); }
.site-footer .inner { padding-top: 1.5rem; padding-bottom: 2rem; font-size: 0.95rem; color: var(--title-ink); }
.toc ul { margin: 0; padding-left: 1.2rem; }
.site-footer ul { list-style: none; display: flex; gap: 1.1rem; flex-wrap: wrap; padding: 0; margin: 0 0 0.6rem; }

/* Content */
main { padding-top: 2rem; }
h1, h2, h3 { color: var(--title-ink); font-weight: 500; line-height: 1.2; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin: 0.2rem 0 0.4rem; }
h2 { font-size: 1.55rem; margin: 2.2rem 0 0.5rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 0.3rem; }
.kicker { font-family: "Schoolbell", "Comic Sans MS", cursive; color: var(--green); font-size: 1.05rem; margin: 0; }
.updated { color: var(--title-ink); font-size: 0.95rem; }
p, li { max-width: 40rem; }
.handwritten { font-family: "Schoolbell", "Comic Sans MS", cursive; }

.card {
  background: color-mix(in srgb, white 35%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* Owner placeholders: visible in drafts, never clickable. */
.todo {
  background: var(--note-bg);
  color: var(--note-ink);
  border: 1px dashed #c69a3c;
  border-radius: 0.35rem;
  padding: 0 0.3rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85em;
}
.draft-banner {
  background: var(--note-bg);
  color: var(--note-ink);
  border-bottom: 1px solid #e4c47a;
  text-align: center;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}

/* Landing (colours from the App Store art: #f1e6d0 cream, #e0e6d3 sage, #3e4839 ink, #384f49 deep green) */
.landing main { max-width: 68rem; padding-top: 0; }
.landing h2 { text-align: center; font-size: clamp(1.7rem, 4.5vw, 2.3rem); margin: 0 0 1.5rem; }
.landing h3 { font-size: 1.25rem; margin: 0.7rem 0 0.2rem; }
.landing p { max-width: none; }

.l-hero {
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
  padding: 2.5rem 0 3rem;
}
.l-hero-copy { text-align: center; }
.l-hero h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); margin: 0.2rem 0 0.1rem; letter-spacing: -0.01em; }
.l-hero .tagline { font-size: clamp(1.3rem, 3.6vw, 1.65rem); margin: 0 0 1rem; }
.lede { font-size: 1.15rem; max-width: 30rem !important; margin: 0 auto 1.5rem; }
.soon {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: "Schoolbell", "Comic Sans MS", cursive; font-size: 1.15rem;
  background: var(--green); color: var(--paper);
  border-radius: 999px; padding: 0.55rem 1.35rem; margin: 0;
}
.soon-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #e8c97a; box-shadow: 0 0 0 0 rgba(232, 201, 122, 0.6); animation: pulse 2.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 0.45rem rgba(232, 201, 122, 0); } }

.l-hero-shot { margin: 0 auto; width: min(70vw, 21rem); }
.l-hero-shot img, .l-beat img, .l-shots img {
  display: block; width: 100%; height: auto; border-radius: 1.4rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 40px -12px rgba(62, 72, 57, 0.35);
}
.l-hero-shot img { transform: rotate(2deg); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(2deg) translateY(-8px); } }

.l-story {
  background: #e0e6d3; border-radius: 2rem; padding: 2.75rem 1.25rem 2.25rem; margin: 0 -0.25rem;
}
.l-story-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; max-width: 46rem; margin: 0 auto; }
.l-beat { text-align: center; }
.l-beat p:not(.l-step) { max-width: 22rem !important; margin: 0 auto 1.25rem; }
.l-beat img { width: min(80vw, 17rem); margin: 0 auto; }
.l-step {
  font-family: "Schoolbell", "Comic Sans MS", cursive; color: var(--paper); background: #3e4839;
  width: 2rem; height: 2rem; line-height: 2rem; border-radius: 50%; margin: 0 auto; font-size: 1.05rem;
}
.l-promise { text-align: center; font-family: "Schoolbell", "Comic Sans MS", cursive; font-size: 1.2rem; color: #3e4839; margin: 2.25rem auto 0; }

.l-gallery { padding: 3.5rem 0 1rem; }
.l-shots {
  list-style: none; margin: 0; padding: 0.5rem 0 1.25rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 14rem); gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.l-shots li { scroll-snap-align: center; text-align: center; }
.l-shots p { font-size: 1rem; color: var(--title-ink); margin: 0; }
.l-note { text-align: center; color: var(--title-ink); font-size: 0.98rem; margin: 1rem auto 0; max-width: 34rem !important; }

.l-close {
  text-align: center; background: #384f49; color: #f6ead1; border-radius: 2rem;
  padding: 3rem 1.5rem; margin: 2.5rem -0.25rem 0;
}
.l-close img { border-radius: 1.3rem; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
.l-close h2 { color: #f6ead1; margin: 1.2rem 0 0.6rem; }
.l-close p { max-width: 30rem !important; margin: 0 auto 1.4rem; }
.l-close .soon { background: #f6ead1; color: #384f49; }

@media (min-width: 52rem) {
  .l-hero { grid-template-columns: 1.1fr 0.9fr; padding: 3.5rem 1rem 4rem; }
  .l-hero-copy { text-align: left; }
  .lede { margin-left: 0; }
  .l-story { padding: 3.5rem 2.5rem 3rem; margin: 0; }
  .l-story-grid { grid-template-columns: 1fr 1fr; }
  .l-beat:nth-child(2) { margin-top: 4rem; }
  .l-shots { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .l-shots li:nth-child(even) { margin-top: 2.5rem; }
  .l-close { margin: 3rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; }
  .l-hero-shot img { transform: rotate(2deg); }
}
