/* Momento landing — implements "2c Arena" from Momento Landing.dc.html */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/BricolageGrotesque_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/BricolageGrotesque_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/BricolageGrotesque_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/BricolageGrotesque_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('fonts/Karla_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('fonts/Karla_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('fonts/Karla_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #2B211B;
  --ink-soft: #5C4A3E;
  --sand: #F2E9DC;
  --paper: #FAF6F0;
  --white: #FFFFFF;
  --line: #E0D5C6;
  --terracotta: #C1603D;
  --terracotta-dark: #7E4128;
  --eye: #FBF4EA;
  --cell-off: #D6C8B6;
  --dash: #BFAF9E;
  --placeholder: #A8978A;

  --f-display: 'Bricolage Grotesque', sans-serif;
  --f-ui: 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-text: Karla, sans-serif;

  --spring: cubic-bezier(.34, 1.56, .64, 1);

  /* Momo is drawn at desktop size; mobile scales every dimension by .6 */
  --u: 1px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--f-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--terracotta); }
a:hover { color: var(--terracotta-dark); }
button { font: inherit; color: inherit; }
input::placeholder { color: var(--placeholder); }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@keyframes momoFloat { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@keyframes bubFloat { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
@keyframes momoBlink { 0%, 92%, 100% { transform: scaleY(1) } 95% { transform: scaleY(.12) } }
@keyframes momoHop {
  0% { transform: translateY(0) scale(1, 1) }
  18% { transform: translateY(0) scale(1.14, .86) }
  42% { transform: translateY(-26px) scale(.92, 1.1) }
  70% { transform: translateY(0) scale(1.1, .9) }
  86% { transform: translateY(0) scale(.98, 1.02) }
  100% { transform: translateY(0) scale(1, 1) }
}
/* Two identical tickle keyframes so consecutive pokes restart the animation */
@keyframes momoTickle {
  0% { transform: rotate(0) scale(1, 1) }
  10% { transform: rotate(-6deg) scale(1.06, .94) }
  20% { transform: rotate(5deg) scale(.96, 1.04) }
  30% { transform: rotate(-5deg) scale(1.05, .95) }
  40% { transform: rotate(4deg) scale(.98, 1.02) }
  50% { transform: rotate(-3deg) scale(1.03, .97) }
  60% { transform: rotate(3deg) scale(1, 1) }
  70% { transform: rotate(-2deg) }
  82% { transform: rotate(1deg) }
  100% { transform: rotate(0) scale(1, 1) }
}
@keyframes momoTickle2 {
  0% { transform: rotate(0) scale(1, 1) }
  10% { transform: rotate(-6deg) scale(1.06, .94) }
  20% { transform: rotate(5deg) scale(.96, 1.04) }
  30% { transform: rotate(-5deg) scale(1.05, .95) }
  40% { transform: rotate(4deg) scale(.98, 1.02) }
  50% { transform: rotate(-3deg) scale(1.03, .97) }
  60% { transform: rotate(3deg) scale(1, 1) }
  70% { transform: rotate(-2deg) }
  82% { transform: rotate(1deg) }
  100% { transform: rotate(0) scale(1, 1) }
}

/* ---------- Shared header ---------- */

.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 44px;
  position: relative; z-index: 6;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { display: flex; gap: 3px; }
.mark i { width: 9px; height: 16px; border-radius: 5px 5px 5px 0; background: var(--ink); }
.mark i + i { background: var(--terracotta); }
.word { font: 600 20px/1 var(--f-display); color: var(--ink); }
.lang { display: flex; gap: 4px; font: 600 12px var(--f-ui); }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 6px; min-width: 32px; min-height: 32px;
  font: inherit; color: var(--ink); opacity: .45;
  transition: opacity .2s;
}
.lang button[aria-pressed="true"] { opacity: 1; }

/* ---------- Landing stage ---------- */

.stage {
  position: relative;
  overflow: hidden;
  height: 100vh; height: 100svh;
  min-height: 740px;
  display: flex; flex-direction: column;
}

.hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 22px;
}
/* On desktop the hero isn't a positioning context, so .reveal can pin to the stage's corner */
.hero > * { position: relative; z-index: 4; }
.hero > .below { position: static; }

h1 {
  margin: 0;
  font: 600 64px/1 var(--f-display);
  letter-spacing: -.02em;
  text-align: center;
  text-wrap: balance;
}
h1 .accent { color: var(--terracotta); }
.sub {
  margin: 14px 0 0;
  font: 400 19px/1.5 var(--f-ui);
  color: var(--ink-soft);
  text-align: center;
  text-wrap: balance;
}

