/* ============================================================
   Wizard of Oz & Shakespeare — Global Styles
   Clean, modern design with literary elegance
   Mobile-first responsive with touch-friendly interactions
   Viewport range: 320px – 1920px+
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors — emerald-green palette with warm accents */
  --color-primary: #1a6b3c;
  --color-primary-dark: #0e4d2a;
  --color-primary-light: #2d8a52;
  --color-accent: #c9a84c;
  --color-accent-dark: #b08e2e;
  --color-accent-light: #dab85c;
  --color-text: #2c2c2c;
  --color-text-light: #5a5a5a;
  --color-text-inverse: #ffffff;
  --color-bg: #fafaf7;
  --color-bg-alt: #f0ede6;
  --color-bg-dark: #1a1a1a;
  --color-border: #d4d0c8;
  --color-border-light: #e8e5df;
  --color-success: #2d8a52;
  --color-error: #c0392b;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Sizing */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --header-height: 64px;
  --section-spacing: 3.5rem;
  --section-spacing-sm: 2.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-book: 0 25px 50px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Cross-browser form element normalization */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
}

/* Prevent Firefox default styling on buttons */
button::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/* Remove search input decoration in Chrome/Safari/Edge */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* Consistent textarea behavior across browsers */
textarea {
  overflow: auto;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

picture {
  display: contents;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: 1.25;
  font-weight: 700;
}

/* Mobile-first fluid typography — fallbacks for browsers without clamp() */
h1 { font-size: 1.75rem; font-size: clamp(1.75rem, 4vw + 0.5rem, 3.25rem); }
h2 { font-size: 1.4rem; font-size: clamp(1.4rem, 3vw + 0.3rem, 2.25rem); }
h3 { font-size: 1.15rem; font-size: clamp(1.15rem, 2vw + 0.3rem, 1.75rem); }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  z-index: 10000;
  text-decoration: none;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 250, 247, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Logo / site title */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.site-logo:hover {
  color: var(--color-primary);
}

.site-logo__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.site-logo__text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-logo__text span {
  display: none;
  font-size: 0.7rem;
  font-weight: 400;
  font-family: var(--font-body);
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

/* Navigation — hidden on mobile */
.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.main-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.main-nav__link:hover,
.main-nav__link.active {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.main-nav__link--cta {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  margin-left: 0.5rem;
}

.main-nav__link--cta:hover {
  background: var(--color-primary-dark);
  color: var(--color-text-inverse);
}

/* Mobile menu toggle — shown by default */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.625rem;
  color: var(--color-text);
  line-height: 0;
  border-radius: var(--radius-md);
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast);
}

.mobile-menu-toggle:active {
  background: var(--color-bg-alt);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile nav overlay — slide-in drawer */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85vw;
  max-width: 320px;
  z-index: 1001;
  background: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.open .mobile-nav {
  transform: translateX(0);
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.625rem;
  color: var(--color-text);
  line-height: 0;
  border-radius: var(--radius-md);
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast);
}

.mobile-nav__close:active {
  background: var(--color-bg-alt);
}

.mobile-nav__close svg {
  width: 24px;
  height: 24px;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
}

.mobile-nav__links a {
  display: flex;
  align-items: center;
  padding: 1rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}

.mobile-nav__links a:hover,
.mobile-nav__links a.active {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.mobile-nav__links a:active {
  transform: scale(0.98);
}

.mobile-nav__links a.cta {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  text-align: center;
  justify-content: center;
  margin-top: 1rem;
  font-weight: 600;
}

.mobile-nav__links a.cta:hover {
  background: var(--color-primary-dark);
}

.mobile-nav__links a.cta:active {
  transform: scale(0.97);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.site-main {
  flex: 1;
}

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

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

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-text-inverse);
}

.section__header {
  text-align: center;
  margin-bottom: 2rem;
}

.section__header h2 {
  margin-bottom: 0.75rem;
}

.section__header p {
  font-size: 1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   HERO — Mobile-first layout
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-height));
  padding: var(--section-spacing-sm) 0;
  overflow: hidden;
  background: linear-gradient(160deg, #f0f7f2 0%, var(--color-bg) 40%, var(--color-bg-alt) 100%);
}

@supports (min-height: 100svh) {
  .hero {
    min-height: calc(100svh - var(--header-height));
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(26, 107, 60, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201, 168, 76, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.hero__content {
  max-width: 560px;
  order: 2;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.hero__title {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
}

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
  order: 1;
}

.hero__image img {
  max-height: 320px;
  width: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-slow);
}

.hero__image img:hover {
  transform: scale(1.02) rotate(-1deg);
}

@keyframes book-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============================================================
   BUTTONS — Touch-friendly 44px minimum
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
}

.btn--secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-accent);
}

