/* --------------------------------------------------
   GLOBAL RESET + FONTS
-------------------------------------------------- */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Prevent iPhone text zoom from breaking layout */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

@import url('https://fonts.googleapis.com/css2?family=Gochi+Hand&family=Quicksand:wght@300;400;500;600;700&display=swap');

/* --------------------------------------------------
   BODY
-------------------------------------------------- */
body {
    margin: 0;
    font-family: 'Quicksand', sans-serif;
    color: #004f5f;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    background: radial-gradient(circle at center,
        #dffdf7 0%,
        #a8f0e4 40%,
        #7ad8d0 70%,
        #f7c7b2 100%);
    animation: fadeIn 0.8s ease-in-out;
}

p {
    color: #004f5f;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------
   NAVBAR — MOBILE FIRST (CLEAN + CORRECTED)
-------------------------------------------------- */

.navbar {
    position: sticky; /* mobile-safe */
    top: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    flex-direction: column; /* matches new HTML */
    align-items: center;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
}

/* Header row: logo + hamburger */
.nav-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo-img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.4));
}

/* MOBILE NAV MENU (hidden by default) */
.nav-links {
    display: none;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    text-align: center;
    background: rgba(0,0,0,0.9);
    padding: 20px 0;
    margin-top: 10px;
}

/* When menu is open */
.nav-links.open {
    display: flex;
}

/* Mobile text size fix — only ONE clean rule */
@media (max-width: 767px) {
    .nav-links {
        position: static; /* allows navbar to expand */
    }
}

/* Mobile link styling */
.nav-links a {
    color: #ffffff;
    font-size: 1.2rem;
    font-family: 'Gochi Hand', cursive;
    text-decoration: none;
    font-weight: 600;
}

/* Hamburger */
.nav-toggle {
    display: block;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* --------------------------------------------------
   iPHONE FIX — use sticky instead of fixed
-------------------------------------------------- */
@media (max-width: 767px) {
    .navbar {
        position: sticky;
        top: 0;
        padding: 10px 16px;
        min-height: 60px;
    }

    /* Shrink logo so nav never collapses */
    .nav-logo-img {
        height: 32px;
    }
}

/* --------------------------------------------------
   DESKTOP NAV + CENTERING FIX
-------------------------------------------------- */
@media (min-width: 768px) {

    .navbar {
        position: fixed; /* desktop can safely be fixed */
        top: 0;
        left: 0;
        flex-direction: row; /* desktop layout */
        justify-content: center;
        align-items: center;
        padding: 15px 20px;
    }

    /* Hide mobile header row (logo + hamburger) */
    .nav-header {
        display: none;
    }

    /* Desktop menu layout */
    .nav-links {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap; /* allows wrapping on large text sizes */
        justify-content: center;
        align-items: center;
        gap: 40px;
        background: none;
        padding: 0;
        margin-top: 0;
        position: static;
    }

    .nav-links a {
        color: #004f5f;
        font-size: 1.35rem;
        position: relative; /* required for underline animation */
    }

    .nav-links a::after {
        content: "";
        position: absolute;
        bottom: -6px;
        left: 50%;
        width: 0;
        height: 2px;
        background: #004f5f;
        transition: 0.3s ease;
        transform: translateX(-50%);
    }

    .nav-links a:hover::after {
        width: 60%;
    }

    /* Hide hamburger on desktop */
    .nav-toggle {
        display: none;
    }
}

/* --------------------------------------------------
   HERO — MOBILE FIRST (FINAL)
-------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100svh;
    height: auto;
    background: url('images/magical-forest-sky.png') no-repeat center top / cover;
    overflow-x: hidden;
    padding-top: 90px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 20px;
}

.author-logo {
    width: 70%;
    max-width: 260px;
    animation: logoFloat 5s ease-in-out infinite;
    filter: drop-shadow(0 0 18px rgba(255, 230, 120, 0.9));
}

@keyframes logoFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

.hero-banner {
    background: rgba(255, 255, 255, 0.12);
    padding: 18px 20px;
    border-radius: 20px;
    margin-top: 18px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 25px rgba(255, 200, 120, 0.4);
}

.hero-banner h2 {
    font-size: 2.2rem;
    line-height: 1.2;
    color: #7dd3fc;
    text-shadow: 0 0 14px rgba(0,0,0,0.7);
    white-space: pre-line;
    margin: 10px 0;
}

/* Waves — mobile first */
.wave {
    position: absolute;
    bottom: 0;
    width: 160%;
    height: 140px;
    background: rgba(255,255,255,0.15);
    border-radius: 100%;
    animation: waveMove 12s infinite linear;
}

.wave1 { animation-duration: 14s; opacity: 0.35; }
.wave2 { animation-duration: 18s; opacity: 0.25; }
.wave3 { animation-duration: 22s; opacity: 0.18; }

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --------------------------------------------------
   HERO — TABLET
-------------------------------------------------- */
@media (min-width: 768px) {

    .hero {
        padding-top: 110px;
    }

    .author-logo {
        max-width: 380px;
    }

    .hero-banner h2 {
        font-size: 3rem;
    }

    .wave {
        width: 200%;
        height: 180px;
    }
}

/* --------------------------------------------------
   HERO — DESKTOP
-------------------------------------------------- */
@media (min-width: 1024px) {

    .hero {
        padding-top: 130px;
    }

    .hero-banner h2 {
        font-size: 3.5rem;
    }
}

.page-content {
    padding: 120px 20px 60px;
    max-width: 900px;
    margin: auto;
    text-align: center;
}

h1, h2, h3 {
    font-family: 'Gochi Hand', cursive;
    color: #004f5f;
    text-shadow: 0 0 6px rgba(255,255,255,0.4);
}

.about-photo {
    width: 260px;
    border-radius: 18px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 0 18px rgba(0, 79, 95, 0.4);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.4);
    color: #004f5f;
    font-size: 1rem;
    outline: none;
    transition: 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    box-shadow: 0 0 10px #7dd3fc;
}

