:root {
  --paper: #fbf3e8; --sheet: #fffaf2; --card: #f1e2cf; --ink: #1f2a44; --text: #2b211b; --muted: #6b6457;
  --rule: #ddcdb6; --clay: #b5532f; --gold: #b07a3b; --night: #161c2d; --night-ink: #e9e2d6; --pen: #1f3a6b; --ok: #3a7d44;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --hand: "Segoe Print", "Bradley Hand", "Comic Neue", cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --kawung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='%23b07a3b'%3E%3Cellipse cx='13' cy='13' rx='4.5' ry='8.5' transform='rotate(-45 13 13)'/%3E%3Cellipse cx='27' cy='13' rx='4.5' ry='8.5' transform='rotate(45 27 13)'/%3E%3Cellipse cx='13' cy='27' rx='4.5' ry='8.5' transform='rotate(45 13 27)'/%3E%3Cellipse cx='27' cy='27' rx='4.5' ry='8.5' transform='rotate(-45 27 27)'/%3E%3Ccircle cx='20' cy='20' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.55 var(--sans); }
::selection { background: #e8b9a3; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); letter-spacing: -.01em; }
h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin: 0 0 10px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 40px; }

/* Links: underline draws in from the left. */
.ul { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); padding-bottom: 2px; }
.ul:hover, .ul:focus-visible { background-size: 100% 1.5px; }
p .ul { background-size: 100% 1px; color: var(--clay); }
p .ul:hover { background-size: 100% 2px; }