.btn--accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
}

/* ============================================================
   PRODUCT INFO GRID
   ============================================================ */
.product-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.product-detail-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

.product-detail-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-detail-card__icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-detail-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-detail-card__icon--shakespeare {
  width: 96px;
  height: 96px;
  margin-bottom: 0.85rem;
  margin-left: -8px;
}

.product-detail-card__icon--shakespeare img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-detail-card__icon--book {
  width: 128px;
  height: 96px;
  margin-bottom: 0.85rem;
  margin-left: -8px;
}

.product-detail-card__icon--book img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.product-detail-card__icon--cover {
  width: 72px;
  height: 96px;
  margin-bottom: 0.85rem;
  margin-left: -4px;
}

.product-detail-card__icon--cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.product-detail-card__icon--kindness {
  width: 128px;
  height: 96px;
  margin-bottom: 0.85rem;
  margin-left: -8px;
}

.product-detail-card__icon--kindness img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.product-detail-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.product-detail-card p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

/* ============================================================
   ABOUT / CONTENT SECTIONS
   ============================================================ */
.content-block {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.content-block__text h2 {
  margin-bottom: 1rem;
}

.content-block__text p {
  color: var(--color-text-light);
  font-size: 1rem;
}

.content-block__image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-slow);
}

.content-block__image img:hover {
  transform: scale(1.01);
}

/* ============================================================
   PRICE / BUY SECTION
   ============================================================ */
