/* Hello Brave — site styles */
@font-face { font-family: "Lazydog"; src: url("fonts/lazydog.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kotori Rose"; src: url("fonts/kotori-regular.otf") format("opentype"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Kotori Rose"; src: url("fonts/kotori-bold.otf") format("opentype"); font-weight: 600 900; font-display: swap; }

:root {
  --ink: #1A1A1A;
  --gray: #454545;
  --white: #FFFFFF;
  --yellow: #FFF465;
  --pink: #FFE8E8;
  --bluegray: #CFDCE6;
  --lavender: #E5C6F6;
  --lime: #BCD460;
  --peach: #F9BA91;
  --orange: #F7550F;
  --blue: #2F5FE8;
  --line: #E3D9D9;
  --display: "Lazydog", "Kotori Rose", "Comic Sans MS", sans-serif;
  --body: "Kotori Rose", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1280px;
  --gutter: 72px;
  --section: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: #B8400A; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4, p { margin: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Type */
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.05; }
.h1 { font-size: 46px; line-height: 1; }
.h2 { font-size: 34px; line-height: 1.08; }
.h3 { font-size: 22px; line-height: 1.1; }
.lead { font-size: 17px; color: var(--gray); max-width: 640px; }
.muted { color: var(--gray); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mark { background-image: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 6px; margin: 0 -6px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }

/* Layout */
.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section); padding-bottom: var(--section); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 48px; align-items: center; }
.row > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.center { text-align: center; align-items: center; }
.bg-pink { background: var(--pink); }
.bg-rose { background: #F8D6DE; }
.bg-seafoam { background: #B8CED1; }
.bg-yellow { background: var(--yellow); }
.bg-bluegray { background: var(--bluegray); }
.bg-lavender { background: var(--lavender); }
.bg-lime { background: var(--lime); }
.bg-peach { background: var(--peach); }
.bg-white { background: var(--white); }

/* Pills, buttons */
.pill { align-self: flex-start; display: inline-block; background: var(--white); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 13px; border-radius: 999px; }
.center .pill { align-self: center; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-block; font-family: var(--body); font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--white); cursor: pointer; text-align: center; }
.btn:hover { background: #333; color: var(--white); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #fbe94a; color: var(--ink); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-white:hover { background: #f4f4f4; color: var(--ink); }
.link { font-weight: 700; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid #EFE6E6; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.brand img { width: 54px; height: 54px; }
.nav { display: flex; gap: 30px; align-items: center; }
.nav > li { list-style: none; position: relative; }
.nav, .nav ul { margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 700; font-size: 15px; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.nav .sub { display: none; position: absolute; left: -16px; top: 100%; padding-top: 10px; }
.nav .sub ul { background: var(--white); border: 2px solid var(--ink); border-radius: 16px; padding: 10px 6px; min-width: 190px; }
.nav .sub li { list-style: none; }
.nav .sub a { display: block; padding: 8px 14px; font-size: 15px; border-radius: 10px; }
.nav .sub a:hover { background: var(--pink); color: var(--ink); }
.nav > li:hover .sub, .nav > li:focus-within .sub { display: block; }
.header-cta { display: flex; align-items: center; gap: 10px; }
.header-cta .btn { padding: 9px 18px; font-size: 14px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle svg { width: 26px; height: 26px; }

/* Cards */
.card { border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.card-outline { border: 2px solid var(--ink); }
.card-white { background: var(--white); }
.icon { height: 50px; width: auto; align-self: flex-start; }
.card-link { text-decoration: none; color: var(--ink); }
.card-link:hover { color: var(--ink); }
.card-link .more { font-weight: 700; margin-top: auto; }

/* Hero */
.hero .row { justify-content: space-between; }
.hero-text { max-width: 540px; }
.hero-art { width: 420px; flex-shrink: 0; }

/* Logos strip */
.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.logos div { height: 64px; background: var(--white); border-radius: 14px; padding: 12px; display: flex; align-items: center; justify-content: center; }
.logos img { max-height: 100%; width: auto; object-fit: contain; }

/* Books */
.book-card { background: var(--white); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.book-card .cover { width: 100%; aspect-ratio: 1585 / 2000; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.status { align-self: flex-start; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 12px; border-radius: 999px; }
.status-now { background: var(--lime); }
.status-soon { background: var(--peach); }
.book-title { font-size: 19px; line-height: 1.25; font-weight: 700; }
.descriptor { font-size: 14px; font-weight: 700; color: var(--gray); }
.notice { background: var(--white); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 20px; display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.notice.yellow { background: var(--yellow); }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 700; }
input, select, textarea { font-family: var(--body); font-size: 16px; padding: 10px 14px; border: 1.5px solid #8A8A8A; border-radius: 14px; background: var(--white); color: var(--ink); width: 100%; }
textarea { resize: vertical; }
.inline-form input { border-radius: 999px; border: 2px solid var(--ink); }
.form-card { background: var(--white); border: 2px solid var(--ink); border-radius: 24px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.group-title { grid-column: 1 / -1; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 2px solid var(--ink); margin-top: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; }
.form-status { font-weight: 700; font-size: 15px; min-height: 1em; }

/* Donation panel */
.donate-panel { background: var(--lavender); border-radius: 24px; padding: 26px; display: flex; flex-direction: column; gap: 14px; width: 410px; flex-shrink: 0; }
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tier { background: var(--white); border: 2px solid #C9A3DE; border-radius: 16px; padding: 10px 14px; text-align: left; font-family: var(--body); color: var(--ink); cursor: pointer; }
.tier strong { display: block; font-size: 19px; }
.tier span { font-size: 14px; }
.tier[aria-pressed="true"] { background: var(--yellow); border-color: var(--ink); }

/* Stats */
.stats { display: flex; gap: 48px; justify-content: center; padding-top: 22px; border-top: 2px solid var(--ink); }
.stat .num { font-family: var(--display); font-size: 44px; line-height: 1; }
.stat .cap { font-weight: 700; font-size: 14px; max-width: 200px; }

/* Quotes */
.quote-card { border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.quote-card blockquote { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 700; }
.pull { margin: 0; padding: 18px 22px; background: var(--white); border: 2px solid var(--ink); border-radius: 18px; font-size: 20px; line-height: 1.35; font-weight: 700; }

/* Photo frames */
.photo-frame { border-radius: 26px; border: 7px solid var(--white); object-fit: cover; transform: rotate(-2deg); }

/* Team */
.team-card { border: 2px solid #EFE6E6; border-radius: 22px; padding: 22px; display: flex; gap: 20px; align-items: flex-start; }
.team-photo { width: 150px; height: 193px; flex-shrink: 0; border-radius: 22px; overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.role { font-family: var(--display); font-size: 20px; line-height: 1; color: var(--blue); text-transform: uppercase; }

/* Lists with rules */
.ruled > * { padding: 12px 0; border-top: 2px solid var(--ink); }
.ruled { border-bottom: 2px solid var(--ink); }

/* Tables of tiers */
.tier-row { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 2px solid var(--ink); }
.tier-row .price { font-family: var(--display); font-size: 28px; line-height: 1; }

/* Newsletter */
.newsletter .wrap { display: flex; align-items: center; gap: 40px; }
.newsletter img { width: 120px; border-radius: 22px; border: 3px solid var(--ink); background: var(--white); flex-shrink: 0; }
.newsletter .inline-form { width: 380px; flex-shrink: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-grid h4 { font-size: 16px; margin-bottom: 8px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid ul a { text-decoration: none; color: #2A2A2A; }
.footer-grid ul a:hover { text-decoration: underline; }
.footer-legal { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: #3A3A3A; }

/* Swipe rows (mobile) */
.swipe { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.swipe > * { scroll-snap-align: start; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 40px; --section: 56px; }
  .h1 { font-size: 40px; }
  .h2 { font-size: 30px; }
  .hero-art { width: 360px; }
  .donate-panel { width: 380px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .newsletter .wrap { flex-wrap: wrap; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  :root { --gutter: 20px; --section: 40px; }
  body { font-size: 16px; }
  .h1 { font-size: 32px; line-height: 1.02; }
  .h2 { font-size: 25px; line-height: 1.1; }
  .h3 { font-size: 19px; }
  .lead { font-size: 16px; }
  .row { flex-direction: column; align-items: stretch; gap: 22px; }
  .row.reverse-mobile { flex-direction: column-reverse; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-art, .donate-panel { width: 100%; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; border-bottom: 2px solid var(--ink); }
  .nav.open { display: flex; }
  .nav > li > a { display: block; padding: 12px 0; font-size: 18px; }
  .nav .sub { display: block; position: static; padding: 0 0 6px 14px; }
  .nav .sub ul { border: 0; padding: 0; min-width: 0; }
  .nav .sub a { padding: 6px 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .brand img { width: 52px; height: 52px; }
  .header-cta .btn { padding: 9px 14px; font-size: 14px; }
  .card { padding: 18px; border-radius: 20px; }
  .icon { height: 40px; }
  .logos { display: flex; overflow-x: auto; }
  .logos div { width: 150px; height: 64px; flex-shrink: 0; }
  .notice { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px; }
  .book-card { flex-direction: row; flex-wrap: wrap; gap: 10px 14px; padding: 16px; }
  .book-card .cover { width: 84px; flex-shrink: 0; }
  .book-card .book-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
  .book-card > :not(.cover):not(.book-head) { flex-basis: 100%; }
  .book-card .desc { display: none; }
  .form-card { padding: 18px; border-radius: 20px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .donate-panel { padding: 18px; }
  .stats { gap: 24px; }
  .stat .num { font-size: 36px; }
  .pull { font-size: 17px; padding: 14px 16px; }
  .team-card { padding: 16px; gap: 14px; flex-wrap: wrap; }
  .team-photo { width: 92px; height: 118px; border-radius: 14px; }
  .team-card .team-head { flex: 1; min-width: 0; }
  .team-card .bio { flex-basis: 100%; }
  .role { font-size: 18px; }
  .photo-frame { max-width: 200px; align-self: center; }
  .newsletter img { display: none; }
  .newsletter .inline-form { width: 100%; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .footer-grid .footer-brand { grid-column: 1 / -1; }
  .site-footer { padding: 32px 0 24px; font-size: 14px; }
  .hide-mobile { display: none !important; }
  .swipe-mobile { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; }
  .swipe-mobile > * { min-width: 270px; scroll-snap-align: start; }
}

/* Mobile overrides for fixed-width columns set inline */
.buddy-callout { padding: 32px 190px; }
@media (max-width: 1100px) { .buddy-callout { padding: 40px 120px; } }
@media (max-width: 760px) {
  .row > * { width: auto !important; max-width: 100%; }
  .row > img.photo-frame { width: 200px !important; height: 255px !important; }
  .buddy-callout { padding: 26px 22px; align-items: flex-start; text-align: left; }
  .buddy-callout .pill { align-self: flex-start; }
}
.row.reverse { flex-direction: row-reverse; }
.covers { display: flex; gap: 18px; }
.covers img { width: 112px; }
@media (max-width: 760px) {
  .row.reverse { flex-direction: column; }
  .book-cover-lg { max-width: 150px !important; align-self: center; }
  .covers { gap: 10px; justify-content: center; }
  .covers img { width: 30%; }
}
.team-card { flex-wrap: wrap; }
.team-card .team-head { flex: 1; min-width: 0; align-self: center; }
@media (max-width: 760px) {
  .buddy-hero img:first-child { height: 150px !important; }
  .buddy-hero img:last-child { height: 120px !important; margin-bottom: 40px !important; }
  .thumb { display: none !important; }
}

/* Take a peek inside: book tabs + page-spread carousel */
.peek-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.peek-tab { font-family: var(--body); font-weight: 700; font-size: 15px; padding: 8px 20px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer; }
.peek-tab[aria-selected="true"] { background: var(--ink); color: var(--white); }
.peek-panel[hidden] { display: none; }
.peek-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: 18px; }
.peek-track::-webkit-scrollbar { display: none; }
.peek-slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.spread { position: relative; display: block; width: 100%; max-width: 640px; background: var(--white); border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; }
.spread::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,0.07) 50%, rgba(0,0,0,0)); pointer-events: none; }
.spread img { width: 100%; height: auto; }
.peek-slide figcaption { max-width: 680px; text-align: center; font-size: 16px; }
.peek-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.peek-btn { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.peek-btn:hover:not(:disabled) { background: var(--ink); color: var(--white); }
.peek-btn:disabled { opacity: 0.35; cursor: default; }
.peek-count { font-weight: 700; min-width: 56px; text-align: center; }
.peek-note { text-align: center; }
@media (max-width: 760px) {
  .peek-slide figcaption { font-size: 15px; text-align: left; }
  .spread { border-width: 2px; border-radius: 12px; }
  .peek-tab { flex: 1; padding: 10px 14px; }
}
#peek { scroll-margin-top: 90px; }
@media (max-width: 760px) { #peek { scroll-margin-top: 76px; } }

/* Tighter homepage hero and book cards (desktop) */
.hero .row { justify-content: center; gap: 96px; }
.book-card .cover { max-width: 230px; align-self: center; }
@media (max-width: 760px) {
  .hero .row { gap: 22px; }
  .book-card .cover { max-width: none; align-self: auto; }
}

/* Article pages */
.article-head-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.article-title { font-family: var(--body); font-weight: 700; font-size: 36px; line-height: 1.2; }
.article-icon { width: 170px; height: auto; flex-shrink: 0; }
.prose { max-width: 700px; margin: 0 auto; font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 23px; line-height: 1.3; margin-top: 36px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 0; }
.prose li + li { margin-top: 8px; }
.prose li > ul { margin-top: 8px; }
.prose a { font-weight: 700; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--ink); }
.prose .letter { background: var(--pink); border-radius: 22px; padding: 22px 26px; }
.prose .letter > * + * { margin-top: 14px; }
.article-note { font-size: 14px; color: var(--gray); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 36px !important; }
@media (max-width: 760px) {
  .article-title { font-size: 26px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 20px; margin-top: 28px; }
  .prose .letter { padding: 16px 18px; }
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 8px 6px; }
}
