/* Simple version for phones: plain scrolling page, no animation, no sound. */
@font-face { font-family: "Sandro Universal"; src: url("../assets/fonts/SandroUniversal-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sandro Universal"; src: url("../assets/fonts/SandroUniversal-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sandro Universal"; src: url("../assets/fonts/SandroUniversal-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Sandro Universal"; src: url("../assets/fonts/SandroUniversal-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --page: #000000;
  --paper: #ffffff;
  --ink: #000000;
  --red: #ff0000;
  --muted: #555555;
  --menu-h: 52px;
}

* { box-sizing: border-box; }

html {
  background: var(--page);
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--menu-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 18px/1.6 "Sandro Universal", Georgia, serif;
}

/* Menu: one horizontal row; the current section gets the red ring. */
.menu {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  height: var(--menu-h);
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--page);
}
.menu::-webkit-scrollbar { display: none; }
.menu a {
  flex: none;
  align-self: center;
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.menu a[aria-current="true"] { border-color: var(--red); }
.menu a:focus-visible { outline: 2px solid #ff9900; }

main { max-width: 720px; margin: 0 auto; }

.torn { display: block; width: 100%; height: auto; }
.paper { background: var(--paper); padding: 8px 20px 24px; margin: -1px 0; }

.site-title { text-align: center; padding: 8px 0 4px; }
.site-title h1 { margin: 0; color: var(--red); font-size: 40px; line-height: 1.1; }
.site-title p { margin: 4px 0 0; color: var(--muted); }

section { padding-top: 24px; }
section + section { border-top: 1px solid #e3e3ea; margin-top: 32px; }

h2 { margin: 0 0 12px; color: var(--red); font-size: 28px; line-height: 1.2; }
h3 { margin: 32px 0 12px; font-size: 22px; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: var(--ink); }

.hint { color: var(--muted); font-size: 15px; }

/* Gallery: two columns of pictures. */
.dreams { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; }
.dreams button {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.dreams img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.dreams .no { display: block; margin-top: 6px; font-weight: 700; font-size: 15px; color: var(--red); }
.dreams .name { display: block; font-size: 15px; line-height: 1.35; }

/* Book: one page per screen width, turned by swiping (scroll snap, no script needed). */
.book {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 -20px;
  border-block: 1px solid #e3e3ea;
  scrollbar-width: none;
}
.book::-webkit-scrollbar, .strip::-webkit-scrollbar { display: none; }
.book img { flex: 0 0 100%; width: 100%; height: auto; scroll-snap-align: center; }
.book:focus { outline: none; }
.book:focus-visible { outline: 2px solid #ff9900; }
.book-wrap { position: relative; }
.book-wrap + .hint { margin-top: 8px; }

/* Arrows that show the book can be turned sideways. */
.turn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border: 2px solid var(--page); border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--page); cursor: pointer;
}
.turn.prev { left: -12px; }
.turn.next { right: -12px; }
.turn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.turn:disabled { opacity: .2; cursor: default; }
.turn:focus-visible { outline: 2px solid #ff9900; outline-offset: 2px; }

.story p { text-align: left; hyphens: auto; }

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 4px; }

.poems { list-style: none; padding: 0; margin: 16px 0; }
.poems a {
  display: block;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}
.poems a::after { content: " ▸"; color: var(--red); }

.contact { text-align: center; font-size: 22px; margin: 12px 0; }
.contact a { display: inline-block; padding: 8px 4px; }

footer { margin-top: 40px; text-align: center; font-size: 15px; }
footer a { color: var(--muted); }

/* Picture viewer: full screen, swipe between pictures. */
.viewer {
  width: 100vw; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
}
.viewer::backdrop { background: var(--page); }
.strip {
  display: flex; height: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain;
  scrollbar-width: none;
}
.strip figure {
  flex: 0 0 100%; margin: 0; padding: 56px 16px 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
  scroll-snap-align: center;
}
.strip img { display: block; max-width: 100%; max-height: 70dvh; margin: 0 auto; object-fit: contain; }
.strip figcaption { text-align: center; font-size: 17px; line-height: 1.45; }
.strip figcaption b { color: var(--red); }
.viewer .close {
  position: fixed; top: 8px; right: 8px;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--page); color: #ffffff; font: 400 28px/44px Arial, sans-serif; cursor: pointer;
}
.count { white-space: nowrap; }
