@font-face { font-family: "Fell"; src: url("fonts/IMFeENrm28P.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fell"; font-style: italic; src: url("fonts/IMFeENit28P.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Theirs"; src: url("fonts/ReenieBeanie.ttf") format("truetype"); font-display: swap; }

/* The desk the journal lies on (sampled from the cover photo), the paper, and the two inks. */
:root {
  --desk: #1e0909;
  --desk-deep: #120505;
  --leather: #6b3219;
  --paper: #f1e7d0;
  --paper-edge: #dccaa6;
  --ink: #2e2219;            /* Ansel's dry ink */
  --ink-soft: #5b4a3c;
  --theirs: #1a1f33;         /* the player's pen */
  --glow: #f2b25c;           /* the light between the pages */
  --ribbon: #a8322c;
  --text: #ecdfcb;
  --muted: #b9a58e;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--text);
  font: 18px/1.65 Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--glow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffd59a; }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: "Fell", Georgia, serif; font-weight: 400; line-height: 1.12; color: #f6ecdb; }
h2 { font-size: clamp(32px, 4.6vw, 50px); margin: 0 0 18px; }
h3 { font-size: 24px; margin: 0 0 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
section { padding: 96px 0; position: relative; }
.lead { font-size: 21px; max-width: 700px; }
.eyebrow { font-family: "Fell", serif; font-style: italic; color: var(--glow); font-size: 19px; letter-spacing: .3px; margin: 0 0 10px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Top bar ---------- */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.bar .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; max-width: none; padding-left: 28px; padding-right: 28px; }
.bar .name { display: inline-flex; align-items: center; gap: 12px; font-family: "Fell", serif; font-size: 22px; color: #f6ecdb; text-decoration: none; letter-spacing: .4px; }
.bar .name img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.bar nav a { color: var(--muted); text-decoration: none; margin-left: 24px; font-size: 16px; }
.bar nav a:hover { color: #fff; }

/* ---------- The opening: the journal on the desk ---------- */
.opening { padding: 0; height: 330vh; height: 330svh; background: var(--desk); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, #230a0a 0%, var(--desk) 55%, var(--desk-deep) 100%); }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 60%, rgba(0,0,0,.45) 100%); }

.intro { position: absolute; z-index: 5; left: max(28px, calc(50vw - 560px)); top: 50%; transform: translateY(-46%);
  width: min(500px, 44vw); }
.intro h1 { font-size: clamp(40px, 5vw, 70px); margin: 0; text-shadow: 0 2px 30px rgba(0,0,0,.6); }
.intro .reply { font-family: "Fell", serif; font-style: italic; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.1;
  color: var(--glow); margin: 6px 0 22px; text-shadow: 0 0 30px rgba(242,178,92,.25);
  clip-path: inset(-10% 100% -20% 0); animation: write 2.4s cubic-bezier(.45,0,.25,1) .5s forwards; }
@keyframes write { to { clip-path: inset(-10% -2% -20% 0); } }
.intro .pitch { font-size: 19px; color: #e5d8c3; max-width: 440px; margin: 0 0 26px; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 9px 18px 9px 10px; border-radius: 14px;
  border: 1px solid rgba(242,178,92,.35); background: rgba(18,5,5,.55); color: var(--muted); font-size: 14px; line-height: 1.25; }
.store img { width: 34px; height: 34px; border-radius: 8px; }
.store b { color: #f6ecdb; font-weight: 400; font-family: "Fell", serif; font-size: 18px; }
.open-link { font-family: "Fell", serif; font-style: italic; font-size: 19px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid rgba(242,178,92,.5); padding-bottom: 2px; }
.open-link::after { content: " \2193"; color: var(--glow); }

.book { position: absolute; left: 0; top: 0; width: 600px; aspect-ratio: 1536 / 2048; transform-origin: 0 0; z-index: 2;
  will-change: transform; }
/* the photo's own dark margin feathers away into the desk */
.book .desk { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 13%, #000 87%, transparent 98%), linear-gradient(180deg, transparent 2%, #000 11%, #000 94%, transparent 99%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 2%, #000 13%, #000 87%, transparent 98%), linear-gradient(180deg, transparent 2%, #000 11%, #000 94%, transparent 99%);
  mask-composite: intersect; }
.book .page, .book .board { position: absolute; left: 19.01%; top: 14.355%; width: 61.979%; height: 66.064%; }
.book .page { opacity: 0; }
.book .page > img:first-child { width: 100%; height: 100%; }
.book .gutter { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.22), transparent 12%); }
.book .shade { position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.35)); }
.book .ink { position: absolute; margin: 0; }
.book .ink-1 { left: 12%; top: 13%; width: 62%; height: auto; clip-path: inset(-20% 100% -20% 0); }
.book .ink-2, .book .ink-3 { font-family: "Theirs", cursive; color: var(--theirs); font-size: 1.45em; line-height: 1.1;
  white-space: nowrap; clip-path: inset(-30% 100% -30% 0); }
.book .ink-2 { left: 16%; top: 36%; transform: rotate(-1.2deg); }
.book .ink-3 { left: 18%; top: 45%; transform: rotate(-.6deg); }
.book .board { transform-origin: 0 50%; transform-style: preserve-3d; }
.book .face { position: absolute; inset: 0; }
.book .face img { width: 100%; height: 100%; }
.book .face i { position: absolute; inset: 0; background: #000; opacity: 0;
  -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat; }
.book .front i { --m: url("img/book/board.webp"); }
.book .back { transform: scaleX(-1); display: none; filter: drop-shadow(-14px 18px 22px rgba(0,0,0,.55)); }
.book .back i { --m: url("img/book/inside.webp"); }

.scroll-hint { position: absolute; z-index: 5; left: 0; right: 0; bottom: 26px; margin: 0; text-align: center; font-family: "Fell", serif;
  font-style: italic; color: rgba(242,178,92,.6); font-size: 17px; animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* Without script (or with reduced motion): the closed book beside the words, no scroll stage. */
html:not(.js) .opening, .still .opening { height: auto; }
html:not(.js) .stage, .still .stage { position: relative; height: auto; min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 30px; padding: 110px max(28px, calc(50vw - 560px)) 60px; }
html:not(.js) .intro, .still .intro { position: static; transform: none; width: auto; }
html:not(.js) .book, .still .book { position: relative; width: 100%; max-width: 520px; justify-self: center; }
html:not(.js) .scroll-hint, .still .scroll-hint { display: none; }

/* ---------- Paper sheets (the app's own old paper) ---------- */
/* The paper and its shadow sit on a layer behind the sheet, so the sheet itself carries no filter but the dust. */
.sheet { position: relative; isolation: isolate; color: var(--ink); padding: 58px 56px 54px; }
.sheet::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("img/paper/paper-tall.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 24px 40px rgba(0,0,0,.5)); }
.sheet.wide::before { background-image: url("img/paper/paper-wide.webp"); }
.sheet.note { padding: 36px 34px 34px; }
.sheet.note::before { background-image: url("img/paper/paper-note.webp"); }
.sheet h2, .sheet h3 { color: #2a1f17; }
.sheet .lead { color: var(--ink); }
.sheet p { color: #3b2e24; }
.sheet .aside { font-style: italic; color: var(--ink-soft); }
.js .sheet[data-dust]:not(.gathered) { visibility: hidden; }

/* ---------- Story ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 64px; align-items: center; }
.split.rev { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.story { padding-top: 120px; background: linear-gradient(var(--desk-deep), var(--desk) 30%); }
.story .sheet h2 { font-size: clamp(34px, 4vw, 48px); }

/* An iPad: dark bezel around a real screenshot */
.ipad { margin: 0; justify-self: center; width: 100%; max-width: 440px; }
.ipad img { border-radius: 26px; border: 12px solid #0d0b0b; box-shadow: 0 0 0 1px #3a2a25, 0 34px 70px rgba(0,0,0,.65); background: #0d0b0b; }
.ipad figcaption { font-size: 15px; color: var(--muted); text-align: center; margin-top: 16px; font-style: italic; }
.ipad figcaption b { font-style: normal; font-family: "Fell", serif; font-weight: 400; color: #f1e3cc; font-size: 18px; }
.tilt-r img { transform: rotate(1.6deg); }
.tilt-l img { transform: rotate(-1.6deg); }

/* ---------- The world ---------- */
.world { padding: 0; }
.world .plate { position: relative; }
.world .plate > img { width: 100%; height: min(78vh, 720px); object-fit: cover; object-position: center 40%; }
.world .plate::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(var(--desk) 0%, transparent 22%, transparent 55%, var(--desk) 100%); }
.world .wrap { position: absolute; left: 0; right: 0; bottom: 8%; z-index: 2; }
.world .ink-line { width: min(620px, 80vw); filter: invert(1) sepia(.35) brightness(1.05) drop-shadow(0 2px 14px rgba(0,0,0,.8)); opacity: .92; }

/* ---------- How ---------- */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; counter-reset: s; }
.steps .sheet h3 { font-size: 30px; }
.steps .sheet h3::before { counter-increment: s; content: counter(s) ". "; color: var(--ribbon); }
.steps .sheet p { margin: 0; font-size: 17px; }
.steps li:nth-child(1) { transform: rotate(-1deg); }
.steps li:nth-child(2) { transform: rotate(.7deg) translateY(14px); }
.steps li:nth-child(3) { transform: rotate(-.4deg); }
.find { margin: 64px auto 0; max-width: 640px; }
.find img { width: 100%; filter: invert(1) sepia(.35) brightness(1.05); opacity: .85; }

/* ---------- Inside ---------- */
.inside { background: linear-gradient(var(--desk), #170707 50%, var(--desk)); }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; margin-top: 44px; }
.shots .ipad { max-width: none; }
.shots .ipad:nth-child(2) { transform: translateY(28px); }

/* ---------- Earlier pages ---------- */
.earlier .ipad { max-width: 460px; }

/* ---------- Dust ---------- */
.demo-slot { min-height: 430px; display: grid; place-items: center; }
.demo { width: 100%; max-width: 540px; padding: 34px 46px 46px; }
.demo header { display: flex; justify-content: space-between; align-items: baseline; font-family: "Fell", serif; font-size: 26px; color: #2a1f17;
  border-bottom: 1px solid rgba(46,34,25,.25); padding-bottom: 8px; }
.demo header .x { font-size: 28px; color: var(--ink-soft); }
.demo .night { text-align: center; font-family: "Fell", serif; font-style: italic; color: var(--ink-soft); font-size: 17px; margin: 10px 0 18px; }
.demo img { width: 92%; }
.demo .theirs { font-family: "Theirs", cursive; color: var(--theirs); font-size: 34px; line-height: 1.1; margin: 22px 0 0 44px;
  border-left: 1.5px solid rgba(69,69,74,.25); padding-left: 16px; }
.paper-btn { margin-top: 18px; font: italic 19px "Fell", Georgia, serif; color: #2a1f17; cursor: pointer;
  background: url("img/paper/paper-note.webp") center / 100% 100% no-repeat; border: 0; padding: 14px 28px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.paper-btn:hover { color: #000; }
.paper-btn:focus-visible { outline: 2px solid var(--glow); outline-offset: 4px; }

/* ---------- Features ---------- */
.features .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 40px; margin-top: 34px; }
.features .grid > div { border-top: 1px solid rgba(242,178,92,.22); padding-top: 18px; }
.features p { margin: 0; color: var(--muted); font-size: 17px; }

/* ---------- Facts ---------- */
.frame { border-radius: 4px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.6); background: #fff; padding: 10px; transform: rotate(-1.2deg); }
.facts { list-style: none; padding: 0; margin: 24px 0 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { border: 1px solid rgba(242,178,92,.3); border-radius: 999px; padding: 7px 16px; font-size: 16px; color: #e5d8c3; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid rgba(242,178,92,.16); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: "Fell", serif; font-size: 23px; color: #f6ecdb; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--glow); display: inline-block; width: 26px; font-family: Georgia, serif; }
.faq details[open] summary::before { content: "\2013"; }
.faq details p { margin: 10px 0 0 26px; color: var(--muted); font-size: 17px; }

/* ---------- Legal pages ---------- */
.doc { max-width: 800px; margin: 0 auto; padding: 120px 24px 40px; }
.doc .card { color: #2a241d; padding: 60px 64px; border-radius: 3px;
  background: radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.35), transparent 50%),
              radial-gradient(ellipse at 85% 70%, rgba(133,94,51,.10), transparent 55%), #f1e7d0;
  box-shadow: inset 0 0 90px rgba(120,86,46,.22), 0 30px 60px rgba(0,0,0,.5); }
.doc .card h1 { color: #1b1712; font-size: 46px; margin: 0 0 6px; }
.doc .card h2 { color: #1b1712; font-size: 28px; margin: 34px 0 8px; }
.doc .card a { color: #7a3412; }
.doc .card li { margin-bottom: 6px; }
.doc .card .meta { color: #6b5d4b; margin-top: 0; }

footer { border-top: 1px solid rgba(242,178,92,.12); padding: 34px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
footer a { color: #e5d8c3; text-decoration: none; margin-right: 18px; }
footer a:hover { color: #fff; }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  body { font-size: 17px; }
  section { padding: 66px 0; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 40px; }
  .bar .wrap { padding-left: 18px; padding-right: 18px; }
  .bar .name { font-size: 19px; }
  .bar nav a { margin-left: 16px; font-size: 15px; }
  .bar nav .hide-sm { display: none; }
  .intro { left: 22px; right: 22px; width: auto; top: 84px; transform: none; }
  .intro .pitch { font-size: 17px; margin-bottom: 18px; }
  .intro .eyebrow { font-size: 16px; }
  .scroll-hint { display: none; }
  .sheet { padding: 44px 32px 40px; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps li:nth-child(2) { transform: rotate(.7deg); }
  .shots { grid-template-columns: 1fr; gap: 40px; }
  .shots .ipad { max-width: 400px; }
  .shots .ipad:nth-child(2) { transform: none; }
  .features .grid { grid-template-columns: 1fr; }
  .demo { padding: 30px 30px 40px; }
  .demo-slot { min-height: 0; }
  html:not(.js) .stage, .still .stage { grid-template-columns: 1fr; padding-top: 90px; }
  .doc .card { padding: 40px 28px; }
  .doc .card h1 { font-size: 36px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .features .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .intro .reply { animation: none; clip-path: none; }
  .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}
