/* ==========================================================================
   Museum Log — site styles
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f5f5f4;
  --field: #ebebeb;
  --ink: #000000;
  --ink-2: #333333;
  --muted: #777777;
  --muted-2: #999999;
  --line: #e7e7e7;
  --accent: #8d7b68; /* warm taupe from the app's segmented control */

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --container: 1000px;
  --gutter: 24px;
  --radius: 14px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
}
.headline {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
}
.headline-sub { color: var(--muted-2); }
.lede {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.22;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--muted-2);
}
.eyebrow {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.title-sm {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-size: 1.35rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px;
  border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 500; font-size: 1rem; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-dark { background: var(--ink-2); color: #fff; }
.btn-dark:hover { background: #000; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.btn-light { background: var(--field); color: var(--ink); }
.btn-light:hover { background: #e2e2e2; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav {
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  font-family: var(--font-serif); font-size: 1.2rem;
}
.nav-logo { font-weight: 700; justify-self: start; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 20px; }
.nav-links a, .nav-cta { position: relative; }
.nav-links a::after, .nav-cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after, .nav-cta:hover::after { transform: scaleX(1); }
.nav-cta { font-weight: 700; justify-self: end; }
.nav-cta-spacer { justify-self: end; }
.nav-toggle { display: none; }

@media (max-width: 640px) {
  :root { --header-h: 64px; --gutter: 16px; }
  .nav { grid-template-columns: 1fr auto auto; gap: 18px; font-size: 1.1rem; }
  .nav-toggle {
    display: grid; place-content: center; gap: 5px;
    width: 40px; height: 40px; margin-right: -8px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--ink); transition: transform .25s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .nav-links {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 4px var(--gutter) 16px;
    font-size: 1.5rem;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 0; }
  .nav-links a::after { display: none; }
  .nav-cta { order: 2; }
  .nav-toggle { order: 3; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section-tight { padding: clamp(48px, 7vw, 90px) 0; }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-head p:not(.eyebrow) { margin-top: 16px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); }
.hero .display { max-width: 16ch; }
.hero .lede { margin-top: clamp(24px, 3.5vw, 40px); max-width: 30ch; }
.hero .btn-row { margin-top: clamp(40px, 6vw, 64px); }
.hero-center { text-align: center; }
.hero-center .display, .hero-center .lede { margin-left: auto; margin-right: auto; }
.hero-center .lede { max-width: 34ch; }

/* ---------- Gallery (scroll-driven collage around the phone) ----------
   Four tidy columns of paintings flank the phone. All sizes derive from:
     --ph  phone height          --pw  phone width
     --aw  painting width: fits two columns per side, capped by stage height
   --p runs 0 -> 1 with scroll; each column slides in from its side (--dx),
   delayed by --lag, and the inner columns end tucked behind the phone. */
.gallery { position: relative; height: 260vh; }
.gallery-stage {
  --p: 0;
  --stage-h: calc(100svh - var(--header-h));
  --ph: min(calc(var(--stage-h) * .84), 640px);
  --pw: calc(var(--ph) * 700 / 1432);
  --gap: clamp(12px, 1.4vw, 22px);
  --tuck: .22; /* share of an inner painting hidden behind the phone */
  --aw: min(calc(var(--stage-h) * .3), calc((100vw - var(--pw)) / 2 / (2 - var(--tuck)) - var(--gap)));
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); height: var(--stage-h);
  display: flex; align-items: center; justify-content: center;
  gap: var(--gap);
  overflow: hidden;
}
.gallery-phone {
  position: relative; z-index: 2; flex: none;
  height: var(--ph);
  aspect-ratio: 700 / 1432;
  transform: translateY(calc((1 - var(--p)) * 30px)) scale(calc(.96 + var(--p) * .04));
}
.gallery-phone img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 50px rgba(0,0,0,.22)); }

.gcol {
  flex: none; width: var(--aw);
  display: flex; flex-direction: column; gap: var(--gap);
  --q: clamp(0, calc((var(--p) - var(--lag)) / (1 - var(--lag))), 1);
  transform: translate(calc(var(--dx) * (1 - var(--q))), var(--shift));
  opacity: clamp(0, calc(var(--q) * 2.5), 1);
  will-change: transform;
}
/* inner columns sit on top of the outer ones and slip under the phone */
.gcol-li, .gcol-ri { position: relative; z-index: 1; }
.gcol-li { margin-right: calc(var(--aw) * var(--tuck) * -1 - var(--gap)); }
.gcol-ri { margin-left:  calc(var(--aw) * var(--tuck) * -1 - var(--gap)); }
/* staggered heights keep the columns from lining up like a grid */
.gcol-lo { --dx: -60vw; --lag: 0;   --shift: 4%; }
.gcol-li { --dx: -70vw; --lag: .18; --shift: -3%; }
.gcol-ri { --dx: 70vw;  --lag: .18; --shift: -3%; }
.gcol-ro { --dx: 60vw;  --lag: 0;   --shift: 4%; }

.art {
  margin: 0;
  border-radius: 8px; overflow: hidden;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}
.art img { width: 100%; height: auto; }

@media (max-width: 760px) {
  .gallery { height: 220vh; }
  .gallery-stage {
    --ph: min(calc(var(--stage-h) * .66), 480px);
    --aw: 42vw;
    --tuck: .35;
  }
  .gcol-lo, .gcol-ro { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery { height: auto; }
  .gallery-stage { position: relative; top: 0; height: min(760px, 90vh); --p: 1 !important; }
}

/* ---------- Feature cards (home) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.step-media {
  aspect-ratio: 1 / 1; border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  display: grid; place-items: center;
  margin-bottom: 22px;
}
.step-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.step:hover .step-media img { transform: scale(1.03); }
.step-num { font-family: var(--font-serif); color: var(--muted-2); font-size: 1rem; margin-bottom: 6px; }
.step p:last-child { margin-top: 10px; color: var(--muted); }
.step-media.is-phone, .feature-media.is-phone { place-items: start center; }
.step-media.is-phone img, .feature-media.is-phone img {
  width: 58%; height: auto; margin-top: 9%;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.12));
}
.step:hover .step-media.is-phone img { transform: translateY(-6px); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; gap: 48px; } }

/* ---------- Problem list ---------- */
.problems { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 860px; margin: 0 auto; }
.problem {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface);
  font-size: 1.05rem; line-height: 1.45;
}
.problem-mark {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--muted); font-size: .8rem; font-weight: 600;
}
@media (max-width: 640px) { .problems { grid-template-columns: 1fr; } }

/* ---------- Signup form ---------- */
.signup { max-width: 760px; margin: 0 auto; text-align: center; }
.signup .headline + .headline { margin-top: 2px; }
.signup-form { width: 100%; max-width: 320px; margin: clamp(36px, 5vw, 56px) auto 0; display: grid; gap: 10px; }
.signup-form input {
  width: 100%; height: 50px; padding: 0 15px;
  border: 1px solid transparent; border-radius: 8px;
  background: var(--field); color: var(--ink); font-size: 1rem;
  transition: border-color .2s, background-color .2s;
}
.signup-form input::placeholder { color: var(--muted-2); }
.signup-form input:focus { outline: none; background: #fff; border-color: var(--ink-2); }
.signup-form .btn { border-radius: 8px; }
.signup-form .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-status { min-height: 1.5em; font-size: .95rem; color: var(--muted); }
.form-status.is-error { color: #b42318; }
.signup-form.is-done input, .signup-form.is-done .btn { display: none; }
.signup-form.is-done .form-status {
  color: var(--ink); background: var(--surface); padding: 16px; border-radius: 8px;
}
.hp { position: absolute; left: -9999px; }

/* ---------- Feature rows (features page) ---------- */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(32px, 6vw, 88px);
}
.feature-row + .feature-row { margin-top: clamp(80px, 11vw, 140px); }
.feature-row.is-flipped .feature-media { order: 2; }
.feature-media {
  border-radius: 22px; background: var(--surface); overflow: hidden;
  aspect-ratio: 1 / 1; display: grid; place-items: center;
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.feature-copy .headline { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.feature-copy p:not(.eyebrow) { margin-top: 18px; font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
@media (max-width: 820px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.is-flipped .feature-media { order: 0; }
}

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  padding: 30px 28px; border-radius: var(--radius); background: var(--surface);
}
.card p { margin-top: 12px; color: var(--muted); }
.card-icon { width: 36px; height: 36px; margin-bottom: 26px; color: var(--ink); }
@media (max-width: 820px) { .cards-3, .cards-2 { grid-template-columns: 1fr; } }

/* ---------- Plan comparison ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-col { border-radius: 22px; padding: clamp(28px, 4vw, 44px); background: var(--surface); }
.compare-col.is-premium { background: #111; color: #fff; }
.compare-col.is-premium .muted, .compare-col.is-premium .feat p { color: #a3a3a3; }
.compare-col h3 { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; }
.compare-col > .muted { margin-top: 6px; }
.feat-list { margin-top: 30px; display: grid; gap: 20px; }
.feat { display: grid; grid-template-columns: 22px 1fr; column-gap: 12px; }
.feat svg { width: 18px; height: 18px; margin-top: 3px; }
.feat h4 { font-weight: 600; font-size: 1rem; }
.feat p { grid-column: 2; color: var(--muted); font-size: .95rem; margin-top: 2px; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 34px 30px 30px; border-radius: 22px;
  background: var(--surface);
}
.plan.is-featured { background: #111; color: #fff; }
.plan.is-featured .muted, .plan.is-featured .plan-list { color: #b5b5b5; }
.plan.is-featured .btn-dark { background: #fff; color: #000; }
.plan h2 { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; }
.plan-price {
  margin-top: 18px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.04em;
  font-size: 2.6rem; line-height: 1;
}
.plan-price small { font-size: 1rem; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.plan-note { margin-top: 12px; font-size: .95rem; min-height: 3em; }
.plan-list { margin: 26px 0 30px; display: grid; gap: 12px; color: var(--ink-2); }
.plan-list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.plan-list svg { width: 16px; height: 16px; margin-top: 4px; }
.plan .btn { margin-top: auto; width: 100%; }
.badge {
  position: absolute; top: 18px; right: 18px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: 5px 10px; border-radius: 999px;
  background: var(--accent); color: #fff;
}
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } .plan-note { min-height: 0; } }

.premium-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.premium-grid .card h3 { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.25; }
@media (max-width: 900px) { .premium-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .premium-grid { grid-template-columns: 1fr; } }

/* ---------- Perks (waitlist / beta) ---------- */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 900px; margin: 40px auto 0; }
.perk {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 26px 16px; border-radius: var(--radius); background: var(--surface);
  text-align: center; font-weight: 600; font-size: 1rem;
}
.perk svg { width: 26px; height: 26px; }
@media (max-width: 760px) { .perks { grid-template-columns: 1fr 1fr; } }

.panel {
  border-radius: 28px; background: var(--surface);
  padding: clamp(40px, 7vw, 80px) clamp(22px, 5vw, 64px);
  text-align: center;
}
.panel .lede { max-width: 38ch; margin: 18px auto 0; font-size: clamp(1.1rem, 2vw, 1.35rem); }

/* ---------- Legal ---------- */
.legal { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); }
.legal-body { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); color: var(--ink-2); font-size: 1rem; line-height: 1.7; }
.legal-body h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.04em; line-height: 1.05;
  font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--ink); margin-bottom: 18px;
}
.legal-body h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: 1.45rem; color: var(--ink); margin: 52px 0 14px;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.legal-body h3 { font-weight: 600; font-size: 1.08rem; color: var(--ink); margin: 30px 0 10px; }
.legal-body p { margin: 0 0 14px; }
.legal-body .legal-date { color: var(--muted); margin: 0; font-size: .95rem; }
.legal-body .legal-date + p:not(.legal-date) { margin-top: 28px; }
.legal-body ul { margin: 0 0 16px; padding-left: 1.2em; list-style: disc; }
.legal-body li { margin-bottom: 8px; padding-left: 4px; }
.legal-body li::marker { color: var(--muted-2); }
.legal-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted-2); }
.legal-body a:hover { text-decoration-color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 10px 0 22px; border: 1px solid var(--line); border-radius: 12px; }
.legal-body table { border-collapse: collapse; width: 100%; font-size: .92rem; line-height: 1.5; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); min-width: 140px; }
.legal-body th { background: var(--surface); font-weight: 600; color: var(--ink); }
.legal-body tr:last-child td { border-bottom: 0; }

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 18px; padding: 80px var(--gutter); }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(64px, 9vw, 110px) 0 36px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr; gap: 40px; max-width: 952px; }
.footer-logo { font-family: var(--font-serif); font-weight: 700; font-size: 1.75rem; letter-spacing: -.01em; }
.footer-brand .muted { margin-top: 10px; }
.footer-heading { font-weight: 600; margin-bottom: 14px; }
.footer-list { display: grid; gap: 8px; }
.footer-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin-top: 64px; max-width: 952px; font-size: .85rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } .footer-bottom { margin-top: 44px; } }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
.perk-title { font-size: 1rem; font-weight: 600; line-height: 1.3; }
