:root {
  --ink: #173c67;
  --ink-deep: #0b2949;
  --sky: #dceef0;
  --blue-wash: #edf7f7;
  --sun: #f1bd45;
  --orange: #df6d3c;
  --paper: #fffdf7;
  --white: #ffffff;
  --charcoal: #27323b;
  --muted: #68747c;
  --line: rgba(23, 60, 103, .18);
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --hand: "Gochi Hand", cursive;
  --shadow: 0 28px 70px rgba(18, 49, 80, .18);
  /* Adjust the final 34rem value to change the cover's desktop maximum. */
  --hero-cover-width: clamp(18rem, 34vw, 34rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--charcoal);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 100; background: var(--white); padding: .75rem 1rem; color: var(--ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: .55rem clamp(1.25rem, 5vw, 5rem);
  background: rgba(255, 253, 247, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink-deep); font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.brand img { width: 24px; height: 55px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); }
.site-nav a { font-size: .9rem; font-weight: 600; text-decoration: none; }
.site-nav a:not(.nav-buy) { text-underline-offset: .35rem; }
.site-nav a:not(.nav-buy):hover { text-decoration: underline; }
.nav-buy { padding: .65rem 1.05rem; color: var(--white); background: var(--ink); border-radius: 999px; }
.nav-toggle { display: none; border: 0; background: transparent; padding: .5rem; }
.nav-toggle > span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px; background: var(--ink); }

.countdown-bar { position: sticky; top: 78px; z-index: 45; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; min-height: 58px; padding: .45rem clamp(1.25rem, 5vw, 5rem); color: white; background: var(--ink-deep); box-shadow: 0 8px 24px rgba(7,30,54,.16); }
.countdown-message { display: flex; align-items: center; gap: .6rem; font-size: .82rem; }
.countdown-message .release-date { color: var(--sun); font-weight: 700; letter-spacing: .015em; }
.countdown-dot { width: 9px; height: 9px; background: var(--sun); border-radius: 50%; box-shadow: 0 0 0 5px rgba(241,189,69,.14); }
.countdown-clock { display: flex; align-items: center; gap: .4rem; }
.countdown-clock > span { display: flex; align-items: baseline; gap: .2rem; min-width: 62px; padding: .2rem .55rem; border-left: 1px solid rgba(255,255,255,.18); }
.countdown-clock strong { color: var(--sun); font-family: var(--serif); font-size: 1.25rem; line-height: 1; }
.countdown-clock small { color: rgba(255,255,255,.58); font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; }
.countdown-bar > a { justify-self: end; color: white; font-size: .78rem; font-weight: 700; text-underline-offset: .2rem; }

.hero {
  min-height: min(920px, calc(100vh - 78px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .6fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 7rem);
  padding: clamp(3.5rem, 7vw, 7rem) clamp(1.25rem, 7vw, 7.5rem);
  background:
    radial-gradient(circle at 8% 18%, rgba(241, 189, 69, .25) 0 8%, transparent 8.2%),
    linear-gradient(115deg, var(--paper) 0 62%, var(--sky) 62% 100%);
}
.hero-copy { max-width: 760px; }
.eyebrow { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.15rem; color: var(--ink); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { width: 34px; height: 2px; background: var(--orange); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); color: var(--ink-deep); font-weight: 600; letter-spacing: -.035em; line-height: .98; }
h1 { max-width: 760px; margin-bottom: 1.5rem; font-size: clamp(3.4rem, 7.3vw, 7.1rem); }
h1 em { color: var(--orange); font-family: var(--hand); font-size: .8em; font-weight: 400; letter-spacing: -.02em; }
h2 { font-size: clamp(2.6rem, 5vw, 5rem); }
.hero-intro { max-width: 635px; color: #465862; font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin: 2rem 0 2.4rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 52px; padding: .75rem 1.25rem; border: 2px solid transparent; border-radius: 6px; font-weight: 700; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--ink); box-shadow: 5px 6px 0 var(--sun); }
.button-primary:hover { box-shadow: 3px 4px 0 var(--sun); }
.text-link { color: var(--ink); font-weight: 700; text-decoration-line: underline; text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: .35rem; }
.book-facts { display: flex; gap: clamp(1.25rem, 4vw, 3.5rem); margin: 0; }
.book-facts div { padding-left: 1rem; border-left: 2px solid var(--sun); }
.book-facts dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.book-facts dd { margin: .1rem 0 0; color: var(--ink-deep); font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }

.hero-art { position: relative; min-width: 0; justify-self: center; width: 100%; max-width: calc(var(--hero-cover-width) + 2.5rem); padding: 1rem 1.25rem 2rem; }
.cover-wrap { position: relative; z-index: 2; width: min(100%, var(--hero-cover-width)); aspect-ratio: 1744 / 2304; overflow: hidden; margin-inline: auto; transform: rotate(1.4deg); background: white; box-shadow: var(--shadow), 12px 12px 0 var(--ink); }
.cover-wrap::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(23,60,103,.12); pointer-events: none; }
.cover-wrap img { width: 100%; height: auto; }
.cover-note { position: absolute; z-index: 3; right: -7.4rem; bottom: -4.0rem; transform: rotate(-6deg); color: var(--ink); font-family: var(--hand); font-size: 2.55rem; line-height: 1.05; -webkit-text-stroke: 4px rgba(255,255,255,.94); paint-order: stroke fill; text-shadow: 0 2px 0 rgba(255,255,255,.9); }
.purchase-option { min-width: 0; }
.physical-editions { margin: 1.5rem 0 0; color: var(--orange); font-size: 1.15rem; line-height: 1.4; }

.promise { display: grid; place-items: center; padding: 5rem 1.25rem; text-align: center; background: var(--sun); }
.promise p { max-width: 1000px; margin-bottom: .5rem; color: var(--ink-deep); font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 4.3rem); line-height: 1.08; }
.promise strong { font-family: var(--hand); font-weight: 400; }
.promise svg { width: min(210px, 50vw); }
.promise path { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; }