/* Buttons: ink sweeps across, arrow steps forward, press sinks. */
.btn { position: relative; display: inline-flex; gap: 10px; align-items: center; padding: 13px 20px; font: 600 15px var(--sans); text-decoration: none; color: #fff; background: var(--clay); border: 1.5px solid var(--clay); overflow: hidden; isolation: isolate; transition: color .3s, transform .15s; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); z-index: -1; }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: none; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { color: var(--paper); }
.btn.soon { background: #e3d3bf; border-color: #e3d3bf; color: var(--text); cursor: default; }
.btn.soon::before { background: var(--kawung) 0 0 / 22px; opacity: .35; transform: none; animation: drift 14s linear infinite; }
.btn.line { background: none; color: var(--night-ink); border-color: var(--night-ink); }
.btn.line::before { background: var(--night-ink); }
.btn.line:hover { color: var(--night); }
@keyframes drift { to { background-position: 44px 22px; } }

/* Kori gate: two carved leaves swing open on arrival. */
.gate { position: fixed; inset: 0; z-index: 50; display: flex; perspective: 1600px; pointer-events: none; animation: gate-out .4s 2.3s forwards; }
.leaf { flex: 1; background: #5a2f1c; display: grid; grid-template-rows: 1fr 1.4fr; gap: 22px; padding: 70px 40px 40px; border: 14px solid #3f2014; animation: 1.8s .6s cubic-bezier(.55, 0, .25, 1) forwards; }
.leaf.l { transform-origin: left; animation-name: swing-l; }
.leaf.r { transform-origin: right; animation-name: swing-r; }
.panel { border: 3px solid #b07a3b; background: var(--kawung) center / 46px, #4a2616; box-shadow: inset 0 0 0 8px #4a2616, inset 0 0 0 10px #8a5a2c; }
@keyframes swing-l { to { transform: rotateY(-105deg); } }
@keyframes swing-r { to { transform: rotateY(105deg); } }
@keyframes gate-out { to { visibility: hidden; opacity: 0; } }
.seen .gate { display: none; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; border-bottom: 1.5px solid var(--ink); }
.brand { display: flex; gap: 10px; align-items: center; font: 600 22px var(--serif); color: var(--ink); text-decoration: none; }
.brand img { transition: transform .8s var(--ease); }
.brand:hover img { transform: rotate(90deg); }
.top nav { display: flex; gap: 28px; font-size: 15px; }
.top nav a { color: var(--ink); }

/* Hero: words left, receipt right. */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; min-height: 620px; padding: 40px 0 72px; }
h1 { font-size: clamp(46px, 6vw, 72px); line-height: 1; margin: 0 0 22px; }
h1 em { color: var(--clay); }
.lede { font: 19px/1.5 var(--serif); color: var(--muted); max-width: 30ch; margin-bottom: 30px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.note { margin-top: 22px; font: italic 15px var(--serif); color: var(--muted); }

.stage { position: relative; margin: 0; height: 580px; display: flex; justify-content: center; }
.slot { position: absolute; top: 0; width: 300px; height: 20px; background: var(--ink); border-radius: 3px; z-index: 2; }
.roll { margin-top: 10px; width: 262px; animation: print 3s steps(22) .9s both; }
.receipt { position: relative; background: var(--sheet); font: 13px/1.7 var(--mono); color: var(--text); padding: 24px 22px 30px; filter: drop-shadow(0 18px 22px #1f2a4426);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, radial-gradient(circle at 6px 0, transparent 6px, #000 6.5px) bottom / 12px 8px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, radial-gradient(circle at 6px 0, transparent 6px, #000 6.5px) bottom / 12px 8px repeat-x; }
.receipt p { margin: 0; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #9a9080; margin: 10px 0; }
.row { display: flex; justify-content: space-between; }
.tot { font-weight: 700; font-size: 15px; animation: mark .4s 5.3s both; }
.scan { position: absolute; left: -12px; right: -12px; top: 0; height: 3px; background: var(--clay); box-shadow: 0 0 18px 4px #b5532f66; opacity: 0; animation: scan 1.3s ease-in-out 4s both; }
.entry { position: absolute; right: 0; bottom: 40px; width: 270px; background: #fff; border: 1.5px solid var(--ink); padding: 16px 18px; font-size: 14px; box-shadow: 6px 6px 0 var(--gold); animation: land .7s var(--ease) 5.7s both; }
.entry small { color: var(--muted); }
.entry b { display: block; font: 400 30px var(--serif); color: var(--ink); margin: 2px 0; }
.entry i { font-style: normal; font-weight: 600; color: var(--ok); margin-left: 6px; }
.replay { position: absolute; right: 0; bottom: 0; padding: 0; border: 0; background: none; font: 14px var(--sans); color: var(--muted); cursor: pointer; }
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-36px); } to { clip-path: inset(0 0 -40px 0); transform: none; } }
@keyframes scan { 0% { opacity: 0; top: 12px; } 6%, 92% { opacity: 1; } 100% { opacity: 0; top: 360px; } }
@keyframes mark { to { background: #b5532f22; color: var(--clay); } }
@keyframes land { from { opacity: 0; transform: translateY(26px) rotate(-2deg); } to { opacity: 1; transform: none; } }

/* Month calendar */
.month { padding: 24px 0 96px; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 30px; }
.head p { font: 18px var(--serif); color: var(--muted); max-width: 34ch; margin: 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
/* Scroll reveals: home.js adds .js to <html> and .in to each section as it enters view. Without JS everything shows. */
.js .reveal:not(.in) .d, .js .reveal:not(.in) .ln, .js .reveal:not(.in) .track i { opacity: 0; animation: none; }
.dow { font: 600 13px var(--sans); color: var(--muted); padding: 0 10px 4px; }
.d { position: relative; height: 92px; background: var(--card); padding: 8px 10px; font-size: 14px; color: var(--muted); animation: pop .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); transition: transform .2s; }
.d:hover { transform: translateY(-3px); }
.d i { position: absolute; right: 10px; bottom: 8px; font: 15px var(--serif); font-style: normal; color: var(--text); }
.h1 { background: #e8c4a8; } .h2 { background: #d99a76; } .h3 { background: var(--clay); color: #fbe9dc; } .h3 i { color: #fff; }
.hit { outline: 2px solid var(--clay); outline-offset: -2px; }
.today { outline: 3px solid var(--ink); outline-offset: -3px; }
.f { background: none; border: 1px dashed var(--rule); }
.cap { margin-top: 14px; font: italic 14px var(--serif); color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* Phone with real screens */
.phone-sec { padding: 0 0 96px; }
.phone-sec .wrap { display: grid; grid-template-columns: 340px 1fr; gap: 80px; align-items: center; }
.phone { position: relative; aspect-ratio: 540 / 1130; border: 10px solid var(--ink); border-radius: 38px; overflow: hidden; background: var(--paper); box-shadow: 0 30px 60px -30px #1f2a4488; }
.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: screen 12s infinite; opacity: 0; }
.phone img:nth-child(2) { animation-delay: 4s; } .phone img:nth-child(3) { animation-delay: 8s; }
.phone:hover img, .phone:hover + .beats li { animation-play-state: paused; }
@keyframes screen { 0% { opacity: 0; transform: translateY(18px); } 5%, 30% { opacity: 1; transform: none; } 36%, 100% { opacity: 0; transform: translateY(-12px); } }
.beats { list-style: none; padding: 0; margin: 0; counter-reset: b; }
.beats li { counter-increment: b; position: relative; padding: 22px 0 22px 64px; border-top: 1px solid var(--rule); font: 17px var(--serif); color: var(--muted); animation: beat 12s infinite; }
.beats li:nth-child(2) { animation-delay: 4s; } .beats li:nth-child(3) { animation-delay: 8s; }
.beats li::before { content: counter(b); position: absolute; left: 0; top: 14px; font: 40px var(--serif); color: var(--gold); }
.beats b { display: block; font: 600 19px var(--sans); color: var(--ink); margin-bottom: 4px; }
@keyframes beat { 0%, 33% { color: var(--text); box-shadow: inset 3px 0 0 var(--clay); } 34%, 100% { color: var(--muted); box-shadow: none; } }

/* Notebook spread */
.book { background: #ecdfcb; padding: 96px 0; }
.spread { display: grid; grid-template-columns: 1fr 1fr; background: var(--sheet); box-shadow: 0 30px 70px -30px #3c281466; position: relative; padding: 0; }
.spread::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #d3c3aa; }
.pg { padding: 56px; }
.pg p { font: 18px/1.6 var(--serif); color: var(--muted); max-width: 36ch; }
.ruled { position: relative; background: repeating-linear-gradient(transparent 0 39px, #bfd3e6 39px 40px); padding-top: 64px; }
.ruled::before { content: ""; position: absolute; left: 112px; top: 0; bottom: 0; width: 2px; background: #e59a8c; }
.pg .ln { display: grid; grid-template-columns: 70px 1fr auto; max-width: none; font: 21px/40px var(--hand); color: var(--pen); margin: 0; animation: write .7s steps(14) both; animation-delay: calc(var(--i, 0) * 260ms + 200ms); }
.ln .dt { font-size: 16px; color: var(--clay); }
.ln i { font-style: normal; color: var(--ok); margin-left: 12px; display: inline-block; }
.ln.draft { color: #9aa7b8; }
.ln.sum span:last-child { text-decoration: underline double; }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Gapura: the split gate opens onto the dark band. */
.gapura { position: relative; height: 150px; display: flex; justify-content: center; align-items: flex-end; margin-top: 96px; background: linear-gradient(var(--night), var(--night)) bottom / 100% 26px no-repeat; }
.half { width: 210px; height: 100%; background: var(--night); transition: transform 1.2s var(--ease); clip-path: polygon(0 100%, 0 82%, 8% 82%, 8% 64%, 22% 64%, 22% 48%, 36% 48%, 36% 33%, 50% 33%, 50% 19%, 64% 19%, 64% 7%, 76% 7%, 76% 0, 100% 0, 100% 100%); }
.half.l { transform: translateX(-22px); }
.half.r { transform: translateX(22px) scaleX(-1); }
.js .gapura:not(.in) .half.l { transform: none; }
.js .gapura:not(.in) .half.r { transform: scaleX(-1); }

/* Dark export band */
.dark { position: relative; background: var(--night); color: var(--night-ink); padding: 48px 0 96px; }
.dark::after { content: ""; position: absolute; inset: 0; background: var(--kawung) 0 0 / 56px; opacity: .06; pointer-events: none; }
.dark .wrap { position: relative; z-index: 1; }
.grid2 { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
.dark h2 { color: var(--night-ink); margin-bottom: 32px; }
pre { font: 14px/1.9 var(--mono); color: #c9c1b3; margin: 0; overflow-x: auto; }
pre b { background: var(--clay); color: #fff; font-weight: 500; padding: 1px 4px; }
.dark p { font: 18px/1.55 var(--serif); color: #c9c1b3; margin: 0 0 28px; }

/* Budgets */
.plan { padding: 96px 0; }
.sub { font: 18px var(--serif); color: var(--muted); margin-bottom: 36px; }
.pace { display: grid; grid-template-columns: 160px 1fr 130px; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.track { height: 10px; background: #e8dcc9; position: relative; }
.track i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ink); animation: grow 1.2s var(--ease) .2s both; }
.track i.over { background: var(--clay); }
.pace .n { text-align: right; font: 14px var(--mono); }
@keyframes grow { from { width: 0; } }

/* FAQ: question list beside the heading, answers fold open. */
.faq { padding: 0 0 96px; }
.faq .wrap { display: grid; grid-template-columns: 4fr 8fr; gap: 56px; align-items: start; }
.qs { border-top: 1.5px solid var(--ink); }
details { border-bottom: 1px solid var(--rule); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; font: 19px var(--serif); color: var(--ink); cursor: pointer; list-style: none; transition: color .2s; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 24px/1 var(--sans); color: var(--clay); transition: transform .35s var(--ease); }
summary:hover { color: var(--clay); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0; padding: 0 40px 20px 0; font: 17px/1.6 var(--serif); color: var(--muted); max-width: 60ch; }
details[open] p { animation: open .4s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

.contact { padding: 0 0 96px; }
.contact p { font: 18px var(--serif); color: var(--muted); margin: 0; }
.foot { font-size: 14px; color: var(--muted); }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 24px 0 28px; border-top: 1.5px solid var(--ink); }
.foot::after { content: ""; display: block; height: 28px; background: var(--kawung) 0 0 / 28px; opacity: .5; animation: drift 30s linear infinite; }

@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .dow { padding: 0 6px 4px; }
  .doc { padding: 40px 0 72px; }
  .faq .wrap { grid-template-columns: 1fr; gap: 8px; }
  .stage { height: 560px; }
  .top nav { gap: 16px; }
  .hero, .grid2, .spread, .phone-sec .wrap { grid-template-columns: 1fr; }
  .hero { min-height: 0; gap: 24px; }
  .entry { right: auto; left: 50%; margin-left: -135px; }
  .replay { right: auto; left: 50%; transform: translateX(-50%); bottom: -4px; }
  .head { display: block; } .head p { margin-top: 8px; }
  .d { height: 64px; padding: 5px 6px; font-size: 12px; } .d i { font-size: 11px; right: 5px; bottom: 4px; }
  .phone { width: 260px; margin: 0 auto; }
  .spread::before { display: none; }
  .pg { padding: 36px 20px; } .ruled::before { left: 70px; } .pg .ln { grid-template-columns: 52px 1fr auto; font-size: 16px; } .ln .dt { font-size: 13px; } .ln i { margin-left: 6px; }
  .pace { grid-template-columns: 90px 1fr 100px; gap: 12px; }
  .leaf { padding: 40px 14px 20px; border-width: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .gate { display: none; }
  .phone img { animation: none; opacity: 0; } .phone img:first-child { opacity: 1; }
  .beats li { animation: none; }
}

/* Text pages (privacy, terms, delete account, 404). */
.doc { max-width: 720px; padding: 64px 0 96px; }
.doc h1 { font-size: clamp(38px, 5vw, 52px); margin-bottom: 12px; }
.doc h2 { font-size: 24px; margin: 40px 0 8px; }
.doc p, .doc li { font: 18px/1.65 var(--serif); color: var(--text); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 8px; }
.doc li strong { color: var(--ink); }
.doc .muted { color: var(--muted); }
.doc a:not(.btn) { color: var(--clay); text-underline-offset: 3px; }
.top nav a[aria-current] { background-size: 100% 1.5px; }
#signin { margin: 28px 0 8px; min-height: 44px; }
#status { font: 600 16px var(--sans); }
.error { color: #b3261e; }
