/* Meemori website. Tokens mirror the app's theme (v2-app/.../ui/theme/Color.kt, Type.kt). */

@font-face { font-family: Marcellus; src: url(/assets/fonts/marcellus-regular.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/assets/fonts/nunito-sans-regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/assets/fonts/nunito-sans-bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/assets/fonts/nunito-sans-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --page: #fff9ef;
  --card: #fffcf6;
  --tan: #eae2cf;
  --outline: #e3d9c2;
  --ink: #1e1b13;
  --ink-2: #4b4639;
  --mustard: #f7de83;
  --on-mustard: #221b00;
  --clay: #f3e0c4;
  --on-clay: #6b4a1e;
  --sage: #e0e8d6;
  --on-sage: #3a5230;
  --night: #1c1a16;
  --night-card: #26231d;
  --on-night: #f6efe0;
  --on-night-2: #bdb4a1;
  --star: #e2a374;
  --blue: #0423a5;

  --serif: Marcellus, 'Iowan Old Style', Georgia, serif;
  --sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: 20px;
  --radius: 28px;
  --radius-s: 18px;
  --shadow: 0 1px 2px rgb(60 45 10 / 5%), 0 12px 32px -12px rgb(60 45 10 / 16%);
  --shadow-phone: 0 2px 4px rgb(40 30 5 / 10%), 0 40px 70px -30px rgb(40 30 5 / 45%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.5rem); line-height: 1.06; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.1; letter-spacing: -0.005em; }
h3 { font-size: 1.45rem; line-height: 1.2; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 720px); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 8px; }

