:root {
  --color-bg: #f4f8fc;
  --color-surface: #ffffff;
  --color-ink: #1c1c1c;
  --color-muted: #3a4654;
  --color-blue: #198fd9;
  --color-blue-deep: #0f6eab;
  --color-green: #65bc7b;
  --color-green-deep: #3f9a57;
  --color-line: #d5e2ee;
  --font-display: "Fraunces", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --shadow-soft: 0 18px 40px rgba(15, 70, 120, 0.12);
  --radius: 18px;
  --max: 1120px;
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--color-blue);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(25, 143, 217, 0.18), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(101, 188, 123, 0.16), transparent 55%),
    linear-gradient(180deg, #eef6fc 0%, var(--color-bg) 40%, #f7fbf8 100%);
  line-height: 1.6;
  min-height: 100vh;
}

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

a {
  color: var(--color-blue-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-blue);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--color-ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(213, 226, 238, 0.9);
}

.header-inner,
.section-inner,
.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 42px;
  height: 42px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--color-blue-deep);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--color-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 110, 171, 0.92), rgba(25, 143, 217, 0.88) 45%, rgba(63, 154, 87, 0.78)),
    url("../img/koko-prepare-noel.jpg") center / cover no-repeat;
  min-height: min(88vh, 720px);
  display: grid;
  align-items: end;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 40, 70, 0.15), rgba(8, 40, 70, 0.55) 55%, rgba(8, 40, 70, 0.78));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 5rem 0 4rem;
  animation: rise-in 700ms ease-out both;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  color: #fff;
}

.hero-brand img {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
}

.hero-brand span {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 560;
  line-height: 1.2;
}

.hero p {
  margin: 0 0 1.75rem;
  max-width: 42ch;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.92);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #fff;
  color: var(--color-blue-deep);
}

.btn-primary:hover {
  background: #f3fbff;
  color: var(--color-blue-deep);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-amazon {
  background: var(--color-green);
  color: #083018;
}

.btn-amazon:hover {
  background: var(--color-green-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-blue-deep);
  border: 1px solid var(--color-line);
}

.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 46rem;
}

.section-head h2,
.page-hero h1,
.book-layout h1,
.prose h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-head p,
.lede {
  margin: 0;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.page-hero {
  padding: 3rem 0 1rem;
}

.book-grid,
.author-grid,
.collection-grid {
  display: grid;
  gap: 1.5rem;
}

.book-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.author-grid,
.collection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-link,
.author-block,
.collection-block {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(213, 226, 238, 0.95);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  animation: fade-up 650ms ease both;
}

.book-link {
  display: grid;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.book-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(15, 70, 120, 0.16);
}

.book-link img,
.book-cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #e8f2fa;
}

.book-link .meta,
.author-block .meta,
.collection-block .meta {
  padding: 1.1rem 1.2rem 1.3rem;
}

.book-link h3,
.author-block h3,
.collection-block h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--color-blue-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.author-block {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
}

.author-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 160px;
}

.collection-block {
  padding: 1.35rem 1.4rem 1.5rem;
}

.collection-block ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 3rem;
}

.book-cover {
  position: sticky;
  top: 5.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #fff;
}

.prose {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

.prose h2 {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.contact-box {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.contact-box a {
  font-size: 1.2rem;
  font-weight: 700;
}

.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--color-blue-deep);
}

.marker-new-site {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-grid > *:nth-child(2),
.author-grid > *:nth-child(2),
.collection-grid > *:nth-child(2) {
  animation-delay: 80ms;
}

.book-grid > *:nth-child(3),
.author-grid > *:nth-child(3),
.collection-grid > *:nth-child(3) {
  animation-delay: 160ms;
}

@media (max-width: 900px) {
  .book-grid,
  .author-grid,
  .collection-grid,
  .book-layout {
    grid-template-columns: 1fr;
  }

  .author-block {
    grid-template-columns: 110px 1fr;
  }

  .book-cover {
    position: static;
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 4.2rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    min-width: 220px;
    padding: 0.8rem;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: #eef7fd;
  }

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

  .author-block img {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-inner,
  .book-link,
  .author-block,
  .collection-block,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}
