/* =========================================================================
   In Both Hands — a novel in progress
   Literary publisher aesthetic. Warm cream paper, ink black, lamp amber.
   Boska (display) + Source Serif 4 (body). Restrained. Considered.
   ========================================================================= */

:root {
  /* Palette — warm paper + ink + a single lamp accent */
  --paper:        #f4ece1;   /* warm cream, the page */
  --paper-2:      #ede4d6;   /* a half-step warmer for cards */
  --paper-3:      #e3d8c5;   /* slightly dusted, for borders */
  --ink:          #1a1d22;   /* near-black, with a touch of warmth */
  --ink-soft:     #2c2f35;
  --ink-mute:     #5a5851;   /* body soft, captions */
  --ink-fade:     #8a877e;   /* metadata */
  --rule:         #c9bfa9;   /* hairlines */
  --slate:        #20242b;   /* dark surface for People section */
  --slate-2:      #2a2f37;
  --amber:        #c08a3e;   /* lamp light, accent only */
  --amber-warm:   #d49a4a;
  --amber-glow:   rgba(192, 138, 62, 0.18);

  /* Type */
  --display: "Boska", "Source Serif 4", Georgia, serif;
  --body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --ui:      "Satoshi", "Inter", system-ui, -apple-system, sans-serif;

  /* Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1.0625rem;   /* 17px — comfortable literary read */
  --text-lg:   1.1875rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-4xl:  4rem;
  --text-hero: clamp(3rem, 9vw, 6.5rem);

  /* Spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  /* Layout */
  --container: 1180px;
  --reading:   640px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-slow: 900ms;
  --dur:      450ms;
  --dur-fast: 220ms;
}

/* -------------------------------------------------------------------------
   Reset + base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--text-base);
  line-height: 1.65;
  font-weight: 400;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
hr { border: 0; }

/* Selection */
::selection { background: var(--amber); color: var(--paper); }

/* -------------------------------------------------------------------------
   Typography utilities
   ------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-fade);
  font-weight: 500;
  margin-bottom: var(--s-5);
}
.overline {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-fade);
  font-weight: 500;
}
.section__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--s-7);
  max-width: 22ch;
}
.section__lede {
  font-family: var(--body);
  font-size: var(--text-lg);
  color: var(--ink-mute);
  max-width: 60ch;
  margin: 0 0 var(--s-7);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-6);
  background: rgba(244, 236, 225, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink);
}
.nav__logo { width: 28px; height: 28px; }
.nav__wordmark {
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  font-weight: 500;
}
.nav__links {
  display: flex;
  gap: var(--s-6);
  font-family: var(--ui);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  padding: var(--s-2) 0;
  transition: color var(--dur-fast) var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--amber);
  transition: right var(--dur) var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }

@media (max-width: 720px) {
  .nav { padding: var(--s-3) var(--s-4); }
  .nav__links { gap: var(--s-4); font-size: var(--text-xs); }
  .nav__links a:nth-child(n+4) { display: none; }
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-9);
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-10) var(--s-6) var(--s-9);
}
.hero__cover {
  position: relative;
  perspective: 1800px;
}
.hero__frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 30px 60px -20px rgba(26, 29, 34, 0.45),
    0 10px 25px -10px rgba(26, 29, 34, 0.35);
  transform: rotateY(-2deg) rotateX(0.5deg);
  transition: transform var(--dur-slow) var(--ease);
}
.hero__frame:hover { transform: rotateY(0deg) rotateX(0deg); }
.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.95);
}
/* Halation around the lit window in the cover */
.hero__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 72% 38%,
    var(--amber-glow) 0%,
    transparent 35%
  );
  pointer-events: none;
  mix-blend-mode: screen;
}
/* Vignette */
.hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(0,0,0,0.35) 100%
  );
  pointer-events: none;
}
.hero__frame-text {
  position: absolute;
  inset: auto 0 8% 0;
  text-align: center;
  color: var(--paper);
  z-index: 2;
  padding: 0 var(--s-5);
}
.hero__frame-overline {
  font-family: var(--ui);
  font-size: 0.625rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(244, 236, 225, 0.65);
  margin-bottom: var(--s-3);
}
.hero__frame-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  font-weight: 400;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.hero__frame-author {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  margin-top: var(--s-3);
  color: rgba(244, 236, 225, 0.78);
  letter-spacing: 0.02em;
}

