/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #3d2e1f;
  background-color: #f5f0e8;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === Typography === */
h1, h2, h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.2;
}

/* === Layout === */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 600px;
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  background-color: #f5f0e8;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-icon {
  display: block;
  margin: 0 auto 16px;
}

.hero h1 {
  font-size: clamp(2rem, 8vw, 3.5rem);
  color: #3d2e1f;
  margin-bottom: 8px;
}

.hero-divider {
  width: 48px;
  height: 2px;
  background: #c4a87c;
  margin: 16px auto;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: #5a4a3a;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: #3d2e1f;
  color: #f5f0e8;
}

.btn-primary:hover {
  background-color: #52402e;
}

.btn-full {
  display: block;
  width: 100%;
  text-align: center;
}

/* === Sections === */
.section {
  padding: 56px 0;
}

.section-alt {
  background-color: #ebe3d5;
}

.section-label {
  display: block;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #a08060;
  margin-bottom: 16px;
}

.survey-divider {
  border-top: 1px solid #d4c9b8;
  margin-top: 28px;
  padding-top: 28px;
  margin-bottom: 24px;
}

.survey-subtitle {
  color: #b09880;
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 32px;
}

#survey {
  margin-top: 0;
  padding-top: 48px;
}

/* === Fade-in animation === */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Books === */
.books-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.books-scroll::-webkit-scrollbar {
  height: 4px;
}

.books-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.books-scroll::-webkit-scrollbar-thumb {
  background: #c4a87c;
  border-radius: 2px;
}

.book-card {
  flex: 0 0 auto;
  width: 140px;
  text-align: center;
  scroll-snap-align: start;
}

.book-card img {
  width: 140px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(61, 46, 31, 0.15);
}

.book-card .book-title {
  font-size: 0.75rem;
  color: #5a4a3a;
  margin-top: 8px;
  line-height: 1.3;
}

.book-card .book-author {
  font-size: 0.65rem;
  color: #a08060;
  margin-top: 2px;
}

/* === Map === */
.map-image {
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.location-text {
  font-size: 0.95rem;
  color: #7a6652;
}

/* === Form === */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  color: #3d2e1f;
  margin-bottom: 6px;
  font-weight: 500;
  transition: transform 0.2s, color 0.2s;
}

.form-group:focus-within label {
  transform: translateY(-2px);
  color: #5a4a3a;
}

.form-group .optional {
  font-weight: 400;
  color: #a08060;
  font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d4c9b8;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #faf8f4;
  color: #3d2e1f;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c4a87c;
  box-shadow: 0 0 0 3px rgba(196, 168, 124, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: #a08060;
  margin-top: 4px;
}

.form-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
}

.form-success {
  text-align: center;
  padding: 48px 24px;
}

.form-success h2 {
  font-size: 1.8rem;
  color: #3d2e1f;
  margin-bottom: 8px;
}

.form-success p {
  font-size: 1.1rem;
  color: #7a6652;
}

/* === Desktop === */
@media (min-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .book-card {
    width: 160px;
  }

  .book-card img {
    width: 160px;
    height: 230px;
  }
}

/* === Footer === */
.site-footer {
  background-color: #3d2e1f;
  padding: 24px 0;
  padding-bottom: 80px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-name {
  color: #f5f0e8;
  font-family: Georgia, 'Times New Roman', serif;
}

.footer-sep {
  color: #7a6652;
  margin: 0 8px;
}

.footer-contact {
  color: #c4a87c;
  text-decoration: none;
}

.footer-contact:hover {
  color: #f5f0e8;
}
