*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #1a1612;
  --paper: #f5f0e8;
  --warm: #e8dfc8;
  --accent: #8b3a2a;
  --muted: #6b6058;
  --rule: #c8bfaa;
}

html {
  font-size: 16px;
  scroll-behaviour: smooth;
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.banner {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.banner--short {
  height: 180px;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,22,18,0.15) 0%, rgba(245,240,232,0.6) 100%);
}

.accent-rule {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--rule) 100%);
  position: relative;
  z-index: 1;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page--narrow {
  max-width: 760px;
}

.hero {
  padding: 2.5rem 0 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease forwards 0.1s;
}

.hero--guide {
  padding-bottom: 1.4rem;
}

.hero-text {
  flex: 1;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-name {
  font-family: 'Lora', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.hero-name--guide {
  max-width: 12ch;
}

.hero-tagline {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: var(--muted);
  max-width: 520px;
}

.author-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--warm);
  box-shadow: 0 2px 12px rgba(26, 22, 18, 0.15);
  flex-shrink: 0;
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards 0.5s;
}

.bio {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease forwards 0.4s;
}

.bio p {
  font-size: 1.02rem;
  margin-bottom: 1.1rem;
  max-width: 620px;
}

.bio p:last-child {
  margin-bottom: 0;
}

.books-section {
  margin: 3rem 0;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease forwards 0.6s;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.series-callout {
  display: inline-block;
  border: 2px solid var(--rule);
  border-radius: 12px;
  padding: 0.9rem 1.4rem;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.series-callout::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 13px solid var(--rule);
}

.series-callout p {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
}

.series-callout strong {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 600;
}

.flow-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.flow-row--single {
  margin: 0 auto;
}

.flow-row--pair {
  gap: 2rem;
}

.flow-book {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 160px;
  transition: transform 0.2s ease;
}

.flow-book:hover {
  transform: translateY(-4px);
}

.flow-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--warm);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(26, 22, 18, 0.12);
}

.flow-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flow-title {
  font-family: 'Lora', serif;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
}

.flow-hint {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.flow-arrow--down {
  width: 2px;
  height: 2.5rem;
  background: var(--rule);
  margin: 0.6rem auto;
  position: relative;
}

.flow-arrow--down::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--rule);
}

.flow-fork {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0.6rem 0;
  position: relative;
  height: 2.5rem;
}

.flow-fork::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 0.8rem;
  background: var(--rule);
}

.flow-fork::after {
  content: '';
  position: absolute;
  top: 0.8rem;
  left: calc(50% - 81px);
  width: 162px;
  height: 2px;
  background: var(--rule);
}

.flow-fork-line {
  position: absolute;
  top: 0.8rem;
  width: 2px;
  height: calc(100% - 0.8rem);
  background: var(--rule);
}

.flow-fork-line--left {
  left: calc(50% - 81px);
}

.flow-fork-line--right {
  left: calc(50% + 79px);
}

.flow-fork-line--left::after,
.flow-fork-line--right::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--rule);
}

.signup-section,
.guide-callout,
.info-card {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease forwards 0.8s;
}

.signup-section {
  background: var(--warm);
  border-left: 3px solid var(--accent);
  padding: 2rem 2rem 2rem 1.8rem;
  margin: 3rem 0;
}

.signup-section h2,
.guide-callout h2,
.info-card h2,
.content-section h2 {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.signup-section p {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.form-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.form-row input[type="email"] {
  flex: 1 1 220px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-row input[type="email"]:focus {
  border-color: var(--accent);
}

.form-row input[type="email"]::placeholder {
  color: var(--rule);
}

.btn {
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  color: var(--paper);
  border: none;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:hover {
  background: #6e2e21;
}

.btn:active {
  transform: scale(0.98);
}

.form-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.8rem;
}

.form-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.signup-success {
  display: none;
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 1rem;
}

.guide-callout {
  background: linear-gradient(180deg, rgba(232, 223, 200, 0.55) 0%, rgba(232, 223, 200, 0.9) 100%);
  border: 1px solid var(--rule);
  padding: 1.8rem;
  margin: 3rem 0 2.5rem;
}

.guide-callout--soft {
  border-left: 3px solid var(--accent);
}

.guide-callout p,
.content-section p,
.info-card p {
  font-size: 0.98rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.guide-callout p:last-child,
.content-section p:last-child,
.info-card p:last-child {
  margin-bottom: 0;
}

.guide-note {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--accent);
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.content-section {
  margin: 2rem 0;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease forwards 0.45s;
}

.lead {
  font-family: 'Lora', serif;
  font-size: 1.12rem;
  color: var(--ink) !important;
}

.card-list {
  display: grid;
  gap: 1rem;
}

.info-card {
  background: rgba(232, 223, 200, 0.45);
  border: 1px solid var(--rule);
  padding: 1.3rem 1.4rem;
}

.amazon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease forwards 1s;
}

.amazon-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards 1.1s;
}

footer p,
footer a {
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

footer a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

footer a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  z-index: 100;
  font-size: 0.85rem;
  transform: translateY(100%);
  animation: slideUp 0.5s ease forwards 1.8s;
}

#cookie-banner p {
  max-width: 520px;
  line-height: 1.5;
}

#cookie-banner a {
  color: var(--warm);
}

.cookie-buttons {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-accept {
  padding: 0.5rem 1.2rem;
  background: var(--accent);
  color: var(--paper);
  border: none;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-decline {
  padding: 0.5rem 1.2rem;
  background: transparent;
  color: var(--warm);
  border: 1px solid var(--muted);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  to {
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .page {
    padding: 0 1.2rem;
  }

  .hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1rem;
  }

  .author-photo {
    width: 80px;
    height: 80px;
  }

  .banner {
    height: 150px;
  }

  .banner--short {
    height: 130px;
  }

  .flow-row--pair {
    gap: 1rem;
  }

  .flow-book {
    width: 130px;
  }

  .flow-fork::after {
    left: calc(50% - 66px);
    width: 132px;
  }

  .flow-fork-line--left {
    left: calc(50% - 66px);
  }

  .flow-fork-line--right {
    left: calc(50% + 64px);
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    gap: 0.9rem;
  }

  #cookie-banner {
    padding: 1rem 1.2rem;
  }
}

.portfolio {
  margin-top: 40px;
}

.portfolio-item {
  margin-top: 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 16px;
  background: #fff;
}

.portfolio-item summary {
  font-weight: 600;
  cursor: pointer;
}

.portfolio-content {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}