:root {
  --bg: #17130f;
  --paper: #f2eadb;
  --paper-deep: #d8c8aa;
  --ink: #191714;
  --muted: #756a5a;
  --line: rgba(42, 31, 22, 0.18);
  --gold: #c9a45a;
  --white: #fffaf0;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(201, 164, 90, 0.16), transparent 28rem),
    linear-gradient(135deg, #211a14 0%, #120f0c 60%, #080706 100%);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
}

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

.app {
  overflow: hidden;
}

.hero,
.notebook-section,
.photos-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 48px;
  padding: 48px 0 64px;
}

.section-label {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.96;
  font-weight: 700;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 7.4vw, 92px);
}

h2 {
  color: var(--paper);
  font-size: clamp(34px, 5vw, 62px);
}

.lead,
.section-head p:not(.section-label) {
  color: rgba(255, 250, 240, 0.78);
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

.lead {
  max-width: 620px;
  margin: 24px 0 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 6px;
  padding: 0 20px;
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.button--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #211a14;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.portrait-frame {
  position: relative;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.1), rgba(255, 250, 240, 0.02));
  box-shadow: var(--shadow);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}

.notebook-section,
.photos-section {
  padding: 56px 0 88px;
}

.section-head {
  max-width: 820px;
  margin-bottom: 30px;
}

.book-shell {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 18px;
}

.book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 18px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(55, 38, 21, 0.42) 50%, transparent calc(50% + 1px)),
    linear-gradient(135deg, #7a5a32, #332416);
  box-shadow: var(--shadow);
}

.book.is-turning .page--right {
  transform: rotateY(-8deg);
}

.page {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  box-shadow: inset 0 0 36px rgba(80, 48, 18, 0.14);
  transition: transform 260ms ease;
}

.page--left {
  border-radius: 6px 0 0 6px;
  transform-origin: right center;
}

.page--right {
  border-radius: 0 6px 6px 0;
  transform-origin: left center;
}

.page img {
  width: 100%;
  height: min(72vh, 760px);
  object-fit: contain;
}

.nav-button {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.08);
  color: var(--white);
  cursor: pointer;
  font-size: 42px;
  line-height: 1;
}

.nav-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.book-status {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  color: rgba(255, 250, 240, 0.74);
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.progress {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.12);
}

.progress span {
  display: block;
  width: 10%;
  height: 100%;
  background: var(--gold);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.photo-card {
  overflow: hidden;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.05);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .portrait-frame {
    max-width: 420px;
  }

  .book-shell {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .book {
    padding: 10px;
  }

  .page {
    min-height: 340px;
  }

  .page img {
    height: 58vh;
  }

  .nav-button {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

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

@media (max-width: 540px) {
  .hero,
  .notebook-section,
  .photos-section {
    width: min(100% - 20px, 1180px);
  }

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

  .page--left {
    display: none;
  }

  .page--right {
    border-radius: 6px;
  }

  .book-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress {
    width: 100%;
  }
}
