/* ============================================
   CLANCY DOGGYMANN — Home Page Styles
   ============================================ */

/* ══════════════════════════════════════════════
   1. HERO SECTION
   ══════════════════════════════════════════════ */

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #C8E6F8 0%, var(--sky) 40%, #B0DAF1 70%, #E8D5B7 100%);
}

/* ── Parallax Cloud Layers ── */
.hero-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-cloud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  display: flex;
  align-items: flex-start;
}

.hero-cloud-layer img,
.hero-cloud-layer svg {
  height: auto;
  opacity: 0.7;
  flex-shrink: 0;
}

.hero-cloud-layer-1 {
  top: 5%;
}

.hero-cloud-layer-2 {
  top: 15%;
}

.hero-cloud-layer-3 {
  top: 30%;
}

/* ── Sunbeam Rays ── */
.hero-sunbeams {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 80%;
  height: 120%;
  background: linear-gradient(
    225deg,
    rgba(249, 168, 37, 0.08) 0%,
    transparent 50%
  );
  transform: rotate(-15deg);
  pointer-events: none;
}

/* ── Hero Content ── */
.hero-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: var(--space-12);
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-8)) var(--section-padding-x) var(--space-8);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-badge {
  align-self: flex-start;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: clamp(2.5rem, 5vw + 1rem, var(--text-7xl));
  color: var(--clancy-blue);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--leading-none);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: clamp(1.25rem, 2vw + 0.5rem, var(--text-2xl));
  color: var(--earth);
  line-height: var(--leading-snug);
}

.hero-tagline {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-lg);
  color: var(--wood);
  font-style: italic;
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

/* ── Hero Image (Right Side) ── */
.hero-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-glow {
  position: absolute;
  width: 150%;
  height: 150%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(74, 111, 165, 0.2) 0%,
    rgba(74, 111, 165, 0.05) 40%,
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.hero-image-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-image-container img,
.hero-image-container video {
  width: 100%;
  height: auto;
  display: block;
}

/* ── 3D Tilt Hover on Video Cards ── */
.scroll-strip-item .card-bezel {
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-spring);
  transform-style: preserve-3d;
}

.scroll-strip-item .card-bezel:hover {
  transform: perspective(1000px) rotateY(2deg) rotateX(1deg) translateY(-6px);
  box-shadow: 0 0 0 1px var(--earth-05), var(--shadow-xl);
}

/* ── Floating Farm Elements ── */
.hero-float {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  opacity: 0.6;
}

.hero-float-hay {
  bottom: 8%;
  left: 5%;
  width: 80px;
}

.hero-float-fence {
  bottom: 15%;
  right: 3%;
  width: 60px;
}

.hero-float-chicken {
  bottom: 5%;
  right: 25%;
  width: 50px;
}

/* ── Hill silhouette at bottom ── */
.hero-hills {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 8;
}

.hero-hills svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-4));
    padding-bottom: var(--space-16);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding-top: calc(var(--nav-height) + var(--space-4));
    text-align: center;
  }

  .hero-text {
    align-items: center;
    order: 2;
  }

  .hero-badge {
    align-self: center;
  }

  .hero-image-wrap {
    order: 1;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-ctas {
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════
   2. BOOK PREVIEW STRIP
   ══════════════════════════════════════════════ */

.book-preview {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.book-preview-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.book-preview-header h2 {
  color: var(--earth);
}

.book-preview-header p {
  color: var(--wood);
  margin: var(--space-3) auto 0;
  font-size: var(--text-lg);
}

.book-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius-inner) - var(--space-2));
}

.book-card-caption {
  padding: var(--space-4) var(--space-6);
  text-align: center;
}

.book-card-caption p {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: var(--earth);
  margin: 0 auto;
}

.book-card-caption span {
  display: block;
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-xs);
  color: var(--wood);
  font-style: italic;
  margin-top: var(--space-1);
}

/* ══════════════════════════════════════════════
   3. VIDEO TRAILER
   ══════════════════════════════════════════════ */