.section--buy-bg {
  background-image: url('../images/backgrounds/buy-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.section--buy-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 247, 0.85);
}

.section--buy-bg > .container {
  position: relative;
  z-index: 1;
}

.buy-section {
  text-align: center;
  padding: var(--section-spacing) 0;
}

.buy-card {
  display: inline-block;
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 400px;
}

.buy-card__price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.buy-card__shipping {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-section {
  padding: var(--section-spacing) 0;
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

.contact-info h2 {
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--color-text-light);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.contact-form {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

/* Contact info cards */
.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

.contact-info-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.contact-info-card__icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  margin-top: 0.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-info-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.contact-info-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.contact-info-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-top: 1rem;
  display: none;
  line-height: 1.5;
}

/* Disabled submit button during form submission */
.contact-form button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

/* Invalid field highlight after attempted submit */
.form-group input:invalid.touched,
.form-group textarea:invalid.touched {
  border-color: var(--color-error);
}

.form-group input:invalid.touched:focus,
.form-group textarea:invalid.touched:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.form-status--success {
  display: block;
  background: rgba(45, 138, 82, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(45, 138, 82, 0.2);
}

.form-status--error {
  display: block;
  background: rgba(192, 57, 43, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(192, 57, 43, 0.2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-nav__group h4 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
}

.footer-nav__group ul {
  list-style: none;
}

.footer-nav__group li {
  margin-bottom: 0.5rem;
}

.footer-nav__group a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
  display: inline-block;
  padding: 0.25rem 0;
}

.footer-nav__group a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ============================================================
   QUOTE BANNER
   ============================================================ */
.quote-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-inverse);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quote-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.quote-banner__mark {
  display: block;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--color-accent-light);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.quote-banner blockquote {
  font-family: var(--font-display);
  font-size: 1rem;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-style: italic;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 1rem;
  color: rgba(255, 255, 255, 0.95);
  border: none;
  padding: 0;
}

.quote-banner cite {
  font-style: normal;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 50px;
}

.badge--primary {
  background: rgba(26, 107, 60, 0.1);
  color: var(--color-primary);
}

.badge--accent {
  background: rgba(201, 168, 76, 0.15);
  color: var(--color-accent-dark);
}

/* ============================================================
   PAGE-SPECIFIC: Contact page header
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-inverse);
  padding: 3rem 0 2rem;
  text-align: center;
}

.page-header h1 {
  color: var(--color-text-inverse);
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1rem;
  opacity: 0.85;
}

/* ============================================================
   ANIMATIONS — Scroll-triggered fade-ins
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

  .fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
  }

  .fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

  .fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* Staggered children animation */
  .stagger > .fade-in:nth-child(1) { transition-delay: 0ms; }
  .stagger > .fade-in:nth-child(2) { transition-delay: 100ms; }
  .stagger > .fade-in:nth-child(3) { transition-delay: 200ms; }
  .stagger > .fade-in:nth-child(4) { transition-delay: 300ms; }
  .stagger > .fade-in:nth-child(5) { transition-delay: 400ms; }
  .stagger > .fade-in:nth-child(6) { transition-delay: 500ms; }

  /* Hero book float animation */
  .hero__image img {
    animation: book-float 5s ease-in-out infinite;
  }
}

@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;
  }

  .fade-in,
  .fade-in-left,
  .fade-in-right {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  /* Replace hover lift effects with press/active effects on touch */
  .product-detail-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .product-detail-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
  }

  .btn--primary:hover,
  .btn--secondary:hover,
  .btn--accent:hover {
    transform: none;
    box-shadow: none;
  }

  .btn--primary:active,
  .btn--secondary:active,
  .btn--accent:active {
    transform: scale(0.97);
  }

  .content-block__image img:hover,
  .hero__image img:hover {
    transform: none;
  }

  .contact-info-card:hover {
    transform: none;
    box-shadow: none;
  }

  /* Ensure interactive elements meet 44px touch target */
  .main-nav__link,
  .mobile-nav__links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ============================================================
   RESPONSIVE: VERY SMALL PHONES (< 375px)
   Fine-tune base layout for narrowest viewports (320px–374px)
   e.g. iPhone SE (1st gen) / iPhone 5 / Galaxy S3
   ============================================================ */
@media (max-width: 374px) {
  .container {
    padding: 0 0.75rem;
  }

  .header-inner {
    padding: 0 0.75rem;
  }

  .site-logo {
    gap: 0.4rem;
  }

  .site-logo__text {
    font-size: 0.85rem;
  }

  .site-logo__icon {
    width: 32px;
    height: 32px;
  }

  .hero__title {
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .hero__subtitle {
    font-size: 0.9375rem;
  }

  .hero__eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
  }

  .hero__image img {
    max-height: 260px;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }

  .btn--large {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .product-detail-card {
    padding: 1.25rem;
  }

  .product-detail-card__icon {
    width: 72px;
    height: 72px;
  }

  .product-detail-card h3 {
    font-size: 1rem;
  }

  .buy-card {
    padding: 1.5rem 1rem;
  }

  .buy-card__price {
    font-size: 2rem;
  }

  .quote-banner {
    padding: 2rem 0;
  }

  .quote-banner__mark {
    font-size: 3rem;
  }

  .contact-form {
    padding: 1.25rem;
  }

  .page-header {
    padding: 2rem 0 1.5rem;
  }

  .contact-info-card {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .footer-inner {
    padding: 0 0.75rem;
  }

  .footer-bottom {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.75rem;
  }

  .footer-brand__title {
    font-size: 0.95rem;
  }
}

/* ============================================================
   RESPONSIVE: SMALL PHONES (>= 375px)
   ============================================================ */
@media (min-width: 375px) {
  .container {
    padding: 0 1.25rem;
  }

  .header-inner {
    padding: 0 1.25rem;
  }

  .hero__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn {
    width: auto;
  }
}

/* ============================================================
   RESPONSIVE: LARGE PHONES (>= 480px)
   ============================================================ */
@media (min-width: 480px) {
  .hero__image img {
    max-height: 360px;
  }

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

  .page-header {
    padding: 3.5rem 0 2.5rem;
  }

  .page-header p {
    font-size: 1.0625rem;
  }
}

/* ============================================================
   RESPONSIVE: TABLET (>= 600px)
   ============================================================ */
@media (min-width: 600px) {
  :root {
    --section-spacing: 4.5rem;
    --section-spacing-sm: 3rem;
  }

  .container {
    padding: 0 1.5rem;
  }

  .header-inner {
    padding: 0 1.5rem;
  }

  .site-logo__text {
    font-size: 1.05rem;
  }

  .site-logo__text span {
    display: block;
  }

  .hero {
    padding: var(--section-spacing) 0;
  }

  .hero__image img {
    max-height: 420px;
  }

  .hero__subtitle {
    font-size: 1.0625rem;
  }

  .section__header {
    margin-bottom: 2.5rem;
  }

  .section__header p {
    font-size: 1.125rem;
  }

  .product-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .product-detail-card {
    padding: 2rem;
  }

  .content-block {
    flex-direction: row;
    gap: 3rem;
    align-items: center;
  }

  .content-block__text,
  .content-block__image {
    flex: 1;
  }

  .content-block--reverse {
    flex-direction: row-reverse;
  }

  .contact-grid {
    flex-direction: row;
    gap: 3rem;
    align-items: start;
  }

  .contact-info {
    flex: 1;
  }

  .contact-form {
    flex: 1.25;
    padding: 2rem;
  }

  .buy-card {
    padding: 2.5rem 3rem;
  }

  .buy-card__price {
    font-size: 3rem;
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 1.5rem;
  }

  .footer-nav {
    flex-direction: row;
    gap: 3rem;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .page-header {
    padding: 4rem 0 3rem;
  }

  .quote-banner {
    padding: 4rem 0;
  }
}

/* ============================================================
   RESPONSIVE: TABLET LANDSCAPE (>= 768px)
   ============================================================ */
@media (min-width: 768px) {
  .product-details {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero__inner {
    gap: 2.5rem;
  }

  .contact-form {
    padding: 2.25rem;
  }
}

/* ============================================================
   RESPONSIVE: DESKTOP (>= 900px)
   ============================================================ */
@media (min-width: 900px) {
  :root {
    --header-height: 72px;
    --section-spacing: 5rem;
  }

  .container {
    padding: 0 2rem;
  }

  .header-inner {
    padding: 0 2rem;
  }

  .main-nav {
    display: flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .site-logo__text {
    font-size: 1.125rem;
  }

  .site-logo__icon {
    width: 40px;
    height: 40px;
  }

  .hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: left;
  }

  .hero__content {
    order: 1;
    max-width: none;
  }

  .hero__image {
    order: 2;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__image img {
    max-height: 550px;
  }

  .hero__subtitle {
    font-size: 1.125rem;
  }

  .section__header {
    margin-bottom: 3rem;
  }

  .content-block {
    gap: 4rem;
  }

  .content-block__text p {
    font-size: 1.0625rem;
  }

  .contact-grid {
    gap: 4rem;
  }

  .contact-form {
    padding: 2.5rem;
  }

  .contact-info p {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
  }

  .buy-card {
    padding: 3rem 4rem;
  }

  .footer-inner {
    padding: 0 2rem;
  }

  .footer-bottom {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .page-header {
    padding: 4.5rem 0 3.5rem;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .page-header p {
    font-size: 1.125rem;
  }
}

/* ============================================================
   RESPONSIVE: LARGE DESKTOP (>= 1200px)
   ============================================================ */
@media (min-width: 1200px) {
  .container {
    padding: 0 2.5rem;
  }

  .product-details {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .hero__inner {
    gap: 5rem;
  }

  .hero__image img {
    max-height: 600px;
  }

  .content-block__text p {
    font-size: 1.125rem;
    line-height: 1.8;
  }

  .quote-banner {
    padding: 5rem 0;
  }

  .quote-banner blockquote {
    max-width: 800px;
  }
}

/* ============================================================
   RESPONSIVE: EXTRA-LARGE / HD DESKTOP (>= 1440px)
   ============================================================ */
@media (min-width: 1440px) {
  :root {
    --max-width: 1320px;
    --section-spacing: 6rem;
  }

  .container {
    padding: 0 3rem;
  }

  .header-inner {
    max-width: var(--max-width);
    padding: 0 3rem;
  }

  .hero__inner {
    gap: 6rem;
  }

  .hero__subtitle {
    font-size: 1.1875rem;
  }

  .section__header p {
    font-size: 1.1875rem;
    max-width: 680px;
  }

  .footer-inner {
    max-width: var(--max-width);
    padding: 0 3rem;
  }

  .footer-bottom {
    max-width: var(--max-width);
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* ============================================================
   RESPONSIVE: ULTRAWIDE / 4K (>= 1920px)
   ============================================================ */
@media (min-width: 1920px) {
  :root {
    --max-width: 1400px;
  }

  /* Prevent excessive whitespace on very wide screens */
  .hero {
    padding: var(--section-spacing) 0;
  }

  .hero__image img {
    max-height: 650px;
  }

  /* Keep full-width sections visually balanced */
  .quote-banner .container,
  .page-header .container {
    max-width: 900px;
  }

  .section__header p {
    max-width: 720px;
  }

  /* Slightly increase footer padding for balance */
  .site-footer {
    padding: 3.5rem 0 2rem;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .site-header,
  .mobile-nav-overlay,
  .site-footer,
  .hero__actions,
  .buy-section {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .hero {
    min-height: auto;
    background: none;
    padding: 2rem 0;
  }

  .section {
    padding: 1.5rem 0;
  }
}