.entry { margin-top: 28px; width: 560px; max-width: 100%; }
.field {
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  border-radius: 22px 22px 22px 6px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 14px 34px rgba(43, 33, 27, .2);
  margin: 0;
}
.field input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: 500 19px var(--f-text); color: var(--ink);
}
.field:focus-within { box-shadow: 0 14px 34px rgba(43, 33, 27, .2), 0 0 0 2px rgba(193, 96, 61, .35); }
.btn-dark {
  border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper);
  font: 600 15px var(--f-ui);
  padding: 14px 22px;
  border-radius: 16px 16px 16px 4px;
}
.done {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px; min-height: 64px;
  font: 500 18px var(--f-text); color: var(--ink);
  text-align: center;
}
.done b { font-weight: 600; color: var(--terracotta); }
.link-btn {
  border: 0; background: transparent; cursor: pointer;
  min-height: 44px;
  font: 600 14px var(--f-ui); color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.skip {
  margin-top: 6px;
  position: relative; z-index: 4;
  font-weight: 500; color: var(--ink-soft);
}

/* Week card + App Store: hidden until the visitor saves or skips */
.reveal {
  position: absolute; left: 44px; bottom: 36px; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
}
.reveal > * {
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .5s, transform .5s;
}
.reveal > * + * { transition-delay: .15s; }
.is-shown .reveal > * { opacity: 1; transform: none; pointer-events: auto; }

.week {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 16px;
  border-radius: 20px 20px 20px 6px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.week-label { font: 600 12px/1 var(--f-ui); color: var(--ink-soft); }
.days { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.day.future { opacity: .45; }
.day-l { font: 600 11px/1 var(--f-ui); color: var(--ink-soft); }
.cell {
  width: 34px; height: 46px;
  border-radius: 17px 17px 17px 3px;
  border: 1.5px dashed var(--cell-off);
  display: flex; align-items: center; justify-content: center;
  font: 600 12px var(--f-ui); color: var(--ink-soft);
  transition: background .3s, border-color .3s, color .3s, transform .55s cubic-bezier(.34, 1.9, .64, 1);
}
.day.today .cell { border-style: solid; border-color: var(--terracotta); }
.phase-reveal .day.today .cell { transform: scale(.82); }
.phase-done .day.today .cell { background: var(--terracotta); color: var(--paper); }

.get { display: flex; align-items: center; gap: 18px; }
.store {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--ink); color: var(--paper);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 24px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(43, 33, 27, .18);
  transition: box-shadow .6s, transform .2s;
}
.store:hover { color: var(--paper); transform: translateY(-2px); }
.store[aria-disabled="true"] { cursor: default; opacity: .82; }
.store[aria-disabled="true"]:hover { transform: none; }
.phase-done .store { box-shadow: 0 0 0 7px rgba(193, 96, 61, .25), 0 16px 40px rgba(193, 96, 61, .35); }
.store small { font: 500 11px/1 var(--f-ui); opacity: .75; }
.store span { font: 600 20px/1.1 var(--f-ui); }
.qr { display: flex; align-items: center; gap: 10px; }
.qr-code {
  width: 52px; height: 52px; border-radius: 10px;
  border: 1.5px dashed var(--dash);
  display: flex; align-items: center; justify-content: center;
  font: 600 10px ui-monospace, Menlo, monospace; color: var(--ink-soft);
}
.qr-code img { width: 100%; height: 100%; border-radius: inherit; }
.qr span { font: 500 12px/1.35 var(--f-ui); color: var(--ink-soft); max-width: 96px; }

.foot {
  position: absolute; right: 44px; bottom: 36px; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  font: 500 13px var(--f-ui);
}
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--ink-soft); }
.foot small { font: inherit; color: var(--ink-soft); opacity: .8; }

/* ---------- Momo ---------- */

.walker {
  position: absolute; left: 50%; bottom: -150px; z-index: 1;
  margin-left: calc(var(--u) * -185);
  transition: transform .75s cubic-bezier(.34, 1.25, .64, 1);
}
.is-typing .walker { transform: translate(-330px, -44px) rotate(8deg); }

