:root {
  --page-bg: #ffffff;
  --ink: #1e3322;
  --muted: #6b7b6b;
  --hero-bg: #162447;
  --hero-ink: #f8fafc;
  --hero-muted: #cbd5e1;
  --hero-accent: #c7d2fe;
  --gold: #d4a020;
  --green: #2d6b3f;
  --stone: #c8c0ad;
  --line: #f4f5f5;
  --book-bg: #f7f7f2;
  --book-stroke: #dcddd6;
  --testimonial-bg: #eef3ff;
  --testimonial-stroke: #dde4f5;
  --avatar-soft: #d8dfee;
  --avatar-mid: #c9d4eb;
  --avatar-strong: #9fb3db;
  --container: 1280px;
  --radius-lg: 20px;
  --shadow-soft: 0 24px 80px rgba(14, 27, 43, 0.08);
  --hero-side-margin: clamp(24px, 6vw, 100px);
}

@font-face {
  font-family: "Beth Ellen";
  src: url("./assets/BethEllen-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top center, rgba(238, 243, 255, 0.58), transparent 28%),
    linear-gradient(180deg, #fefefe 0%, #fcfcfb 100%);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

.masthead .container {
  width: min(calc(100% - (var(--hero-side-margin) * 2)), 1920px);
}

.stack-xl {
  display: grid;
  gap: 48px;
}

.masthead {
  padding: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 36px 0 0;
}

.brand {
  font-family: "Beth Ellen", cursive;
  font-size: clamp(2rem, 2.4vw, 2.75rem);
  font-weight: 400;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.site-nav a,
.eyebrow,
.book-label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a.is-active {
  color: var(--green);
}

.divider {
  height: 1px;
  background: var(--line);
  width: min(100%, var(--container));
  margin: 0 auto;
}

.hero {
  position: relative;
  width: 100%;
  border-radius: 6px;
  background:
    radial-gradient(circle at 85% 18%, rgba(199, 210, 254, 0.1), transparent 20%),
    linear-gradient(180deg, #1a2a55 0%, var(--hero-bg) 100%);
  padding: 10px 64px;
  color: var(--hero-ink);
  overflow: visible;
  transition: background 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero.theme-catechism {
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 210, 124, 0.16), transparent 20%),
    linear-gradient(180deg, #6f3a19 0%, #42210f 100%);
}

.hero.theme-curls {
  background:
    radial-gradient(circle at 84% 18%, rgba(228, 221, 117, 0.14), transparent 22%),
    linear-gradient(180deg, #5f6c33 0%, #3d4625 100%);
}

.hero.theme-beautiful {
  background:
    radial-gradient(circle at 82% 16%, rgba(246, 207, 140, 0.12), transparent 18%),
    linear-gradient(180deg, #4f6983 0%, #33485d 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.22)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  background-size: auto, 180px 180px;
  mix-blend-mode: overlay;
  filter: contrast(320%) brightness(132%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.carousel {
  position: relative;
  min-height: 620px;
  isolation: isolate;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 387px;
  align-items: center;
  gap: 56px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity, transform;
  transform: translate3d(36px, 0, 0);
  transition:
    opacity 640ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 640ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 560ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.carousel-slide.is-exiting {
  visibility: visible;
}

.carousel-slide.is-before {
  transform: translate3d(-36px, 0, 0);
}

.carousel-slide.is-after {
  transform: translate3d(36px, 0, 0);
}

.carousel-slide.is-active .hero-copy > *,
.carousel-slide.is-active .book-card > * {
  opacity: 1;
}

.hero-copy > *,
.book-card > * {
  opacity: 0;
  transition: opacity 420ms ease;
}

.carousel-slide.is-active .hero-copy > *:nth-child(1),
.carousel-slide.is-active .book-card > *:nth-child(1) {
  transition-delay: 80ms;
}

.carousel-slide.is-active .hero-copy > *:nth-child(2),
.carousel-slide.is-active .book-card > *:nth-child(2) {
  transition-delay: 130ms;
}

.carousel-slide.is-active .hero-copy > *:nth-child(3),
.carousel-slide.is-active .book-card > *:nth-child(3) {
  transition-delay: 180ms;
}

.carousel-slide.is-active .hero-copy > *:nth-child(4),
.carousel-slide.is-active .book-card > *:nth-child(4) {
  transition-delay: 230ms;
}

.carousel-slide.is-active .hero-copy > *:nth-child(5),
.carousel-slide.is-active .book-card > *:nth-child(5) {
  transition-delay: 280ms;
}

.hero-eyebrow {
  color: var(--hero-accent);
  margin: 0 0 64px;
  font-size: 0.875rem;
}

.hero-copy {
  padding-top: 28px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font-family: "Newsreader", serif;
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  line-height: 1.12;
  font-weight: 400;
}

.hero-summary {
  max-width: 643px;
  margin: 24px 0 0;
  color: rgba(248, 250, 252, 0.88);
  font-size: 1.125rem;
  line-height: 1.6;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 34px;
  padding-top: 8px;
}

.hero-links a,
.archive-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 600;
}

.hero-links a {
  padding: 14px 20px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.hero-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(248, 250, 252, 0.38);
  transform: translateY(-1px);
}

.button-chevron {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.hero-links a.is-muted {
  color: #e2e8f0;
  font-weight: 400;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dot-gold {
  background: var(--gold);
}

.dot-green {
  background: var(--green);
}

.dot-stone {
  background: var(--stone);
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 6px;
}

.hero-rating-stars {
  position: relative;
  display: inline-block;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: 0.08em;
}

.hero-rating-stars::before,
.hero-rating-stars::after {
  content: "★★★★★";
}

.hero-rating-stars::before {
  color: rgba(246, 196, 69, 0.28);
}

.hero-rating-stars::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc((var(--rating) / 5) * 100%);
  overflow: hidden;
  white-space: nowrap;
  color: #f6c445;
}

.hero-rating p {
  margin: 0;
  color: var(--hero-accent);
  font-size: 1.125rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 468px;
  background: var(--book-bg);
  padding: 28px 24px;
  border: 1px solid var(--book-stroke);
  border-radius: 3px;
  box-shadow:
    0 28px 64px rgba(8, 15, 32, 0.22),
    0 10px 24px rgba(8, 15, 32, 0.16);
  color: var(--ink);
}

.book-card--image {
  position: relative;
  display: block;
  min-height: auto;
  padding: 0;
  overflow: hidden;
  background: transparent;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition:
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.book-card--image::before {
  content: "";
  position: absolute;
  top: 2%;
  right: -10px;
  width: 14px;
  height: 96%;
  border-radius: 0 3px 3px 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(238, 232, 219, 0.92) 14%,
      rgba(248, 244, 236, 0.98) 28%,
      rgba(228, 220, 204, 0.92) 46%,
      rgba(249, 246, 240, 0.98) 62%,
      rgba(227, 220, 206, 0.92) 78%,
      rgba(255, 252, 246, 0.98) 100%
    );
  box-shadow:
    inset 1px 0 0 rgba(120, 92, 58, 0.18),
    4px 0 10px rgba(8, 15, 32, 0.12);
  opacity: 0;
  transform: translateZ(-1px);
  transition:
    opacity 260ms ease,
    right 380ms cubic-bezier(0.16, 1, 0.3, 1),
    width 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.book-cover-image {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: left center;
  transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.book-card--image:hover {
  transform: perspective(1400px) rotateY(-10deg) rotateX(1deg);
  box-shadow:
    0 34px 72px rgba(8, 15, 32, 0.28),
    18px 10px 26px rgba(8, 15, 32, 0.16);
}

.book-card--image:hover::before {
  right: -12px;
  width: 18px;
  opacity: 1;
}

.book-card--image:hover .book-cover-image {
  transform: translateZ(4px);
}

.book-label {
  color: var(--muted);
  margin: 0;
  font-size: 0.75rem;
}

.book-card-copy {
  display: grid;
  gap: 10px;
}

.book-card-copy h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: 2.875rem;
  line-height: 1.12;
  font-weight: 400;
}

.book-card-copy p,
.book-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.book-meta {
  display: grid;
  gap: 8px;
}

.book-meta strong {
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  line-height: 1.1;
  font-weight: 400;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 0 8px;
}

.control-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid #00d5ff;
  border-radius: 999px;
  background: #162447;
  color: #00d5ff;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
  z-index: 3;
}

.control-button:hover {
  background: #1d2d5e;
  border-color: #00d5ff;
}

.control-button:focus-visible {
  outline: 2px solid rgba(199, 210, 254, 0.9);
  outline-offset: 3px;
}

.control-button:active {
  transform: translateY(calc(-50% + 1px));
}

.control-button-light {
  color: #00d5ff;
  border-color: #00d5ff;
}

.control-button[data-prev] {
  left: -64px;
  translate: -50% 0;
}

.control-button[data-next] {
  right: -64px;
  translate: 50% 0;
}

.control-button-light:hover {
  border-color: #00d5ff;
}

.chevron {
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.chevron-left {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.chevron-right {
  transform: rotate(45deg);
  margin-right: 4px;
}

.control-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  transform: scale(0.8);
  transform-origin: center center;
}

.control-dot {
  position: relative;
  overflow: hidden;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #6d7ea8;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.control-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.3);
  transform: scaleX(0);
  transform-origin: left center;
}

.control-dot.is-active {
  width: 14px;
  height: 14px;
  background: var(--gold);
}

.control-dot.is-active.is-counting::after {
  animation: dot-progress var(--dot-duration, 5000ms) linear forwards;
}

.author-section {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: stretch;
  padding: 96px 64px 96px;
}

.author-portrait-wrap {
  min-height: 640px;
  overflow: hidden;
  background: #d8ddd7;
}

.author-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.author-copy {
  display: grid;
  align-content: center;
  gap: 36px;
  padding: 88px 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
}

.author-copy h2 {
  margin: 0;
  font-family: "Beth Ellen", cursive;
  font-size: clamp(2.875rem, 4vw, 3.25rem);
  line-height: 1.1;
  font-weight: 400;
}

.portfolio-section h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(2.875rem, 4vw, 3.25rem);
  line-height: 1.1;
  font-weight: 400;
}

.author-bio,
.portfolio-intro {
  margin: 0;
  max-width: 35rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.65;
}

.stats-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 20px;
}

.stats-row div {
  display: grid;
  gap: 4px;
}

.stats-row strong {
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
}

.stats-row span {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.testimonial-section {
  padding: 32px 0 0;
  height: 550px;
  background: linear-gradient(180deg, transparent 0%, var(--testimonial-bg) 0%);
}

.testimonial-card {
  display: grid;
  justify-items: center;
  gap: 34px;
  min-height: 640px;
  padding: 84px 88px 96px;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.testimonial-card blockquote {
  max-width: 940px;
  margin: 0;
  color: var(--ink);
  font-family: "Newsreader", serif;
  font-size: clamp(1.7rem, 2.72vw, 2.55rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.28;
  transition:
    opacity 320ms ease,
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-meta {
  display: grid;
  gap: 0;
  height: 73px;
  margin-top: -52px;
  transition:
    opacity 320ms ease,
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card.is-transitioning blockquote,
.testimonial-card.is-transitioning .testimonial-meta {
  opacity: 0;
  transform: translateY(10px);
}

.testimonial-meta strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  margin: 0;
  margin-bottom: -8px;
}

.testimonial-meta span {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  margin: 0;
  margin-top: -8px;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 70px;
  margin-top: 18px;
}

.avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.82;
  transform: scale(1);
  transition:
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease,
    box-shadow 220ms ease;
}

.avatar-button.is-active {
  width: 56px;
  height: 56px;
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(159, 179, 219, 0.3);
}

.avatar-button:focus-visible {
  outline: 2px solid rgba(122, 143, 191, 0.9);
  outline-offset: 4px;
}

.avatar-button:hover {
  transform: scale(1.06);
}

.avatar-image {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  filter: saturate(0.9);
  transition: width 220ms ease, height 220ms ease;
}

.avatar-button.is-active .avatar-image {
  width: 56px;
  height: 56px;
}

.portfolio-section {
  padding: 96px 0;
  background: #ffffff;
}

.portfolio-section h2 {
  margin-top: 14px;
}

.portfolio-intro {
  margin-top: 14px;
  font-size: 1.125rem;
  line-height: 1.6;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.portfolio-card {
  display: grid;
  gap: 12px;
}

.portfolio-media {
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  aspect-ratio: 1.26 / 1;
  object-fit: cover;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-image {
  cursor: zoom-in;
}

.portfolio-card:hover .portfolio-image {
  transform: scale(1.06);
}

.portfolio-card h3 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  line-height: 1.1;
  font-weight: 400;
}

.archive-link {
  margin-top: 16px;
  color: var(--green);
  font-size: 1rem;
}

.site-footer {
  padding: 100px 0;
  background: #2f3136;
  color: rgba(248, 250, 252, 0.92);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
}

.footer-brand {
  font-family: "Beth Ellen", cursive;
  font-size: clamp(2rem, 2.4vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.footer-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: 1px solid rgba(248, 250, 252, 0.28);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.06);
  color: rgba(248, 250, 252, 0.96);
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.footer-contact-button:hover {
  background: rgba(248, 250, 252, 0.12);
  border-color: rgba(248, 250, 252, 0.48);
  transform: translateY(-1px);
}

.footer-contact-button:focus-visible {
  outline: 2px solid rgba(248, 250, 252, 0.9);
  outline-offset: 3px;
}

.footer-divider {
  height: 1px;
  background: rgba(248, 250, 252, 0.18);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 100px;
}

.footer-bottom p {
  margin: 0;
  color: rgba(248, 250, 252, 0.68);
  font-size: 0.9rem;
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: rgba(248, 250, 252, 0.78);
}

.footer-instagram svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.footer-instagram-dot {
  fill: currentColor;
  stroke: none;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 30, 0.72);
  backdrop-filter: blur(8px);
}

.contact-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 620px);
  margin: 72px auto;
  padding: 36px;
  border: 1px solid rgba(30, 51, 34, 0.08);
  border-radius: 22px;
  background: #fcfbf8;
  box-shadow:
    0 34px 90px rgba(8, 15, 32, 0.2),
    0 10px 28px rgba(8, 15, 32, 0.1);
}

.contact-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(30, 51, 34, 0.06);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.contact-modal-header {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.contact-modal-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-modal-header h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1;
  font-weight: 400;
}

.contact-modal-copy {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-field {
  display: grid;
  gap: 8px;
}

.contact-field span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(30, 51, 34, 0.14);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 14px 16px;
  font: inherit;
}

.contact-field textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid rgba(45, 107, 63, 0.18);
  border-color: rgba(45, 107, 63, 0.38);
}

.contact-turnstile {
  display: grid;
  gap: 10px;
}

.contact-turnstile-label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.contact-turnstile-widget {
  min-height: 66px;
}

.contact-turnstile-widget iframe {
  border-radius: 14px;
}

.contact-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  background: #2d6b3f;
  color: #f8fafc;
  cursor: pointer;
  font-weight: 600;
}

.contact-submit-button:hover {
  background: #245734;
}

.contact-form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes dot-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide,
  .hero-copy > *,
  .book-card > *,
  .control-dot,
  .control-dot::after {
    animation: none !important;
    transition: none !important;
  }
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 30, 0.82);
  backdrop-filter: blur(6px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: min(calc(100% - 32px), 1180px);
  height: 100%;
  margin: 0 auto;
}

.lightbox-figure {
  margin: 0;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: min(78vh, 920px);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-caption {
  color: rgba(248, 250, 252, 0.92);
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  line-height: 1.1;
}

.lightbox-nav,
.lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 250, 252, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lightbox-nav {
  width: 54px;
  height: 54px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 0;
  width: 42px;
  height: 42px;
  font-size: 1.75rem;
  line-height: 1;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(248, 250, 252, 0.55);
}

.lightbox-nav:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.lightbox-nav:active,
.lightbox-close:active {
  transform: translateY(1px);
}

@media (max-width: 1100px) {
  .hero {
    padding: 44px 40px 28px;
  }

  .carousel {
    min-height: 520px;
  }

  .carousel-slide {
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 36px;
  }

  .book-card {
    max-width: 288px;
  }

  .hero-controls {
    padding-top: 30px;
  }

  .author-section {
    grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1fr);
    gap: 40px;
    padding: 72px 40px 0;
  }

  .author-portrait-wrap {
    min-height: 420px;
  }

  .control-button[data-prev] {
    left: -40px;
  }

  .control-button[data-next] {
    right: -40px;
  }
}

@media (max-width: 900px) {
  .carousel-slide {
    grid-template-columns: minmax(0, 1fr) 224px;
    gap: 28px;
  }

  .book-card {
    max-width: 224px;
  }

  .author-section {
    grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1fr);
    gap: 28px;
  }

  .author-portrait-wrap {
    min-height: 340px;
  }
}

@media (max-width: 820px) {
  .carousel-slide {
    grid-template-columns: 1fr;
  }

  .book-card {
    max-width: 484px;
  }

  .author-section {
    grid-template-columns: 1fr;
  }

  .author-portrait-wrap {
    min-height: 520px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .masthead {
    padding: 20px 0 56px;
  }

  .site-header {
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
  }

  .site-nav {
    justify-content: center;
    gap: 18px;
  }

  .divider {
    display: none;
  }

  .hero {
    padding: 40px 20px 32px;
    overflow: visible;
  }

  .carousel {
    min-height: 980px;
  }

  .carousel-slide {
    align-content: start;
  }

  .book-card {
    margin-bottom: -60px;
  }

  .hero-links a,
  .archive-link {
    font-size: 1rem;
  }

  .hero-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .control-button[data-prev] {
    left: -20px;
  }

  .control-button[data-next] {
    right: -20px;
  }

  .author-section {
    gap: 28px;
    padding: 76px 20px 0;
  }

  .author-copy {
    gap: 24px;
    padding: 0;
  }

  .author-portrait-wrap {
    min-height: 360px;
  }

  .testimonial-section {
    padding: 24px 0 56px;
  }

  .testimonial-card {
    min-height: auto;
    gap: 32px;
    padding: 40px 20px 44px;
  }

  .testimonial-meta {
    margin-top: 40px;
  }

  .testimonial-meta span {
    font-size: 1rem;
  }

  .portfolio-section {
    padding: 56px 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    padding-bottom: 62px;
  }

  .footer-brand {
    padding-bottom: 20px;
  }

  .footer-actions {
    align-items: center;
    flex-direction: column;
    gap: 0;
  }

  .footer-links {
    gap: 18px;
  }

  .footer-bottom {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    padding-top: 50px;
    width: 100%;
  }

  .contact-modal-dialog {
    width: min(calc(100% - 20px), 620px);
    margin: 24px auto;
    padding: 28px 20px;
  }

  .lightbox-dialog {
    grid-template-columns: 1fr;
    gap: 16px;
    width: min(calc(100% - 20px), 1180px);
    align-content: center;
    padding: 72px 0 24px;
  }

  .lightbox-figure {
    order: 1;
  }

  .lightbox-nav-left,
  .lightbox-nav-right {
    position: fixed;
    bottom: 24px;
  }

  .lightbox-nav-left {
    left: 20px;
  }

  .lightbox-nav-right {
    right: 20px;
  }

  .lightbox-image {
    max-height: 70vh;
  }
}