.contact-form button {
    padding: 12px;
    background: #004f5f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.contact-form button:hover {
    background: #007a8a;
    box-shadow: 0 0 12px #7dd3fc;
}

.retailer-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.retailer-row img {
    width: 100px;
    max-width: 28vw;
    transition: 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.2));
}

.retailer-row img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 10px #004f5f);
}

footer {
    text-align: center;
    padding: 25px 0;
    background: rgba(0,0,0,0.4);
    margin-top: 40px;
    font-size: 0.9rem;
    color: #004f5f;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-shadow: 0 0 6px rgba(255,255,255,0.4);
}

#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #004f5f;
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: none;
    transition: 0.3s ease;
    box-shadow: 0 0 10px #004f5f;
}

#scrollTopBtn:hover {
    background: #007a8a;
    transform: scale(1.1);
}

.success-container {
    margin-top: 140px;
    padding: 40px 20px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 5;
    text-align: center;
}

.success-title {
    font-size: 3rem;
    color: #004f5f;
    margin-bottom: 10px;
    font-family: 'Gochi Hand', cursive;
}

.success-message {
    font-size: 1.3rem;
    color: #004f5f;
    margin-bottom: 25px;
}

.hero-social {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-icon {
    font-size: 32px;
    color: #ffffff; /* white icons look best on hero */
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: #ffdd57; /* warm magical gold */
}

.home-social {
    display: flex;
    justify-content: center;
    gap: 30px; /* spacing between icons */
    margin: 40px 0; /* spacing above and below */
}

.home-social i {
    font-size: 48px; /* twice as big as the default 24px */
    color: #333;
    transition: transform 0.3s ease, color 0.3s ease;
}

.home-social a:hover i {
    transform: scale(1.2);
    color: #555;
}

.sparkle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.95;
  animation: sparkleTwinkle 1.8s ease-out forwards;
  transform-origin: center;
}

/* Twinkle + rotate + fade */
@keyframes sparkleTwinkle {
  0% { opacity: 1; transform: scale(0.6) rotate(0deg); }
  30% { opacity: 1; transform: scale(1.2) rotate(90deg); }
  60% { opacity: 0.9; transform: scale(1.6) rotate(180deg); }
  100% { opacity: 0; transform: scale(2.2) rotate(360deg); }
}

/* Star shape using clip-path */
.sparkle-star {
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

/* --- BOOK LOGO GRID --- */
.book-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  justify-items: center;
  align-items: center;
  padding: 40px 10px;
  animation: fadeInGrid 1.2s ease-out;
}

/* Page-load floating animation */
@keyframes fadeInGrid {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Logo container */
.book-logo-item {
  text-align: center;
  position: relative;
  perspective: 800px;
  animation: shimmer 3s infinite linear;
}

/* Shimmer animation */
@keyframes shimmer {
  0% { opacity: 0.95; }
  50% { opacity: 1; }
  100% { opacity: 0.95; }
}

/* Coming Soon ribbon */
.book-logo-item::before {
  content: "Coming Soon";
  position: absolute;
  top: -10px;
  right: -10px;
  background: #FF7F6A;
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 6px;
  transform: rotate(10deg);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* Logo images */
.book-logo-item img {
  width: 130px;
  height: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  border: 3px solid #F4C542; /* Brand border */
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* 3D tilt + glow + sparkle on hover */
.book-logo-item img:hover {
  transform: scale(1.15) rotateY(12deg) rotateX(6deg);
  box-shadow: 0 8px 24px rgba(244,197,66,0.45);
  border-color: #FF7F6A;
}

/* Sparkle burst on hover */
.book-logo-item img:hover::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #F4C542, #FF7F6A, #2AB7CA);
  border-radius: 50%;
  opacity: 0.6;
  transform: translate(-50%, -50%) scale(0);
  animation: sparkleBurst 0.6s ease-out forwards;
}

@keyframes sparkleBurst {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* Logo captions */
.book-logo-caption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
  .book-logo-item img {
    background: #1e1e1e;
    border-color: #2AB7CA;
    box-shadow: 0 4px 14px rgba(255,255,255,0.12);
  }

  .book-logo-caption {
    color: #f2f2f2;
  }
}

/* Mobile carousel slider */
@media (max-width: 480px) {
  .book-logos {
    display: flex;
    overflow-x: auto;
    gap: 24px;
    padding: 20px;
    scroll-snap-type: x mandatory;
  }

  .book-logo-item {
    scroll-snap-align: center;
    min-width: 160px;
  }

  .book-logo-item img {
    width: 110px;
    padding: 12px;
  }
}

.white-text {
  color: white !important;
}