.video-section {
  background: linear-gradient(180deg, var(--cloud) 0%, #E3F2FD 50%, var(--cloud) 100%);
  position: relative;
  overflow: hidden;
}

.video-section-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
}

.video-section-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.video-section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.video-section-header h2 {
  color: var(--earth);
}

.video-section-header p {
  color: var(--wood);
  margin: var(--space-3) auto 0;
}

.video-card-bezel {
  background: var(--sun-05);
  box-shadow: 0 0 0 1px var(--earth-05);
  padding: 6px;
  border-radius: var(--radius-xl);
}

.video-card-inner {
  border-radius: var(--radius-inner);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--night);
}

.video-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at center, var(--bandana-10), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════════
   4. THE STORY
   ══════════════════════════════════════════════ */

.story-section {
  background: var(--cream);
  position: relative;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.story-parchment {
  background: linear-gradient(145deg, #FAF0DA, #F5E6C8);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.story-parchment::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.story-parchment h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--earth);
  margin-bottom: var(--space-6);
}

.story-parchment p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--earth);
  margin-bottom: var(--space-4);
}

.story-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.story-image img {
  width: 100%;
  height: auto;
}

.story-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  color: var(--clancy-blue);
  border-left: 4px solid var(--bandana);
  padding-left: var(--space-6);
  margin-top: var(--space-8);
  line-height: var(--leading-relaxed);
}

@media (max-width: 768px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ══════════════════════════════════════════════
   5. WHY BILINGUAL?
   ══════════════════════════════════════════════ */

.bilingual-section {
  background: var(--cloud);
  position: relative;
}

.bilingual-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.bilingual-header h2 {
  color: var(--earth);
}

.bilingual-header p {
  color: var(--wood);
  margin: var(--space-3) auto 0;
  font-size: var(--text-lg);
}

.bilingual-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-6);
}

.bilingual-grid .card-bezel:first-child {
  grid-row: 1 / 3;
}

@media (max-width: 768px) {
  .bilingual-grid {
    grid-template-columns: 1fr;
  }

  .bilingual-grid .card-bezel:first-child {
    grid-row: auto;
  }
}

/* ══════════════════════════════════════════════
   6. EMAIL CAPTURE
   ══════════════════════════════════════════════ */

.email-section {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cloud) 100%);
  position: relative;
  overflow: hidden;
}

.email-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.email-content h2 {
  color: var(--earth);
  margin-bottom: var(--space-4);
}

.email-content p {
  color: var(--wood);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
}

.email-success {
  display: none;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--grass);
  font-size: var(--text-lg);
}

.email-success.show {
  display: flex;
}

.email-form.hidden {
  display: none;
}

.email-peeking {
  position: absolute;
  right: -40px;
  bottom: -20px;
  width: 320px;
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
}

.email-confetti {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  pointer-events: none;
  z-index: 100;
}

@media (max-width: 768px) {
  .email-peeking {
    position: relative;
    right: auto;
    bottom: auto;
    width: 200px;
    margin: var(--space-8) auto 0;
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════
   7. AMAZON CTA BANNER
   ══════════════════════════════════════════════ */

.amazon-section {
  background: linear-gradient(135deg, var(--cream) 0%, rgba(249, 168, 37, 0.06) 100%);
  position: relative;
  overflow: hidden;
}

.amazon-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-12);
  align-items: center;
}

.amazon-book {
  display: flex;
  justify-content: center;
  position: relative;
}

.amazon-book-img {
  max-width: 320px;
  width: 100%;
  filter: drop-shadow(0 20px 40px rgba(62, 39, 35, 0.2));
}

.amazon-info h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-4xl);
  color: var(--earth);
  margin-bottom: var(--space-4);
}

.amazon-subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--wood);
  margin-bottom: var(--space-6);
}

.amazon-meta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.amazon-price {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-3xl);
  color: var(--barn);
}

.amazon-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

.amazon-secondary-link {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  color: var(--wood);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-spring);
}

.amazon-secondary-link:hover {
  color: var(--bandana);
}

@media (max-width: 768px) {
  .amazon-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .amazon-ctas {
    align-items: center;
  }

  .amazon-book {
    order: -1;
  }
}