.hero__copy { max-width: 36rem; }
.hero__title {
  font-family: var(--display);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-size: var(--text-hero);
  margin: var(--s-4) 0 var(--s-5);
  display: flex;
  flex-direction: column;
}
.hero__title .i {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
}
.hero__title .ii {
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.hero__byline {
  font-family: var(--body);
  font-style: italic;
  color: var(--ink-mute);
  font-size: var(--text-lg);
  margin: 0 0 var(--s-6);
}
.hero__byline strong { font-weight: 500; font-style: normal; color: var(--ink); }
.hero__lede {
  font-family: var(--body);
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 var(--s-7);
  max-width: 34rem;
}
.hero__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-5);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s-6);
}
.hero__meta > div { display: flex; flex-direction: column; gap: 2px; }
.meta__k {
  font-family: var(--ui);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-fade);
}
.meta__v {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--ui);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: var(--s-3) var(--s-5);
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: all var(--dur) var(--ease);
}
.cta:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-7);
    padding: var(--s-8) var(--s-4) var(--s-7);
  }
  .hero__cover { max-width: 360px; margin: 0 auto; }
  .hero__meta { grid-template-columns: 1fr 1fr; }
}

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */
.section {
  padding: var(--s-10) var(--s-6);
  border-top: 1px solid var(--rule);
}
.section__inner {
  max-width: var(--container);
  margin: 0 auto;
}

.section--about { background: var(--paper); }
.prose {
  font-family: var(--body);
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--ink-soft);
}
.prose p { margin: 0 0 var(--s-5); }
.prose--two-column {
  column-count: 2;
  column-gap: var(--s-8);
  max-width: 68rem;
}
.prose--two-column p:first-child::first-letter {
  font-family: var(--display);
  font-size: 3.6em;
  float: left;
  line-height: 0.88;
  padding: 0.05em 0.08em 0 0;
  color: var(--ink);
  font-weight: 400;
}
@media (max-width: 760px) {
  .prose--two-column { column-count: 1; }
}

/* -------------------------------------------------------------------------
   World
   ------------------------------------------------------------------------- */
.section--world { background: var(--paper-2); }
.world-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}
.world-card {
  background: var(--paper);
  border: 1px solid var(--paper-3);
  padding: var(--s-6);
  border-radius: 3px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.world-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -25px rgba(26,29,34,0.25);
}
.world-card__location {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--s-3);
}
.world-card__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--text-xl);
  margin: 0 0 var(--s-3);
  color: var(--ink);
}
.world-card p {
  font-family: var(--body);
  font-size: var(--text-base);
  color: var(--ink-mute);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 880px) { .world-grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   People
   ------------------------------------------------------------------------- */
.section--people {
  background: var(--slate);
  color: var(--paper);
  border-top-color: var(--slate-2);
}
.section--people .eyebrow { color: rgba(244,236,225,0.5); }
.section--people .section__title { color: var(--paper); }

.people-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
}
.person {
  padding: var(--s-6);
  background: var(--slate-2);
  border-radius: 3px;
  border-left: 2px solid var(--amber);
}
.person__plate {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid rgba(244,236,225,0.12);
}
.person__monogram {
  font-family: var(--display);
  font-size: var(--text-2xl);
  color: var(--amber);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.person__role {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,236,225,0.55);
  text-align: right;
}
.person__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.875rem;
  color: var(--paper);
  margin: 0 0 var(--s-3);
  letter-spacing: -0.005em;
}
.person__brief {
  font-family: var(--body);
  color: rgba(244,236,225,0.78);
  font-size: var(--text-base);
  line-height: 1.65;
  margin: 0 0 var(--s-5);
}
.person__voice {
  font-family: var(--body);
  font-style: italic;
  color: var(--paper);
  font-size: var(--text-lg);
  line-height: 1.6;
  padding: var(--s-4) 0 var(--s-4) var(--s-5);
  border-left: 1px solid var(--amber);
  margin: 0 0 var(--s-3);
}
.quote-open, .quote-close {
  font-family: var(--display);
  color: var(--amber);
  font-size: 1.4em;
  line-height: 0;
  vertical-align: -0.15em;
  font-style: normal;
}
.person__voice-note {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  color: rgba(244,236,225,0.5);
}
@media (max-width: 880px) { .people-grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   Chapters
   ------------------------------------------------------------------------- */
.section--chapters { background: var(--paper); }
.chapters {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: chapter;
}
.chapter {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--s-7);
  padding: var(--s-7) 0;
  border-bottom: 1px solid var(--rule);
}
.chapter:last-child { border-bottom: 0; }