.section-shell { position: relative; max-width: 1240px; margin: 0 auto; padding: clamp(5rem, 9vw, 9rem) clamp(1.25rem, 4vw, 3rem); }
.section-number { position: absolute; top: 4rem; right: 2rem; color: rgba(23,60,103,.1); font-family: var(--serif); font-size: clamp(6rem, 14vw, 12rem); line-height: 1; }
.section-heading { max-width: 840px; }
.section-heading h2 { margin-bottom: 2.5rem; }
.book-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 7vw, 7rem); }
.book-body { position: relative; padding-top: 2.4rem; }
.lead { color: var(--ink-deep); font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.35; }
.book-body > p:not(.lead) { max-width: 700px; font-size: 1.05rem; }
.margin-note { margin-top: 2.5rem; padding: 1.4rem 1.6rem; transform: rotate(-1deg); background: var(--blue-wash); border-left: 4px solid var(--orange); }
.margin-note span { color: var(--ink); font-family: var(--hand); font-size: 1.45rem; }
.margin-note ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .35rem 1.5rem; padding-left: 1.2rem; margin: .8rem 0 0; }

.stories-section { color: rgba(255,255,255,.78); background: var(--ink-deep); }
.stories-section .section-shell { max-width: 1320px; }
.section-number.light { color: rgba(255,255,255,.06); }
.section-heading.light h2, .section-heading.light .eyebrow { color: white; }
.section-heading.light > p:last-child { max-width: 630px; font-size: 1.08rem; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 4rem; }
.story-card { position: relative; min-height: 330px; padding: 2rem; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.03); }
.story-card.featured { transform: translateY(-1.25rem); color: var(--charcoal); background: var(--sun); border-color: var(--sun); }
.story-index { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 3.2rem; color: var(--sun); font-family: var(--serif); border: 1px solid currentColor; border-radius: 50%; }
.featured .story-index { color: var(--ink); }
.story-card h3 { margin-bottom: 1rem; color: white; font-family: var(--serif); font-size: 1.8rem; line-height: 1.15; }
.featured h3 { color: var(--ink-deep); }
.story-card p { margin-bottom: 0; }
.story-disclaimer { margin: 1.4rem 0 0; color: rgba(255,255,255,.56); font-size: .8rem; }

