/* Homepage sequence: a simple converter panel, paper notes, and scroll-led book stories. */
@font-face {
  font-family: "Caveat Notes";
  src: url("/fonts/Caveat-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
body.home-page .hero { padding-bottom: 32px; }
body.home-page .hero-intro { margin-bottom: 0; }
.converter-section {
  padding: 82px 0 105px;
  background: var(--paper-50);
}
.converter-section-head {
  max-width: 680px;
  margin: 0 auto 47px;
  text-align: center;
}
.converter-section-head h2,
.postit-heading h2,
.story-introduction h2,
.story-heading h2 {
  margin: 12px 0;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -.055em;
}
.converter-section-head p,
.story-introduction p { color: var(--text-muted); font-size: 18px; }
body.home-page .tool-card {
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  grid-template-areas: "upload reader" "results reader" "foot reader";
  gap: 0 42px;
  align-items: start;
  padding: 44px;
  border-radius: 28px;
}
body.home-page .tool-card::before { content: "CONVERT YOUR FILE"; }
.converter-side-heading { margin: 0 0 25px; }
.converter-side-heading h3 {
  margin: 9px 0 5px;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -.045em;
}
.converter-side-heading p { max-width: 30ch; color: var(--text-muted); font-size: 15px; }
body.home-page .dropzone { min-height: 235px; }
body.home-page .tool-settings {
  grid-area: reader;
  min-width: 0;
  padding: 25px 30px 30px;
  border: 1px solid var(--ink-200);
  border-radius: 20px;
  background: var(--paper-0);
  margin: 0;
  box-shadow: 3px 4px 0 rgb(91 54 35 / 7%);
}
body.home-page .tool-settings .options summary {
  padding-bottom: 18px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .13em;
}
body.home-page .tool-results { margin-top: 26px; }
body.home-page .tool-foot {
  grid-area: foot;
  margin: 18px 0 0;
  justify-content: flex-start;
  text-align: left;
}

.postit-section {
  min-height: 790px;
  padding: 105px 0 145px;
  background: #ffffff;
}
.postit-heading { max-width: 900px; margin: 0 auto 150px; text-align: center; }
body.site-refresh .postit-heading h2 { margin: 0; color: #322418; font-family: "Newsreader", Georgia, serif; font-size: clamp(44px, 4.5vw, 65px); font-weight: 500; line-height: 1.17; letter-spacing: -.045em; }
.postit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: clamp(25px, 3vw, 55px); width: min(1600px, calc(100vw - 140px)); margin-left: 50%; transform: translateX(-50%); }
.postit {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(165deg, #ffd51d 0%, #ffe963 19%, #ffe769 66%, #ffdf48 100%);
  box-shadow: 2px 14px 18px rgb(61 46 24 / 16%), 1px 25px 28px rgb(61 46 24 / 8%);
  color: #332418;
  text-align: center;
  transform: translateY(var(--lift)) rotate(var(--tilt));
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.postit:nth-child(1) { --tilt: 7deg; --lift: 36px; }
.postit:nth-child(2) { --tilt: -4deg; --lift: -18px; }
.postit:nth-child(3) { --tilt: 1deg; --lift: 40px; }
.postit:nth-child(4) { --tilt: 3deg; --lift: -15px; }
.postit:hover { transform: translateY(calc(var(--lift) - 10px)) rotate(0deg); box-shadow: 2px 22px 30px rgb(61 46 24 / 17%); }
.postit-doodle { position: absolute; top: 18%; left: 21%; font-size: clamp(20px, 2.2vw, 36px); line-height: 1; transform: rotate(-17deg); }
.postit:nth-child(2) .postit-doodle { left: 18%; top: 20%; }
.postit:nth-child(3) .postit-doodle { left: 48%; top: 22%; }
.postit:nth-child(4) .postit-doodle { left: auto; right: 19%; top: 18%; }
body.site-refresh .postit h3 { max-width: 12ch; margin: 0; color: #352614; font-family: "Caveat Notes", "Bradley Hand", cursive; font-size: clamp(35px, 3.2vw, 52px); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; }

.story-introduction { padding: 100px 0 55px; text-align: center; background: var(--paper-50); }
.story-introduction .c2e-container { max-width: 790px; }
.story-introduction p { max-width: 55ch; margin: 0 auto; }
.story-section {
  --wipe: 100%;
  --story-progress: 0%;
  position: relative;
  min-height: 220vh;
  background: var(--paper-50);
}
.story-technical { background: var(--paper-100); }
.story-translation { background: var(--paper-50); }
.story-stage {
  position: sticky;
  top: 77px;
  height: calc(100svh - 77px);
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.story-heading { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
.story-heading h2 { max-width: 850px; margin: 8px 0 0; font-size: clamp(34px, 4vw, 52px); }
.story-scene {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: 100vw;
  height: calc(100svh - 77px);
  margin-left: calc(50% - 50vw);
  padding: 40px max(28px, calc((100vw - 1460px) / 2));
  overflow: hidden;
}
.story-info-card {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: 1fr auto;
  align-self: center;
  min-width: 0;
  width: min(100%, 440px);
  min-height: clamp(380px, 52svh, 560px);
  padding: 0;
  border: 1.5px solid #443327;
  border-radius: 13px;
  background: #ffffff;
  color: #322418;
  box-shadow: 5px 7px 0 rgb(55 39 27 / 24%);
}
.story-info { grid-area: 1 / 1 / 2 / 2; align-self: stretch; display: flex; flex-direction: column; transition: opacity 280ms ease, transform 280ms ease; }
.story-info-after { opacity: 0; transform: translateY(18px); pointer-events: none; }
.story-section[data-phase="after"] .story-info-before { opacity: 0; transform: translateY(-18px); pointer-events: none; }
.story-section[data-phase="after"] .story-info-after { opacity: 1; transform: translateY(0); pointer-events: auto; }
.story-state-label { display: inline-block; align-self: flex-start; margin: 28px 28px 0; padding: 0; color: #ad4618; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.story-info-after .story-state-label { color: #447050; }
body.site-refresh .story-info h3 { margin: 18px 28px 26px; color: #322418; font-family: "Newsreader", Georgia, serif; font-size: clamp(25px, 2.9vw, 38px); font-weight: 500; line-height: 1.08; letter-spacing: -.045em; }
.story-info ul { margin: auto 0 0; padding: 0; list-style: none; }
.story-info li { position: relative; min-height: 54px; display: flex; align-items: center; padding: 12px 62px 12px 28px; border-top: 1px solid #e5dad1; color: #423427; font-size: 15px; line-height: 1.35; }
.story-info li::after { content: "×"; position: absolute; right: 28px; color: #c86438; font-family: "Instrument Sans", Arial, sans-serif; font-size: 25px; line-height: 1; }
.story-info-after li::after { content: "✓"; color: #4d8260; font-size: 19px; font-weight: 700; }
.story-toggle {
  grid-area: 2 / 1 / 3 / 2;
  justify-self: stretch;
  min-height: 51px;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-top: 1px solid #e5dad1;
  border-radius: 0 0 12px 12px;
  background: #ffffff;
  color: #a54d21;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.story-toggle:hover { background: #f8f0e9; }
.story-ground {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.story-scene-art {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.story-screen-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: visible;
  background: #fffdf8;
  clip-path: var(--screen-clip);
  pointer-events: none;
}
.story-screen-content img { position: absolute; top: 0; left: 0; display: block; max-width: none; object-fit: fill; object-position: center; background: #fffdf8; transform-origin: top left; }
.story-translation .story-screen-content { --screen-clip: polygon(58.13% 25.9%, 76.55% 25.9%, 76.55% 74%, 58.13% 74%); }
.story-image-after { clip-path: inset(0 var(--wipe) 0 0); }
.story-meter { position: absolute; z-index: 4; left: 50%; bottom: 12px; display: flex; align-items: center; gap: 14px; width: min(430px, 70%); margin: 0; padding: 8px 14px; border-radius: 50px; background: rgb(255 253 250 / 85%); color: #4b3c30; font-size: 10px; font-weight: 800; letter-spacing: .14em; transform: translateX(-50%); }
.story-meter-track { flex: 1; height: 4px; border-radius: 9px; background: var(--ink-200); overflow: hidden; }
.story-meter-fill { display: block; width: var(--story-progress); height: 100%; border-radius: inherit; background: var(--spine-500); }

.more-section {
  min-height: 960px;
  padding: 70px 38px 90px;
  background: #ffffff;
  color: #332719;
}
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(250px, 1fr));
  align-items: center;
  justify-items: center;
  gap: 18px 30px;
  width: min(1700px, 100%);
  min-height: 800px;
  margin: 0 auto;
}
.more-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 225px;
  color: #211a14;
  text-align: center;
  text-decoration: none;
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--tilt, 0));
  transition: color 180ms ease, transform 180ms ease;
}
a.more-item:hover { color: #d65c25; transform: translate(var(--x, 0), calc(var(--y, 0) - 8px)) rotate(0deg); }
a.more-item:focus-visible { outline: 2px solid #d65c25; outline-offset: 8px; border-radius: 8px; }
.more-item svg { display: block; width: 95px; height: 95px; margin-bottom: 7px; }
.more-item span { display: block; font-family: "Caveat Notes", "Bradley Hand", cursive; font-size: clamp(27px, 2.4vw, 39px); line-height: .96; }
.more-kindle { grid-area: 1 / 1; --x: -60px; --y: -8px; --tilt: -8deg; }
.more-docx { grid-area: 1 / 2; --y: -29px; --tilt: 4deg; }
.more-kobo { grid-area: 1 / 3; --x: 55px; --y: -6px; --tilt: 5deg; }
.more-rtf { grid-area: 2 / 1; --x: -45px; --y: 6px; --tilt: -6deg; }
.more-txt { grid-area: 2 / 3; --x: 50px; --y: 9px; --tilt: 5deg; }
.more-html { grid-area: 3 / 1; --x: -53px; --y: 19px; --tilt: -6deg; }
.more-odt { grid-area: 3 / 2; --y: 32px; --tilt: 4deg; }
.more-apple { grid-area: 3 / 3; --x: 62px; --y: 18px; --tilt: -4deg; }
.more-center { grid-area: 2 / 2; width: min(460px, 100%); text-align: center; }
.more-note { display: block; margin-bottom: 10px; color: #e96527; font-family: "Caveat Notes", "Bradley Hand", cursive; font-size: 32px; line-height: 1; transform: rotate(-5deg); }
body.site-refresh .more-center h2 { margin: 0; color: #332719; font-family: "Newsreader", Georgia, serif; font-size: clamp(40px, 4vw, 62px); font-weight: 500; line-height: 1.04; letter-spacing: -.035em; }
.more-center p { max-width: 37ch; margin: 18px auto 0; color: #6b5a4c; font-size: 15px; line-height: 1.45; }

@media (max-width: 900px) {
  body.home-page .tool-card { display: grid; grid-template-columns: 1fr; grid-template-areas: "upload" "reader" "results" "foot"; gap: 25px; max-width: 700px; }
  body.home-page .tool-results { margin-top: 0; }
  .postit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; max-width: 700px; }
  .postit-heading { margin-bottom: 105px; }
  body.site-refresh .postit h3 { font-size: clamp(30px, 4vw, 42px); }
  .story-info-card { min-height: 360px; }
  .more-section { min-height: 800px; padding-inline: 12px; }
  .more-grid { min-height: 740px; grid-template-rows: repeat(3, minmax(220px, 1fr)); column-gap: 2px; }
  .more-item { width: 175px; --x: 0px; }
  .more-item svg { width: 75px; height: 75px; }
  .more-item span { font-size: 29px; }
  .more-center p { font-size: 13px; }
}
@media (max-width: 620px) {
  body.home-page .hero { padding-bottom: 8px; }
  .converter-section { padding: 68px 0 80px; }
  .converter-section-head { margin-bottom: 37px; }
  .converter-section-head h2,
  .postit-heading h2,
  .story-introduction h2 { font-size: 36px; }
  body.home-page .tool-card { padding: 32px 20px 23px; }
  body.home-page .tool-settings { padding: 17px 15px 22px; }
  .postit-section { min-height: 0; padding: 80px 0 100px; }
  .postit-heading { margin-bottom: 70px; }
  body.site-refresh .postit-heading h2 { font-size: clamp(32px, 8vw, 44px); }
  .postit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: calc(100vw - 45px); gap: 35px 25px; }
  .postit { padding: 15px; }
  .postit:nth-child(n) { --lift: 0px; }
  body.site-refresh .postit h3 { max-width: none; font-size: clamp(25px, 6vw, 34px); }
  .postit-doodle { font-size: 18px; }
  .story-introduction { padding: 74px 0 30px; }
  .story-section { min-height: 210svh; }
  .story-stage { top: 94px; height: auto; min-height: calc(100svh - 94px); padding: 0; }
  .story-scene { height: auto; min-height: calc(100svh - 94px); flex-direction: column; justify-content: space-between; gap: 0; padding: 12px 0 0; }
  .story-novel .story-scene { background: #78964c; }
  .story-technical .story-scene { background: #78b8e8; }
  .story-translation .story-scene { background: #e9d7c2; }
  .story-info-card { align-self: center; flex: none; width: calc(100% - 36px); min-height: 0; }
  .story-technical .story-info-card { margin-left: 0; }
  body.site-refresh .story-info h3 { margin: 10px 20px 18px; font-size: 25px; }
  .story-info li { min-height: 42px; padding: 8px 46px 8px 20px; font-size: 12px; }
  .story-info li::after { right: 20px; font-size: 16px; }
  .story-state-label { margin: 18px 20px 0; font-size: 9px; }
  .story-toggle { min-height: 42px; padding: 0 20px; font-size: 11px; }
  .story-ground { position: relative; inset: auto; align-self: flex-start; flex: none; width: 690px; height: 388px; }
  .story-novel .story-ground { margin-left: calc(50vw - 500px); }
  .story-technical .story-ground { margin-left: calc(50vw - 449px); }
  .story-translation .story-ground { margin-left: calc(50vw - 466px); }
  .story-meter { display: none; }
  .more-section { min-height: 0; padding: 85px 16px 100px; }
  .more-grid { display: flex; flex-wrap: wrap; gap: 0; min-height: 0; }
  .more-center { flex: 0 0 100%; order: -1; width: 100%; margin: 0 auto 35px; }
  body.site-refresh .more-center h2 { font-size: clamp(37px, 9vw, 48px); }
  .more-note { font-size: 29px; }
  .more-center p { font-size: 14px; }
  .more-item { flex: 0 0 50%; width: 50%; min-height: 174px; transform: none; }
  a.more-item:hover { transform: translateY(-5px); }
  .more-item svg { width: 62px; height: 62px; }
  .more-item span { font-size: 26px; }
}
@media (max-width: 390px) {
  .story-info-card { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .postit,
  .story-info { transition: none; }
}

.section-transition {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 560ms ease, transform 560ms cubic-bezier(.2, .7, .25, 1);
}
.section-transition.section-transition-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
@media (prefers-reduced-motion: reduce) {
  .section-transition,
  .section-transition.section-transition-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Screenshot-led, selectable before/after reader comparison. */
body.site-refresh .story-introduction {
  padding: 76px 0 96px;
  background: #ffffff;
  color: #30231d;
}
body.site-refresh .story-introduction > .c2e-container {
  max-width: 820px;
  text-align: center;
}
body.site-refresh .story-introduction h2 {
  margin: 12px 0 14px;
  color: #30231d;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.045em;
}
body.site-refresh .story-introduction p {
  max-width: 58ch;
  margin: 0 auto;
  color: #766257;
  font-size: 18px;
  line-height: 1.5;
}
.comparison-showcase {
  max-width: 1360px;
  margin: 36px auto 0;
}
body.site-refresh .story-introduction .comparison-showcase {
  max-width: var(--container-max);
}
.comparison-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 810px);
  margin: 0 auto 17px;
  padding: 6px;
  border: 1px solid #f0d6c8;
  border-radius: 17px;
  background: #fff8f4;
  box-shadow: 0 2px 3px rgb(48 35 29 / 8%);
}
.comparison-tab {
  min-height: 58px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #a34323;
  cursor: pointer;
  font: 600 16px/1.25 "Instrument Sans", Arial, sans-serif;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.comparison-tab:hover { background: #f9e9df; color: #83371f; }
.comparison-tab[aria-selected="true"] {
  background: #a34323;
  color: #ffffff;
  box-shadow: 0 2px 4px rgb(163 67 35 / 24%);
}
.comparison-tab:focus-visible { outline: 3px solid #b94d27; outline-offset: 3px; }
.comparison-tab-detail { margin-left: 5px; color: inherit; opacity: .68; font-weight: 450; }
.comparison-panel[hidden] { display: none; }
.comparison-panel:not([hidden]) { animation: comparison-panel-enter 260ms ease both; }
@keyframes comparison-panel-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.comparison-context {
  max-width: 100ch;
  margin: 0 auto 32px;
  color: #766b60;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
.comparison-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}
.comparison-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid #eee5dc;
  border-top: 3px solid #a34323;
  border-radius: 23px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgb(48 35 29 / 6%);
}
.comparison-card.comparison-after { border-top-color: #8ca495; }
.comparison-badge {
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 7px;
  background: #f8e7de;
  color: #a34323;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.25;
  text-transform: uppercase;
}
.comparison-after .comparison-badge { background: #edf4ee; color: #668573; }
.comparison-reader {
  position: relative;
  width: min(100%, 396px);
  aspect-ratio: 1079 / 1458;
  margin: 0 auto 17px;
  overflow: visible;
  background: url("/images/how-it-works-silver-reader.webp") center / 100% 100% no-repeat;
}
.comparison-reader-screen {
  position: absolute;
  z-index: 1;
  top: 6.5%;
  left: 15.9%;
  width: 77%;
  height: 86.8%;
  overflow: hidden;
  border: 1px solid #e3e0d9;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #f5f3ee;
}
.comparison-reader-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.comparison-card h3 {
  margin: 0 0 10px;
  color: #30231d;
  font-family: "Instrument Sans", Arial, sans-serif;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.035em;
  text-align: center;
}
.comparison-card ul {
  align-self: stretch;
  display: grid;
  gap: 10px;
  max-width: 510px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.comparison-card li {
  position: relative;
  padding-left: 25px;
  color: #766b60;
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
}
.comparison-card li::before {
  position: absolute;
  top: 0;
  left: 1px;
  color: #c45a32;
  content: "×";
  font-size: 18px;
  font-weight: 500;
}
.comparison-after li::before { color: #789681; content: "✓"; font-size: 15px; font-weight: 700; }

@media (max-width: 900px) {
  body.site-refresh .story-introduction { padding: 66px 0 78px; }
  .comparison-showcase { margin-top: 30px; }
  .comparison-cards { gap: 16px; }
  .comparison-card { padding: 22px 18px; }
  .comparison-reader { width: min(100%, 396px); }
  .comparison-context { max-width: 76ch; }
}
@media (max-width: 620px) {
  body.site-refresh .story-introduction { padding: 62px 0 70px; }
  body.site-refresh .story-introduction h2 { font-size: clamp(36px, 9vw, 46px); }
  body.site-refresh .story-introduction p { font-size: 16px; }
  .comparison-showcase { margin-top: 26px; }
  .comparison-tabs { gap: 2px; padding: 4px; border-radius: 14px; }
  .comparison-tab { min-height: 52px; padding: 8px 4px; font-size: 13px; }
  .comparison-tab-detail { display: block; margin: 2px 0 0; font-size: 11px; }
  .comparison-context { margin-bottom: 26px; font-size: 13px; }
  .comparison-cards { grid-template-columns: 1fr; gap: 16px; }
  .comparison-card { padding: 20px; border-radius: 18px; }
  .comparison-badge { align-self: center; margin-bottom: 14px; font-size: 10px; }
  .comparison-reader { width: min(74%, 396px); margin-bottom: 18px; }
  .comparison-card h3 { margin-bottom: 12px; font-size: 21px; }
  .comparison-card ul { gap: 8px; }
  .comparison-card li { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .comparison-tab,
  .comparison-panel:not([hidden]) { animation: none; transition: none; }
}