.eyebrow {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-clay); margin-bottom: 18px;
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font-weight: 700; font-size: 0.9375rem; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.btn--ink { background: var(--ink); color: var(--page); }
.btn--ink:hover { background: #38321f; transform: translateY(-1px); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 24px 10px 20px; border-radius: 18px;
  background: var(--ink); color: var(--page); text-decoration: none;
  font-family: var(--sans); font-weight: 700; font-size: 1.125rem; line-height: 1.15;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgb(30 27 19 / 70%); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.02em; opacity: 0.75; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(255 249 239 / 82%); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.nav.is-stuck { border-bottom-color: var(--outline); }
.nav__in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.nav__logo img { width: 128px; height: auto; }
.nav__links { display: none; gap: 28px; margin-left: 20px; font-size: 0.9375rem; }
.nav__links a { text-decoration: none; color: var(--ink-2); padding: 12px 0; }
.nav__links a:hover { color: var(--ink); }
.nav__side { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav__cta { display: none; }
@media (min-width: 560px) { .nav__cta { display: inline-flex; } }
@media (min-width: 940px) { .nav__links { display: flex; } }

/* Hero */
.hero { position: relative; padding: clamp(36px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); overflow: clip; }
.hero__in { display: grid; gap: 56px; align-items: center; }
.hero__body { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--ink-2); max-width: 31em; margin: 24px 0 32px; }
.hero__note { margin-top: 18px; font-size: 0.875rem; color: var(--ink-2); }
.hero__visual { position: relative; width: min(100%, 460px); margin-inline: auto; aspect-ratio: 46 / 56; }
.hero__glow {
  position: absolute; inset: -18% -30%;
  background:
    radial-gradient(closest-side at 62% 42%, rgb(247 222 131 / 85%), transparent 72%),
    radial-gradient(closest-side at 28% 70%, rgb(226 163 116 / 42%), transparent 70%);
  filter: blur(8px);
}
@media (min-width: 940px) {
  .hero__in { grid-template-columns: 1.08fr 0.92fr; gap: 40px; }
  .hero__visual { margin-inline: auto 0; }
}

.phone {
  position: relative; border-radius: 13% / 6%; padding: 2.6%;
  background: #14120e; box-shadow: var(--shadow-phone), inset 0 0 0 1px rgb(255 255 255 / 8%);
}
.phone img { width: 100%; border-radius: 10.6% / 4.8%; }
.hero .phone { position: absolute; width: 56%; }
.phone--back { right: 0; top: 0; transform: rotate(5deg); }
.phone--front { left: 2%; bottom: 0; transform: rotate(-4deg); }

/* Question ticker */
.ticker { padding: 26px 0; border-block: 1px solid var(--outline); background: var(--card); overflow: hidden; display: grid; gap: 14px; }
.ticker__row { display: flex; width: max-content; animation: slide 64s linear infinite; }
.ticker__row--back { animation-direction: reverse; animation-duration: 76s; }
.ticker ul { display: flex; flex: none; }
.ticker li { display: flex; align-items: center; white-space: nowrap; font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.75rem); color: var(--ink); }
.ticker__row--back li { color: var(--ink-2); }
.ticker i { display: block; width: 14px; margin: 0 26px; color: var(--star); }
.ticker:hover .ticker__row { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section--tint { background: linear-gradient(var(--card), var(--card)) padding-box; border-block: 1px solid var(--outline); }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section__head p:not(.eyebrow) { margin-top: 18px; font-size: 1.1875rem; color: var(--ink-2); max-width: 34em; }

/* Steps */
.steps { display: grid; gap: 24px; }
.step { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--card); border: 1px solid var(--outline); overflow: hidden; }
.step__screen { aspect-ratio: 5 / 4.6; overflow: hidden; padding: 36px 14% 0; background: linear-gradient(180deg, var(--clay), #f8ecd8); }
.step:nth-child(1) .step__screen { background: linear-gradient(180deg, var(--mustard), #fbeeb6); }
.step__screen--night { background: linear-gradient(180deg, #3a3528, #2a261d) !important; }
.step:nth-child(3) .step__screen { background: linear-gradient(180deg, var(--sage), #edf2e6); }
.step__text { padding: 28px 28px 32px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 8px; align-items: baseline; }
.step__n { font-family: var(--serif); font-size: 1.45rem; color: var(--on-clay); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--outline); display: grid; place-items: center; align-self: center; }
.step__text p { grid-column: 1 / -1; color: var(--ink-2); }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Bento */
.bento { display: grid; gap: 20px; }
.tile, .tile-stack { min-width: 0; }
.tile { position: relative; display: flex; flex-direction: column; gap: 28px; padding: 32px; border-radius: var(--radius); background: var(--page); border: 1px solid var(--outline); overflow: hidden; }
.tile__text p { margin-top: 10px; color: var(--ink-2); }
.tile--night { background: var(--night); border-color: var(--night); color: var(--on-night); }
.tile--night .tile__text p { color: var(--on-night-2); }
.tile--clay { background: var(--clay); border-color: transparent; }
.tile--clay .tile__text p { color: var(--on-clay); }
.tile--mustard { background: var(--mustard); border-color: transparent; }
.tile--mustard .tile__text p { color: #4e4210; }
.tile--sage { background: var(--sage); border-color: transparent; }
.tile--sage .tile__text p { color: var(--on-sage); }
.tile-stack { display: grid; gap: 20px; }
.tile__art { width: 104px; mix-blend-mode: multiply; margin: -8px 0 -12px -8px; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile--wide { grid-column: span 3; }
  .bento > .tile:not(.tile--wide), .tile-stack { grid-column: span 2; }
  .tile { padding: 36px; }
}

.followup { margin-top: auto; padding: 22px; border-radius: 22px; background: var(--night-card); border: 1px solid rgb(255 255 255 / 9%); }
.followup__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-night-2); }
.followup p { margin: 10px 0 18px; font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.25; }
.followup__pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: rgb(255 255 255 / 10%); font-size: 0.875rem; font-weight: 700; }
.followup__pill svg { width: 16px; }

.transcript { margin-top: auto; padding: 24px; border-radius: 22px; background: var(--card); border: 1px solid var(--outline); display: grid; gap: 4px; }
.transcript__q { font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; }
.transcript__a { color: var(--ink-2); font-size: 1rem; }
.transcript__a + .transcript__q { margin-top: 16px; }

.segmented { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: rgb(107 74 30 / 14%); font-size: 0.875rem; font-weight: 700; text-align: center; }
.segmented span { padding: 10px 6px; border-radius: 999px; color: var(--on-clay); }
.segmented .is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(60 45 10 / 18%); }

.chips { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 13px; border-radius: 999px; background: var(--tan); font-size: 0.875rem; color: var(--ink-2); }

/* Ready-made conversations */
.templates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.template { padding: 14px 14px 20px; border-radius: var(--radius-s); background: var(--card); border: 1px solid var(--outline); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.template:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.template__art { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--sage); margin-bottom: 16px; }
.template__art img { width: 58%; mix-blend-mode: multiply; }
.template h3 { font-size: 1.2rem; padding-inline: 6px; }
@media (min-width: 760px) { .templates { grid-template-columns: repeat(4, 1fr); gap: 20px; } .template h3 { font-size: 1.35rem; } }

/* Privacy */
.section--night { background: var(--night); color: var(--on-night); }
.section--night .eyebrow { color: var(--mustard); }
.section--night .section__head p:not(.eyebrow) { color: var(--on-night-2); }
.points { display: grid; gap: 1px; background: rgb(255 255 255 / 12%); border: 1px solid rgb(255 255 255 / 12%); border-radius: var(--radius); overflow: hidden; }
.points li { padding: 30px; background: var(--night); }
.points h3 { font-size: 1.3rem; margin-bottom: 10px; }
.points p { color: var(--on-night-2); font-size: 1rem; }
@media (min-width: 700px) { .points { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .points { grid-template-columns: repeat(4, 1fr); } }
.privacy__foot { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.privacy__foot p { max-width: 36em; color: var(--on-night-2); font-style: italic; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--mustard); text-decoration: none; padding: 10px 0; }
.link-arrow svg { width: 20px; transition: transform 0.2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* Pricing */
.pricing { display: grid; gap: 36px; padding: clamp(32px, 6vw, 72px); border-radius: calc(var(--radius) + 8px); background: var(--mustard); color: var(--on-mustard); }
.pricing .eyebrow { color: #6b5a12; }
.pricing h2 + p { margin-top: 18px; font-size: 1.1875rem; max-width: 30em; color: #3d3409; }
.pricing ul { display: grid; gap: 14px; align-content: center; }
.pricing li { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 1.0625rem; }
.pricing li svg { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--ink); color: var(--mustard); }
@media (min-width: 860px) { .pricing { grid-template-columns: 1.3fr 1fr; align-items: center; } }

/* Story */
.section--story { padding-top: 0; text-align: center; }
.section--story h2 { margin-bottom: 28px; }
.section--story p:not(.eyebrow) { font-size: 1.1875rem; color: var(--ink-2); }
.section--story p + p { margin-top: 16px; }

/* FAQ */
.faq { display: grid; gap: 8px; }
.faq .section__head { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--outline); }
.faq details:first-child { border-top: 1px solid var(--outline); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--tan); display: grid; place-items: center; transition: transform 0.25s ease, background-color 0.25s ease; }
.faq summary svg { width: 18px; }
.faq details[open] summary i { transform: rotate(45deg); background: var(--mustard); }
.faq details p { padding: 0 56px 24px 0; color: var(--ink-2); }
@media (min-width: 900px) { .faq { grid-template-columns: 0.8fr 1.2fr; gap: 64px; } .faq .section__head { position: sticky; top: 110px; align-self: start; } }

/* Closing call to action */
.cta { position: relative; overflow: hidden; text-align: center; padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 72px); border-radius: calc(var(--radius) + 8px); background: radial-gradient(120% 140% at 50% 0%, #fbeeb6, var(--clay) 70%); }
.cta__art { width: 132px; margin: 0 auto 16px; mix-blend-mode: multiply; }
.cta p { margin: 20px auto 32px; max-width: 30em; font-size: 1.1875rem; color: var(--on-clay); }
.cta .stores { justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--outline); padding: 64px 0 28px; font-size: 0.9375rem; color: var(--ink-2); }
.footer__in { display: grid; gap: 36px; }
.footer__brand p { margin-top: 14px; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); max-width: 16em; }
.footer h2 { font-family: var(--sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-clay); margin-bottom: 10px; }
.footer p + h2 { margin-top: 24px; }
.footer a { color: var(--ink); text-underline-offset: 3px; display: inline-block; padding: 6px 0; }
.footer__base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--outline); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 0.8125rem; }
@media (min-width: 760px) { .footer__in { grid-template-columns: 1.4fr 1fr 1fr; } }

/* Privacy policy and 404 */
.prose-page { padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 120px); }
.prose h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.prose__date { margin-top: 12px; color: var(--ink-2); font-size: 0.9375rem; }
.prose .lede { margin-top: 32px; font-size: 1.1875rem; }
.prose h2 { font-size: 1.6rem; margin: 48px 0 12px; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 8px; }
.legal-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.9375rem; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--outline); min-width: 160px; }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose .eyebrow a { color: inherit; }
.callout { margin: 28px 0 0; padding: 24px 26px; border-radius: var(--radius-s); background: var(--mustard); color: var(--on-mustard); }
.notfound { text-align: center; display: grid; justify-items: center; gap: 18px; }
.notfound img { mix-blend-mode: multiply; }
.notfound p { color: var(--ink-2); font-size: 1.1875rem; }

/* Motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.steps .reveal:nth-child(2), .templates .reveal:nth-child(4n + 2) { transition-delay: 0.08s; }
.steps .reveal:nth-child(3), .templates .reveal:nth-child(4n + 3) { transition-delay: 0.16s; }
.templates .reveal:nth-child(4n) { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__row { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .store, .template { transition: none; }
}

/* Beta page */
.prose h3 { font-size: 1.25rem; margin-bottom: 10px; }
.beta-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 16px; }
.beta-card { background: var(--sage); border-radius: 20px; padding: 22px 22px 18px; }
.beta-card ol { margin: 0 0 14px 1.2em; }
.beta-card p + p { margin-top: 10px; }
.beta-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.beta-optional { font-weight: 400; color: var(--ink-2); font-size: 0.85em; }
.beta-form { display: grid; gap: 10px; margin-top: 18px; max-width: 32rem; }
.beta-form label { font-weight: 600; }
.beta-form input[type="email"], .beta-form textarea {
  font: inherit; color: var(--ink); background: var(--page); width: 100%;
  border: 1px solid var(--ink-2); border-radius: 12px; padding: 10px 12px; min-height: 44px;
}
.beta-form fieldset { border: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.beta-form fieldset legend { font-weight: 600; margin-bottom: 6px; }
.beta-form fieldset label { font-weight: 400; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.beta-form .btn { justify-self: start; border: 0; cursor: pointer; }
.beta-form .btn:disabled { opacity: 0.6; cursor: default; }
.beta-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.beta-status { min-height: 1.5em; color: var(--ink-2); }
/* Buttons inside prose pages keep button colours, not the blue link colour. */
.prose a.btn { text-decoration: none; }
.prose a.btn--ink, .prose a.btn--ink:visited { color: var(--page); }
