/* ===== SF Publishing House - Design System ===== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-sky: #87CEEB;
  --color-sky-light: #B8E4F9;
  --color-sky-dark: #5BA3C9;
  --color-gold: #E8960F;
  --color-gold-light: #FCEABB;
  --color-gold-dark: #C47E0D;
  --color-warm: #FDF6E3;
  --color-text: #2C3E50;
  --color-text-light: #5A6C7D;
  --color-white: #FFFFFF;
  --color-bg: #FEFCF8;
  --color-accent: #3DBDE6;
  --color-accent-dark: #2A9BC7;
  --color-red: #E74C3C;

  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: color var(--transition);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--color-warm);
}

.section__title {
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--color-text);
}

.section__subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.1rem;
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.75rem 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  font-family: 'Lobster', cursive;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--color-text);
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.nav__logo span {
  color: var(--color-accent);
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav__links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-light);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--color-accent);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-gold);
  color: #2C3E50;
  box-shadow: 0 4px 12px rgba(232, 150, 15, 0.3);
}

.btn--primary:hover {
  background: var(--color-gold-dark);
  color: #2C3E50;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
}

.btn--secondary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 12px rgba(61, 189, 230, 0.3);
}

.btn--secondary:hover {
  background: var(--color-accent-dark);
  color: white;
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text-light);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

/* --- Buy Links / Retailer Buttons --- */
.buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
}

.buy-link:hover {
  transform: translateY(-2px);
  color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.buy-link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.buy-link:active {
  transform: translateY(0);
}

.buy-link--amazon {
  background: #232F3E;
}

.buy-link--amazon:hover {
  background: #37475A;
}

.buy-link--bn {
  background: #2A5934;
}

.buy-link--bn:hover {
  background: #1E4226;
}

.buy-link--walmart {
  background: #0071DC;
}

.buy-link--walmart:hover {
  background: #005BB5;
}

/* --- Book Feature --- */
.book-feature {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
}

.book-feature__cover {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}

.book-feature__cover:hover {
  transform: rotate(-2deg) scale(1.02);
}

.book-feature__info h2 {
  margin-bottom: 1rem;
}

.book-feature__info p {
  color: var(--color-text-light);
}

/* --- Theme Cards --- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 1.5rem;
}

.theme-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.theme-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.theme-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.theme-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Illustration Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
}

.gallery__item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.gallery__item:hover {
  transform: scale(1.02);
}

.gallery__item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* --- Newsletter --- */
.newsletter {
  background: linear-gradient(135deg, var(--color-sky) 0%, var(--color-accent) 100%);
  padding: 3rem 0;
  text-align: center;
  color: white;
}

.newsletter h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.newsletter__form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0.5rem;
}

.newsletter__input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
}

.newsletter__input::placeholder {
  color: #999;
}

.newsletter__input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* --- Author Section --- */
.author {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.author__photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
  background: var(--color-sky-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--color-sky-dark);
  flex-shrink: 0;
}

.author__photo--initials {
  font-family: 'Lobster', cursive;
  font-size: 1.4rem;
  line-height: 1.3;
  text-align: center;
  color: white;
  background: linear-gradient(135deg, var(--color-sky) 0%, var(--color-accent) 100%);
}

/* --- Testimonials --- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
}

.testimonial::before {
  content: "\201C";
  font-size: 4rem;
  color: var(--color-sky-light);
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial__text {
  font-style: italic;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  padding-top: 1.5rem;
}

.testimonial__author {
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Footer --- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 1.5rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__brand {
  font-family: 'Lobster', cursive;
  font-weight: 400;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 0.75rem;
}

.footer__brand span {
  color: var(--color-accent);
}

.footer h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

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

.footer__contact {
  text-align: right;
}

.footer__contact-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.75rem;
}

.footer__contact-email {
  font-size: clamp(1.1rem, 2.5vw, 1.75rem) !important;
  font-weight: 800 !important;
  color: var(--color-accent) !important;
  display: inline-block !important;
  margin-bottom: 0 !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.footer__contact-email:hover {
  color: var(--color-gold) !important;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* --- 404 Page --- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--color-sky);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--color-text-light);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .book-feature {
    gap: 2rem;
  }

  .author {
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
  }

  .author__photo {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    box-shadow: var(--shadow);
  }

  .nav__links.active {
    display: flex;
  }

  .nav__links li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav__links li:last-child {
    border-bottom: none;
  }

  .nav__toggle {
    display: block;
  }

  .book-feature {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-feature__cover {
    max-width: 300px;
    margin: 0 auto;
  }

  .book-feature__info p {
    font-size: 0.95rem;
  }

  .author {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author__photo {
    margin: 0 auto;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 2.5rem 0;
  }

  .gallery__item img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .buy-links {
    flex-direction: column;
    align-items: stretch;
  }

  .buy-link {
    justify-content: center;
  }

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