/* ==========================================================================
   Responsive Styles
   Breakpoints: 1200px | 992px | 768px | 480px
   ========================================================================== */

/* --- Large Desktop (max 1200px) --- */
@media (max-width: 1200px) {
  .hero__book-img {
    max-width: 340px;
  }

  .amazon-rating__icon {
    font-size: 5rem;
  }
}

/* --- Tablet Landscape / Small Desktop (max 992px) --- */
@media (max-width: 992px) {
  :root {
    --header-height: 64px;
  }

  .section {
    padding: var(--section-padding-y-compact) 0;
  }

  .section__header {
    margin-bottom: var(--space-xl);
  }

  /* Header Mobile */
  .header {
    display: flex;
    align-items: center;
    height: auto;
    min-height: var(--header-height);
  }

  .header__inner {
    height: auto;
    min-height: var(--header-height);
    align-items: center;
    width: 100%;
  }

  .header__toggle {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .header__nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 999;
    height: calc(100dvh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0 var(--space-lg) var(--space-lg);
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow: hidden;
    box-sizing: border-box;
  }

  .header__nav.is-open {
    transform: translateX(0);
  }

  .header__nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    flex-shrink: 1;
  }

  .header__nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--color-border-light);
  }

  .header__nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  .header__cta {
    width: 100%;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Hero */
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2xl);
  }

  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__benefits {
    align-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__trust {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
  }

  .hero__book-img {
    max-width: 280px;
  }

  /* About Book */
  .about-book__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-book__visual {
    order: -1;
  }

  .about-book__meta {
    text-align: left;
  }

  .about-book__content .btn {
    display: inline-flex;
  }

  /* Author */
  .author__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author__photo-wrapper {
    order: -1;
  }

  .author__social {
    justify-content: center;
  }

  /* Amazon Rating */
  .amazon-rating__card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .amazon-rating__text {
    margin-left: auto;
    margin-right: auto;
  }

  .amazon-rating__visual {
    display: none;
  }

  /* CTA Final */
  .cta-final__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta-final__visual {
    order: -1;
  }

  .cta-final__text {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-final__guarantee {
    justify-content: center;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* --- Tablet Portrait (max 768px) --- */
@media (max-width: 768px) {
  :root {
    --section-padding-y: 2.75rem;
    --section-padding-y-compact: 2.25rem;
    --section-header-gap: 1.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .section__header {
    margin-bottom: var(--section-header-gap);
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--header-height) + var(--space-md));
    padding-bottom: var(--section-padding-y-compact);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__trust {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  /* Problem */
  .problem__solution-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: var(--space-xl);
  }

  .problem__solution-body {
    text-align: center;
  }

  /* Benefits */
  .benefits__grid {
    grid-template-columns: 1fr;
  }

  /* About Book Meta */
  .about-book__meta {
    grid-template-columns: 1fr;
  }

  /* Learn */
  .learn__list {
    grid-template-columns: 1fr;
  }

  /* Audience */
  .audience__grid {
    grid-template-columns: 1fr;
  }

  /* Testimonials */
  .testimonial-card__inner {
    padding: var(--space-xl);
  }

  /* Amazon Rating */
  .amazon-rating__card {
    padding: var(--space-2xl);
  }

  .amazon-rating__number {
    font-size: 2.75rem;
  }

  /* CTA Mid */
  .cta-mid__inner .btn {
    width: 100%;
  }

  /* CTA Final */
  .cta-final__inner {
    padding: var(--space-2xl);
  }

  .cta-final__inner .btn {
    width: 100%;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__tagline {
    margin: 0 auto;
  }

  .footer__social {
    justify-content: center;
  }

  /* Typography - Tablet/Mobile */
  body {
    font-size: 0.9375rem;
  }

  .section__title {
    font-size: clamp(1.5rem, 4.8vw, 2rem);
  }

  .section__subtitle {
    font-size: 0.9375rem;
  }

  .section__label {
    font-size: 0.75rem;
  }

  .hero__title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
  }

  .hero__subtitle {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
  }

  .hero__description {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
  }

  .hero__benefits li {
    font-size: 0.8125rem;
    color: var(--color-text-light);
  }

  .hero__benefits li i {
    font-size: 0.75rem;
  }

  .hero__trust-item {
    font-size: 0.75rem;
  }

  .problem__item-text {
    font-size: 0.9375rem;
  }

  .problem__solution-text {
    font-size: 1rem;
  }

  .benefit-card__title {
    font-size: 1rem;
  }

  .benefit-card__text {
    font-size: 0.875rem;
  }

  .about-book__description {
    font-size: 0.9375rem;
  }

  .about-book__meta dd {
    font-size: 0.875rem;
  }

  .learn__item {
    font-size: 0.875rem;
  }

  .audience__list li {
    font-size: 0.875rem;
  }

  .audience__card-header h3 {
    font-size: 1.125rem;
  }

  .author__name {
    font-size: 1.5rem;
  }

  .author__bio {
    font-size: 0.9375rem;
  }

  .testimonial-card__text {
    font-size: 0.9375rem;
  }

  .amazon-rating__text {
    font-size: 0.9375rem;
  }

  .cta-mid__title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .cta-mid__text {
    font-size: 1rem;
  }

  .cta-final__title {
    font-size: clamp(1.375rem, 4.5vw, 1.75rem);
  }

  .cta-final__text {
    font-size: 0.9375rem;
  }

  .faq__question {
    font-size: 0.9375rem;
  }

  .faq__answer-inner {
    font-size: 0.875rem;
  }

  .footer__tagline,
  .footer__nav-list a {
    font-size: 0.8125rem;
  }
}

/* --- Mobile (max 480px) --- */
@media (max-width: 480px) {
  :root {
    --header-height: 60px;
    --section-padding-y: 2.25rem;
    --section-padding-y-compact: 2rem;
    --section-header-gap: 1.25rem;
  }

  .header__nav {
    padding: 0 var(--space-md) var(--space-md);
    gap: var(--space-sm);
  }

  .header__nav-link {
    padding: 0.625rem 0;
    font-size: 0.9375rem;
  }

  .btn--lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .btn--xl {
    padding: 1rem 1.75rem;
    font-size: 1rem;
  }

  .hero__book-img {
    max-width: 220px;
  }

  .hero__decor {
    display: none;
  }

  .hero__digital-badge {
    top: -8px;
    right: -8px;
    font-size: 0.6875rem;
    padding: 0.375rem 0.625rem;
  }

  .hero__badge {
    font-size: 0.75rem;
  }

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

  .problem__item {
    padding: var(--space-lg);
  }

  .benefit-card {
    padding: var(--space-xl);
  }

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

  .amazon-rating__number {
    font-size: 2.25rem;
  }

  .cta-final__img {
    max-width: 160px;
  }

  .back-to-top {
    bottom: var(--space-md);
    right: var(--space-md);
    width: 44px;
    height: 44px;
  }

  .faq__question {
    font-size: 0.875rem;
    padding: var(--space-lg) 0;
  }

  /* Typography - Small Mobile */
  body {
    font-size: 0.875rem;
  }

  .section__title {
    font-size: clamp(1.375rem, 5.5vw, 1.625rem);
  }

  .section__subtitle {
    font-size: 0.875rem;
  }

  .hero__title {
    font-size: clamp(1.5rem, 7vw, 1.875rem);
  }

  .hero__subtitle {
    font-size: 0.9375rem;
  }

  .hero__description {
    font-size: 0.8125rem;
  }

  .hero__benefits li {
    font-size: 0.75rem;
  }

  .problem__item-text,
  .about-book__description,
  .author__bio,
  .testimonial-card__text,
  .amazon-rating__text,
  .cta-mid__text,
  .cta-final__text {
    font-size: 0.8125rem;
  }

  .benefit-card__title {
    font-size: 0.9375rem;
  }

  .benefit-card__text,
  .learn__item,
  .audience__list li,
  .faq__answer-inner {
    font-size: 0.8125rem;
  }

  .problem__solution-text {
    font-size: 0.9375rem;
  }

  .author__name {
    font-size: 1.375rem;
  }

  .cta-mid__title {
    font-size: clamp(1.25rem, 5.5vw, 1.5rem);
  }

  .cta-final__title {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero__book-glow {
    animation: none;
  }

  .hero__decor {
    display: none;
  }
}

/* --- High Contrast --- */
@media (prefers-contrast: high) {
  .btn--amazon {
    border: 2px solid var(--color-primary-dark);
  }

  .benefit-card,
  .problem__item,
  .testimonial-card__inner {
    border-width: 2px;
  }
}

/* --- Print --- */
@media print {
  .header,
  .back-to-top,
  .testimonials__controls,
  .header__toggle {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding-top: 0;
  }

  .section {
    padding: var(--space-xl) 0;
    break-inside: avoid;
  }

  .btn {
    border: 1px solid #000;
  }
}
