@font-face {
  font-family: "Yeseva One";
  src: url("/assets/fonts/YesevaOne.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --cream: #f6e4b8;
  --cream-deep: #edd296;
  --paper: #fdf6e3;
  --red: #a8232b;
  --red-dark: #7e1820;
  --brown: #6b3f22;
  --brown-soft: #8b5a36;
  --ink: #3b2414;
  --muted: #7a5a40;
  --line: rgba(107, 63, 34, 0.18);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--red);
}

a:hover {
  color: var(--red-dark);
}

h1,
h2,
h3 {
  font-family: "Yeseva One", Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  color: var(--brown);
  margin: 0 0 0.5em;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.header {
  border-bottom: 1px solid var(--line);
}

.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brown);
  text-decoration: none;
  font-family: "Yeseva One", Georgia, serif;
  font-size: 20px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 15px;
}

.nav a {
  color: var(--brown-soft);
  text-decoration: none;
}

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

.langs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--cream-deep);
}

.langs a {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.langs a[aria-current="true"] {
  background: var(--paper);
  color: var(--red);
}

.hero {
  padding: 64px 0 56px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 68px);
  margin-bottom: 18px;
}

.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  transition: transform 0.15s ease;
}

.store-btn:hover {
  color: #fff;
  transform: translateY(-2px);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.hero-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 400px;
  width: 100%;
  justify-self: center;
}

.hero-art .icon {
  position: absolute;
  inset: 18%;
  width: 64%;
  border-radius: 22%;
  box-shadow: 0 24px 48px rgba(107, 63, 34, 0.28);
}

.hero-art .tile {
  position: absolute;
  width: 22%;
  filter: drop-shadow(0 8px 12px rgba(107, 63, 34, 0.25));
}

.tile.t1 { top: 0; left: 4%; transform: rotate(-12deg); }
.tile.t2 { top: 2%; right: 2%; transform: rotate(10deg); }
.tile.t3 { bottom: 4%; left: 0; transform: rotate(8deg); }
.tile.t4 { bottom: 0; right: 6%; transform: rotate(-8deg); }

.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(28px, 4.5vw, 40px);
}

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

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.section.alt .card {
  background: var(--cream);
}

.card img {
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 6px;
}

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

.chapters {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ch;
}

.chapters li {
  counter-increment: ch;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
  color: var(--brown);
}

.chapters li::before {
  content: counter(ch);
  display: block;
  font-family: "Yeseva One", Georgia, serif;
  font-size: 26px;
  color: var(--red);
  line-height: 1.1;
}

.cta {
  text-align: center;
}

.cta p {
  color: var(--muted);
  margin: 0 auto 24px;
  max-width: 32em;
}

.doc {
  padding: 48px 0 64px;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(34px, 6vw, 52px);
}

.doc h2 {
  font-size: 26px;
  margin-top: 1.8em;
}

.doc .meta {
  color: var(--muted);
  margin-top: -6px;
}

.doc li {
  margin-bottom: 6px;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}

.contact strong {
  display: block;
  font-size: 19px;
  word-break: break-all;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.btn:hover {
  background: var(--red-dark);
  color: #fff;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--brown);
}

details p {
  margin: 10px 0 0;
}

.credits h2 {
  font-size: 26px;
}

.credits ul {
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.credits li {
  margin-bottom: 6px;
}

.credits li span,
.credits p {
  color: var(--muted);
  font-size: 15px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 14px;
  color: var(--muted);
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
}

@media (max-width: 820px) {
  .hero {
    padding: 40px 0;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-art {
    max-width: 300px;
    order: -1;
  }

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

  .chapters {
    grid-template-columns: repeat(2, 1fr);
  }
}