.author-section { display: grid; grid-template-columns: .85fr 1fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.author-visual { position: relative; }
.author-portrait { overflow: hidden; background: var(--sky); border: 1px solid var(--line); }
.author-portrait img { display: block; width: 100%; height: auto; }
.author-visual blockquote { position: absolute; right: -2rem; bottom: -2.2rem; max-width: 330px; margin: 0; padding: 1.4rem; color: var(--white); background: var(--orange); font-family: var(--hand); font-size: 1.75rem; line-height: 1.15; transform: rotate(2deg); }
.author-copy { position: relative; }
.author-copy .section-number { top: -3rem; right: 0; }
.author-copy h2 { margin-bottom: 1.2rem; }
.author-copy .text-link { display: inline-block; margin-top: 1rem; }

.notes-section { background: var(--blue-wash); }
.notes-shell { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.notes-intro { position: relative; }
.notes-intro h2 { max-width: 900px; font-size: clamp(2.7rem, 4.5vw, 4.5rem); }
.notes-intro > p:last-of-type { max-width: 780px; margin-bottom: 0; }
.calendar-card { margin-top: 2rem; padding: 1.4rem; background: var(--white); border: 1px solid var(--line); box-shadow: 8px 8px 0 rgba(23,60,103,.08); }
.calendar-topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.calendar-topline > div > span { color: var(--orange); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.calendar-topline h3 { margin: .15rem 0 0; color: var(--ink-deep); font-family: var(--serif); font-size: 2rem; line-height: 1; }
.calendar-topline h3 strong { color: var(--muted); font-size: 1rem; font-weight: 500; }
.calendar-key { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .7rem; }
.calendar-key i { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.calendar-weekdays { padding: 1rem 0 .45rem; color: var(--muted); font-size: .62rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.calendar-day, .calendar-blank { aspect-ratio: 1; }
.calendar-day { position: relative; display: grid; place-items: center; min-width: 0; padding: 0; color: var(--ink-deep); background: transparent; border: 1px solid transparent; border-radius: 50%; font: 600 .82rem/1 var(--sans); cursor: pointer; }
.calendar-day:hover, .calendar-day:focus-visible { background: var(--blue-wash); border-color: var(--line); outline: none; }
.calendar-day.has-event::after { content: ""; position: absolute; bottom: 9%; width: 5px; height: 5px; background: var(--orange); border-radius: 50%; }
.calendar-day.is-selected { color: white; background: var(--ink); border-color: var(--ink); }
.calendar-day.is-selected::after { background: var(--sun); }
.calendar-detail { min-height: 126px; margin-top: 1.2rem; padding: 1rem 1.1rem; background: var(--blue-wash); border-left: 4px solid var(--orange); }
.calendar-detail time { color: var(--orange); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.calendar-detail h4 { margin: .2rem 0 .25rem; color: var(--ink-deep); font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; }
.calendar-detail p { margin: 0; color: var(--muted); font-size: .82rem; }
.calendar-detail a { display: inline-block; margin-top: .55rem; color: var(--ink); font-size: .78rem; font-weight: 700; text-underline-offset: .2rem; }
.calendar-detail a[hidden] { display: none; }
.resource-blocks { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 1.5rem; }
.resource-block { padding: 1.6rem; background: rgba(255,255,255,.68); border: 1px solid var(--line); }
.resource-heading { padding-bottom: 1.1rem; border-bottom: 2px solid var(--ink); }
.resource-heading > span { color: var(--orange); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.resource-heading h3 { margin: .35rem 0 0; color: var(--ink-deep); font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.resource-list { margin: 0; padding: 0; list-style: none; }
.resource-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.resource-title { color: var(--ink-deep); font-weight: 600; }
.resource-meta { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.link-list a { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-deep); font-weight: 600; text-decoration-color: rgba(23,60,103,.25); text-underline-offset: .25rem; }
.link-list a span { color: var(--orange); font-size: .78rem; white-space: nowrap; }
.link-list a:hover { text-decoration-color: var(--orange); }
.event-list li { grid-template-columns: 130px minmax(0,1fr) auto; }
.event-list time { color: var(--orange); font-size: .77rem; font-weight: 700; letter-spacing: .03em; }
.placeholder-note { margin: .8rem 0 0; color: var(--muted); font-size: .76rem; font-style: italic; }

.contact-section { padding-top: 5rem; padding-bottom: 5rem; }
.contact-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 86px 1fr auto; gap: 2rem; align-items: center; padding: clamp(2rem, 5vw, 4rem); color: rgba(255,255,255,.8); background: var(--ink); }
.contact-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -130px; border: 45px solid rgba(241,189,69,.18); border-radius: 50%; }
.contact-card > img { width: 62px; height: 150px; filter: invert(1); object-fit: contain; }
.contact-card h2 { max-width: 700px; margin-bottom: .8rem; color: white; font-size: clamp(2.4rem, 4vw, 4.3rem); }
.contact-card p { max-width: 700px; margin-bottom: 0; }
.contact-card .eyebrow { color: var(--sun); }
.button-light { position: relative; z-index: 2; color: var(--ink-deep); background: var(--white); }
.contact-dialog { width: min(34rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--charcoal); box-shadow: var(--shadow); }
.contact-dialog::backdrop { background: rgba(7,30,54,.65); }
.contact-dialog h2 { padding-right: 1.5rem; font-size: 2.5rem; margin-bottom: 1rem; }
.dialog-close { position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 2rem; cursor: pointer; }
.contact-dialog form { display: grid; gap: .5rem; }
.contact-dialog label { color: var(--ink-deep); font-weight: 700; }
.contact-dialog input, .contact-dialog textarea { width: 100%; min-width: 0; padding: .7rem .8rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--charcoal); font: inherit; font-size: 1rem; }
.contact-dialog textarea { resize: vertical; }
.contact-dialog :focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.contact-dialog .button { font: inherit; font-weight: 700; cursor: pointer; margin-top: .4rem; }
.email-fallback { margin: .8rem 0 0; overflow-wrap: anywhere; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.contact-actions .button:not(.button-primary) { background: white; border-color: var(--line); color: var(--ink); }

.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 2rem; align-items: center; padding: 3.5rem clamp(1.25rem, 7vw, 7.5rem) 2rem; color: rgba(255,255,255,.72); background: #071e36; }
.footer-brand { display: flex; align-items: center; gap: .8rem; color: white; }
.footer-brand img { width: 25px; height: 65px; filter: invert(1); object-fit: contain; }
.footer-brand > div { display: flex; flex-direction: column; }
.footer-brand { flex-wrap: wrap; }
.footer-socials { display: flex; gap: .25rem; margin-left: .75rem; }
.footer-socials a { color: white; }
.footer-brand span, .site-footer p span { color: rgba(255,255,255,.5); font-size: .82rem; }
.site-footer p { margin: 0; font-family: var(--serif); line-height: 1.3; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-self: end; gap: .75rem; max-width: 330px; }
.footer-socials .social-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; }
.social-link svg { width: 23px; height: 23px; fill: currentColor; }
.social-link:hover, .social-link:focus-visible { background: rgba(255,255,255,.12); outline: 2px solid var(--sun); outline-offset: 2px; }
.footer-links a { color: white; font-size: .85rem; font-weight: 700; }
.site-footer small { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.42); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr .78fr; padding-inline: 2rem; }
  .book-section, .author-section, .notes-shell { grid-template-columns: 1fr; }
  .resource-blocks { grid-template-columns: 1fr; }
  .book-body { padding-top: 0; }
  .author-visual { max-width: 620px; }
  .event-list li { grid-template-columns: 120px minmax(0,1fr); }
  .event-list .resource-meta { grid-column: 2; }
  .contact-card { grid-template-columns: 70px 1fr; }
  .contact-card .button { grid-column: 2; justify-self: start; }
}

@media (max-width: 900px) {
  .site-header { min-height: 68px; }
  .countdown-bar { top: 68px; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding-block: .6rem; }
  .countdown-message strong { display: none; }
  .countdown-clock { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .countdown-clock > span { min-width: 58px; }
  .countdown-bar > a { grid-column: 2; grid-row: 1; }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 1.25rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 15px 25px rgba(14,47,78,.12); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .6rem .3rem; }
  .nav-buy { text-align: center; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 3.5rem 1.25rem 5rem; background: linear-gradient(160deg, var(--paper) 0 66%, var(--sky) 66% 100%); }
  h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .hero-art { margin-top: 1rem; }
  .cover-note { right: -1.5rem; }
  .book-facts { flex-wrap: wrap; gap: 1rem 1.5rem; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card, .story-card.featured { min-height: auto; transform: none; }
  .story-index { margin-bottom: 1.8rem; }
  .author-visual blockquote { right: -.4rem; }
  .contact-card { grid-template-columns: 1fr; text-align: left; }
  .contact-card > img { width: 48px; height: 105px; }
  .contact-card .button { grid-column: 1; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer p { text-align: left; }
  .footer-links { justify-self: start; }
  .footer-socials { margin-left: 0; }
  .site-footer small { grid-column: 1; }
}

@media (max-width: 480px) {
  .brand span { font-size: .9rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .book-facts div { width: calc(50% - .75rem); }
  .margin-note ul { grid-template-columns: 1fr; }
  .resource-list li, .event-list li { grid-template-columns: 1fr; gap: .2rem; }
  .event-list .resource-meta { grid-column: 1; }
  .link-list a { align-items: flex-start; flex-direction: column; }
  .countdown-clock { gap: 0; }
  .countdown-clock > span { min-width: 0; padding-inline: .45rem; }
  .calendar-card { padding: 1rem; }
  .calendar-weekdays, .calendar-grid { gap: .1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