.chapter__art {
  margin: 0;
  position: relative;
}
.chapter__art img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  filter: contrast(1.02) saturate(0.92);
  box-shadow: 0 18px 35px -22px rgba(26,29,34,0.4);
}

.chapter__num {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.chapter__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.875rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}
.chapter__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-family: var(--ui);
  font-size: var(--text-xs);
  color: var(--ink-fade);
  letter-spacing: 0.04em;
  margin-bottom: var(--s-5);
}
.chapter__meta span:nth-child(even) { color: var(--rule); }
.chapter__synopsis {
  font-family: var(--body);
  font-size: var(--text-lg);
  color: var(--ink-mute);
  line-height: 1.7;
  margin: 0 0 var(--s-6);
  max-width: 38rem;
  font-style: italic;
}
.chapter__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--ui);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: var(--s-2) 0;
  transition: gap var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chapter__toggle:hover {
  gap: var(--s-5);
  color: var(--amber);
  border-bottom-color: var(--amber);
}
.chapter__toggle-icon {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}
.chapter__toggle[aria-expanded="true"] .chapter__toggle-icon {
  transform: rotate(180deg);
}

.chapter__body {
  grid-column: 1 / -1;
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--rule);
}
.chapter__body[hidden] { display: none; }
.chapter__body-inner {
  max-width: var(--reading);
  margin: 0 auto;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.78;
  color: var(--ink-soft);
}
.chapter__body-inner p {
  margin: 0 0 var(--s-4);
  text-align: left;
  hyphens: auto;
}
.chapter__body-inner p:first-child::first-letter {
  font-family: var(--display);
  font-size: 3.4em;
  float: left;
  line-height: 0.88;
  padding: 0.04em 0.08em 0 0;
  color: var(--ink);
  font-weight: 400;
}
.chapter__body-inner em {
  font-style: italic;
  color: var(--ink);
}
.chapter__body-inner .section-break,
.chapter__body-inner hr.section-break {
  border: 0;
  height: var(--s-6);
  margin: var(--s-5) 0;
  display: block;
  text-align: center;
}
.chapter__body-inner .section-break::after,
.chapter__body-inner hr.section-break::after {
  content: "·   ·   ·";
  font-family: var(--display);
  color: var(--ink-fade);
  letter-spacing: 0.4em;
  font-size: 1.2rem;
}

@media (max-width: 880px) {
  .chapter { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* -------------------------------------------------------------------------
   Craft
   ------------------------------------------------------------------------- */
.section--craft { background: var(--paper-2); }
.craft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-7);
}
.craft-item {
  padding: var(--s-6) var(--s-6) var(--s-6) 0;
  border-top: 1px solid var(--rule);
  padding-top: var(--s-5);
}
.craft-item__num {
  font-family: var(--display);
  font-style: italic;
  color: var(--amber);
  font-size: var(--text-xl);
  margin-bottom: var(--s-3);
}
.craft-item h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 var(--s-3);
}
.craft-item p {
  font-family: var(--body);
  font-size: var(--text-base);
  color: var(--ink-mute);
  line-height: 1.7;
  margin: 0;
}
.craft-item em { color: var(--ink); font-style: italic; }
@media (max-width: 760px) { .craft-grid { grid-template-columns: 1fr; gap: var(--s-5); } }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-9) var(--s-6) var(--s-7);
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-7);
  align-items: start;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.footer__logo { width: 36px; height: 36px; color: var(--amber); }
.footer__title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--paper);
}
.footer__subtitle {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244,236,225,0.5);
  margin-top: 2px;
}
.footer__disclaimer {
  font-family: var(--body);
  font-style: italic;
  font-size: var(--text-sm);
  color: rgba(244,236,225,0.65);
  margin: 0;
  max-width: 38rem;
  line-height: 1.6;
}
.footer__colophon {
  font-family: var(--ui);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: rgba(244,236,225,0.4);
  margin: 0;
  text-align: right;
  max-width: 18rem;
  line-height: 1.6;
}
@media (max-width: 880px) {
  .footer__inner { grid-template-columns: 1fr; gap: var(--s-5); }
  .footer__colophon { text-align: left; max-width: none; }
}

/* -------------------------------------------------------------------------
   Reveal on scroll
   ------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   Focus styles
   ------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}