.momo-btn {
  display: block; padding: 0; border: 0; background: transparent;
  cursor: pointer; transform-origin: bottom center;
  animation: momoFloat 3.4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.momo-btn:focus-visible { outline-offset: -12px; border-radius: 50%; }
.momo-btn.hop { animation: momoHop .75s var(--spring) 1 both; }
.momo-btn.tickle-a { animation: momoTickle .8s ease-out 1 both; }
.momo-btn.tickle-b { animation: momoTickle2 .8s ease-out 1 both; }

.momo {
  width: calc(var(--u) * 370); height: calc(var(--u) * 420);
  border-radius: calc(var(--u) * 185) calc(var(--u) * 185) calc(var(--u) * 130) calc(var(--u) * 20);
  background: var(--terracotta);
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(var(--u) * 118) 0 0 calc(var(--u) * 60);
  transform-origin: bottom center;
}
.eyes {
  display: flex; align-items: center;
  gap: calc(var(--u) * 35); height: calc(var(--u) * 110);
  transition: transform .2s ease-out;
}
.eyes-in { position: relative; display: flex; gap: inherit; align-items: center; }
.calm {
  display: flex; gap: inherit; align-items: center;
  transition: opacity .4s ease, transform .5s var(--spring);
}
.is-poked .calm { transform: scaleY(.25); }
.is-happy .calm { opacity: 0; transform: scaleY(.2); }
.blink { display: flex; gap: inherit; align-items: center; animation: momoBlink 4.2s infinite; }
.eye {
  width: calc(var(--u) * 60); height: calc(var(--u) * 110);
  border-radius: calc(var(--u) * 30) calc(var(--u) * 30) calc(var(--u) * 30) 0;
  background: var(--eye);
  transform-origin: center bottom;
  transition: transform .45s var(--spring);
}
/* Curious eyes while the visitor types */
.is-typing .eye:first-child { transform: scale(1.16); }
.is-typing .eye:last-child { transform: scale(1, .8); }
.happy {
  position: absolute; inset: 0;
  display: flex; gap: inherit; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(5px);
  transition: opacity .4s ease, transform .5s var(--spring);
}
.is-happy .happy { opacity: 1; transform: none; }
.arc {
  width: calc(var(--u) * 75); height: calc(var(--u) * 55);
  border: calc(var(--u) * 20) solid var(--eye); border-bottom: 0;
  border-radius: calc(var(--u) * 38) calc(var(--u) * 38) 0 0;
  margin-top: calc(var(--u) * -30);
  flex: none;
}

/* Thought bubbles: one at a time, alternating sides */
.thought {
  position: absolute; z-index: 5; pointer-events: none;
  opacity: 0; transform: scale(.6) translateY(12px);
  transition: opacity .45s ease, transform .6s var(--spring);
}
.thought.on { opacity: 1; transform: none; }
.is-typing .thought.on { opacity: 0; transform: scale(.6) translateY(12px); }
.thought.l { transform-origin: bottom right; }
.thought.r { transform-origin: bottom left; }
.thought[data-i="0"] { right: calc(100% - 20px); top: -40px; }
.thought[data-i="1"] { left: calc(100% - 20px); top: 0; }
.thought[data-i="2"] { right: calc(100% - 50px); top: -138px; }
.thought[data-i="3"] { left: calc(100% - 50px); top: -124px; }
.bubble {
  position: relative;
  animation: bubFloat 4.6s ease-in-out infinite;
  background: var(--white);
  padding: 18px 26px;
  font: 500 26px/1.25 var(--f-text); color: var(--ink);
  width: max-content; max-width: 340px;
  box-shadow: 0 10px 28px rgba(43, 33, 27, .12);
}
.l .bubble { border-radius: 24px 24px 6px 24px; }
.r .bubble { border-radius: 24px 24px 24px 6px; }
.bubble::before, .bubble::after {
  content: ""; position: absolute; border-radius: 999px; background: var(--white);
}
.bubble::before { width: 12px; height: 12px; bottom: -12px; box-shadow: 0 4px 10px rgba(43, 33, 27, .1); }
.bubble::after { width: 7px; height: 7px; bottom: -26px; }
.l .bubble::before { right: -14px; }
.l .bubble::after { right: -26px; }
.r .bubble::before { left: -14px; }
.r .bubble::after { left: -26px; }

/* The phrase flying into today's cell */
.fly {
  position: absolute; z-index: 20; pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  border-radius: 18px 18px 18px 4px;
  padding: 8px 16px 8px 8px;
  box-shadow: 0 14px 30px rgba(43, 33, 27, .3);
}
.fly.go {
  transform: translate(-50%, -50%) scale(.2);
  opacity: 0;
  transition: left 1s cubic-bezier(.45, 0, .25, 1), top 1s cubic-bezier(.5, -.9, .4, 1), transform 1s ease-in, opacity .35s ease-in .7s;
}
.mini {
  width: 26px; height: 30px; flex: none;
  border-radius: 13px 13px 9px 2px;
  background: var(--terracotta);
  display: flex; align-items: center; justify-content: center; gap: 3px;
  padding: 3px 0 0 4px;
}
.mini i { width: 4px; height: 8px; border-radius: 2px 2px 2px 0; background: var(--eye); }
.fly span {
  font: 500 16px var(--f-text); color: var(--ink);
  max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Mobile (the 390px frame) ---------- */

@media (max-width: 1023px) {
  :root { --u: .6px; }
  .stage { min-height: 720px; }
  .top { padding: 22px 22px 0; }
  .mark { gap: 2.5px; }
  .mark i { width: 8px; height: 14px; }
  .word { font-size: 18px; }

  .hero { padding: 22px 22px 0; }
  .hero > .below { position: relative; }
  h1 { font-size: 40px; }
  .sub { margin-top: 10px; font-size: 15px; }
  .entry { margin-top: 20px; width: 100%; max-width: 480px; }
  .field { gap: 8px; padding: 6px 6px 6px 16px; }
  .field input { font-size: 16px; }
  .field .btn-dark { font-size: 14px; height: 46px; padding: 0 16px; }
  .done { gap: 4px 6px; min-height: 58px; font-size: 17px; }

  .below {
    align-self: stretch;
    display: flex; flex-direction: column; align-items: center;
    margin-top: 14px;
  }
  .skip { position: absolute; top: 0; margin: 0; }
  .reveal { position: static; align-items: center; gap: 12px; }
  .days { gap: 6px; }
  .cell { width: 30px; height: 40px; border-radius: 15px 15px 15px 3px; }
  .qr { display: none; }

  .foot {
    left: 0; right: 0; bottom: 0;
    align-items: center;
    padding: 0 22px 18px;
  }
  .foot nav { gap: 18px; }
  .foot a { color: var(--eye); }
  .foot a:hover { color: var(--white); }
  .foot small { display: none; }

  .walker { bottom: -66px; }
  .is-typing .walker { transform: translate(-96px, -24px) rotate(8deg); }
  .momo { padding: 70px 0 0 36px; }

  .thought[data-i] { top: -40px; }
  .thought.l { left: -68px; right: auto; }
  .thought.r { right: -68px; left: auto; }
  .bubble { padding: 13px 17px; font-size: 19px; max-width: 190px; }
  .fly span { font-size: 15px; max-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .momo-btn, .momo-btn.hop, .momo-btn.tickle-a, .momo-btn.tickle-b,
  .bubble, .blink { animation: none; }
  .walker, .thought, .reveal > * { transition-duration: .01s; }
}

/* ---------- Secondary pages (privacy, support, FAQ) ---------- */

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page main {
  flex: 1;
  width: 100%; max-width: 720px;
  margin: 0 auto;
  padding: 24px 22px 64px;
}
.page h1 { text-align: left; font-size: 48px; }
.page .lead { margin: 14px 0 32px; font: 400 18px/1.6 var(--f-ui); color: var(--ink-soft); }
.page h2 { margin: 36px 0 8px; font: 600 22px/1.2 var(--f-display); }
.page p, .page li { font: 400 16px/1.7 var(--f-ui); color: var(--ink-soft); }
.page .policy-meta {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--terracotta-dark);
}
.policy-list { margin: 10px 0 0; padding-left: 22px; }
.policy-list li + li { margin-top: 8px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px 20px 20px 6px;
  padding: 20px 24px;
  margin: 12px 0;
}
.card h2 { margin-top: 0; font-size: 19px; }
.card p { margin: 0; }
.todo {
  display: inline-block;
  font: 600 11px ui-monospace, Menlo, monospace;
  background: rgba(193, 96, 61, .12); color: var(--terracotta-dark);
  padding: 3px 7px; border-radius: 5px;
}
.page-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 22px 44px;
  font: 500 13px var(--f-ui); color: var(--ink-soft);
}
.page-foot nav { display: flex; gap: 20px; }
.page-foot a { color: var(--ink-soft); }
@media (max-width: 1023px) {
  .page h1 { font-size: 36px; }
  .page-foot { padding: 18px 22px; }
}
