/* Para a semana, Hoje — the page reads like the book: night (side 1) at the top,
   dawn (side 2) at the bottom, and the turn in the middle. Colours are taken from
   the two covers. */

@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --night: #0e2530;
  --night-2: #143541;
  --moon: #efe4c8;
  --moon-dim: #c3c6bd;
  --gold: #d1ab55;
  --stone: #8e9493;
  --dusk: #3d6380;
  --amber: #e2a467;
  --dawn: #f4d4a2;
  --dawn-2: #f7e2be;
  --ink: #13262c;
  --ink-dim: #3f4f50;
  --gate: #2b4a3b;
  --measure: 36rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: calc(var(--measure) + 32px); }

h1, h2 {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}
h1 { font-size: clamp(2.2rem, 6.5vw, 3.6rem); }
h1 span { display: block; }
h2 { font-size: clamp(1.45rem, 4vw, 2rem); }

.eyebrow, .label {
  font-style: italic;
  color: var(--gold);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.lede { font-size: 1.3rem; line-height: 1.5; }
.small { font-size: 0.95rem; color: var(--moon-dim); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.75rem 0 1rem; }
.btn {
  display: inline-block;
  padding: 0.8rem 1.3rem;
  border-radius: 4px;
  background: var(--gold);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--gold);
  line-height: 1.3;
}
.btn:hover { background: #e0bd6b; border-color: #e0bd6b; }
.btn-quiet { background: transparent; color: var(--moon); border-color: rgba(239, 228, 200, 0.45); }
.btn-quiet:hover { background: rgba(239, 228, 200, 0.08); border-color: var(--moon); }
.btn-ink { background: var(--gate); color: #fff; border-color: var(--gate); }
.btn-ink:hover { background: #355a48; border-color: #355a48; }
.btn-ink-quiet { background: transparent; color: var(--ink); border-color: rgba(19, 38, 44, 0.45); }
.btn-ink-quiet:hover { background: rgba(19, 38, 44, 0.06); border-color: var(--ink); }

/* Hero: night */
.hero {
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(239,228,200,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 9%, rgba(239,228,200,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 22%, rgba(239,228,200,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 81% 12%, rgba(239,228,200,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 34%, rgba(239,228,200,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 52%, rgba(239,228,200,.4) 50%, transparent 51%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  padding: 3.5rem 0 4rem;
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-text p { max-width: var(--measure); }
.cover { margin: 0 auto; width: min(70vw, 360px); }
.cover img {
  border-radius: 2px;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(239, 228, 200, 0.08);
}
@media (min-width: 860px) {
  .hero { padding: 5.5rem 0 6rem; }
  .hero-grid { grid-template-columns: 1fr 360px; gap: 4rem; }
}

/* Side 1: still night */
.side-1 { background: var(--night-2); padding: 4rem 0; }
.gate { width: 96px; height: auto; margin-bottom: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.side-1 .gate { color: var(--stone); }
.side-1 .gate .leaf { color: #4f7a63; stroke: #4f7a63; }
blockquote {
  margin: 2.25rem 0 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--gold);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.55;
}
blockquote p { margin: 0; }

/* Excerpt: the page of a book, still at night */
.excerpt { background: var(--night-2); padding: 0 0 4.5rem; }
.prose {
  background: #f3ead6;
  color: var(--ink);
  padding: 1.75rem 1.5rem;
  border-radius: 2px;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
}
.prose p { margin: 0; text-indent: 1.5em; }
.prose p:first-child { text-indent: 0; }
@media (min-width: 600px) { .prose { padding: 2.5rem 2.75rem; } }

/* The middle: night turns to dawn */
.middle {
  background: linear-gradient(180deg, var(--night-2) 0%, var(--dusk) 38%, var(--amber) 78%, var(--dawn) 100%);
  padding: 4.5rem 0 5rem;
  text-align: center;
}
.middle .label { color: var(--moon); }
.turn { border: 0; padding: 0; margin: 0 auto; font-size: clamp(1.25rem, 3.4vw, 1.6rem); color: #fff; text-shadow: 0 1px 12px rgba(14, 37, 48, 0.35); }
.how { margin: 2rem auto 0; max-width: 30rem; color: var(--ink); font-size: 1rem; }

/* Side 2: dawn */
.side-2 { background: var(--dawn); color: var(--ink); padding: 3.5rem 0 4rem; }
.side-2 .label { color: #7a4a1c; }
.side-2 .gate { color: var(--stone); }
.side-2 .gate .leaf { stroke: var(--gate); }
.side-2-grid { display: grid; gap: 2.5rem; align-items: start; }
.side-2-grid > div { max-width: var(--measure); }
@media (min-width: 860px) { .side-2-grid { grid-template-columns: 1fr 320px; gap: 4rem; } }

.note {
  margin: 0;
  background: #fff;
  color: #1c1c1e;
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 0.75rem 2rem rgba(122, 74, 28, 0.25);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
}
.note-title { font-weight: 700; font-size: 1.2rem; margin: 0 0 0.75rem; }
.note ul { list-style: none; margin: 0; padding: 0; }
.note li { position: relative; padding: 0.55rem 0 0.55rem 2rem; border-top: 1px solid #ececee; }
.note li::before {
  content: "";
  position: absolute; left: 0.1rem; top: 0.7rem;
  width: 1.1rem; height: 1.1rem;
  border: 1.5px solid #b9b9bf; border-radius: 50%;
}
.note figcaption {
  margin-top: 0.75rem;
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.98rem;
}

.dawn { margin: 3rem auto 0; max-width: calc(26rem + 32px); }
.dawn img { border-radius: 2px; box-shadow: 0 1rem 2.5rem rgba(122, 74, 28, 0.3); }

/* The book */
.buy { background: var(--dawn-2); color: var(--ink); padding: 3.5rem 0 4rem; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.5rem; margin: 0 0 0.5rem; }
.details dt { font-style: italic; color: var(--ink-dim); }
.details dd { margin: 0; }

.foot { background: var(--gate); color: #e9efe9; padding: 2rem 0; font-size: 0.92rem; }
.foot p { margin: 0.25rem 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s ease, border-color .15s ease; }
}
