/* Culturebooklet — shared 3D layer
   Lightweight depth and motion effects applied across all pages.
   Homepage adds extra effects (mouse-tilt, hero orb) inline. */

body {
  perspective: 1200px;
  perspective-origin: 50% 30%;
}

/* Floating animated logo (header) */
.logo {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.logo img {
  animation: cb-logo-float 6s ease-in-out infinite;
  transform-style: preserve-3d;
  filter: drop-shadow(0 4px 8px rgba(44, 44, 44, 0.08));
}

.logo:hover img {
  animation-play-state: paused;
}

.logo:hover {
  transform: translateZ(20px) rotateY(-8deg) rotateX(6deg);
}

@keyframes cb-logo-float {
  0%, 100% { transform: translateZ(0) rotateY(0deg); }
  50%      { transform: translateZ(12px) rotateY(8deg); }
}

/* 3D depth for the back link */
.back-link {
  display: inline-block;
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.back-link:hover {
  transform: translateZ(8px) translateX(-3px);
}

/* CTA box gets a subtle lift */
.cta-box {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 20px -10px rgba(44, 44, 44, 0.10);
}

.cta-box:hover {
  transform: translateZ(12px);
  box-shadow: 0 18px 36px -14px rgba(44, 44, 44, 0.18);
}

/* Article entrance: title + intro lift into place */
.article h1,
.article-intro {
  transform-style: preserve-3d;
  animation: cb-lift-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.article h1      { animation-delay: 0.05s; }
.article-intro   { animation-delay: 0.18s; }

@keyframes cb-lift-in {
  from { opacity: 0; transform: translateZ(-60px) translateY(16px); }
  to   { opacity: 1; transform: translateZ(0) translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .logo img,
  .article h1,
  .article-intro {
    animation: none !important;
  }
  .logo,
  .back-link,
  .cta-box {
    transition: none !important;
  }
}

/* ============ INLINE SIGNUP CALLOUT (article pages) ============ */
.cb-signup {
  margin: 36px 0;
  padding: 32px 28px;
  background: linear-gradient(135deg, #F5EDE4 0%, #FBF4EB 100%);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(44, 44, 44, 0.04),
    0 18px 32px -22px rgba(44, 44, 44, 0.18);
  border: 1px solid rgba(224, 122, 95, 0.18);
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cb-signup:hover {
  transform: translateZ(12px);
  box-shadow:
    0 1px 0 rgba(44, 44, 44, 0.04),
    0 28px 48px -22px rgba(44, 44, 44, 0.22);
}

.cb-signup__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #2C2C2C;
  margin: 0 0 10px;
  line-height: 1.2;
}

.cb-signup__subtext {
  font-size: 16px;
  line-height: 1.6;
  color: #5A5A5A;
  margin: 0 0 22px;
}

.cb-signup form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cb-signup input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid rgba(44, 44, 44, 0.18);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  color: #2C2C2C;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cb-signup input[type="email"]:focus {
  border-color: #E07A5F;
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.15);
}

.cb-signup button {
  padding: 14px 22px;
  border: none;
  border-radius: 8px;
  background: #E07A5F;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 0 #C95E43, 0 8px 20px rgba(224, 122, 95, 0.22);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cb-signup button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #C95E43, 0 12px 24px rgba(224, 122, 95, 0.28);
}

.cb-signup button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #C95E43, 0 4px 12px rgba(224, 122, 95, 0.18);
}

.cb-signup button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.cb-signup__helper {
  font-size: 13px;
  color: #8A8A8A;
  margin: 12px 0 0;
  text-align: center;
}

.cb-signup__success {
  display: none;
  padding: 18px 20px;
  background: #fff;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  color: #2C2C2C;
  text-align: center;
  border: 1px solid rgba(44, 44, 44, 0.08);
}

@media (max-width: 600px) {
  .cb-signup {
    margin: 28px -8px;
    padding: 24px 20px;
    border-radius: 12px;
  }
  .cb-signup form { flex-direction: column; }
  .cb-signup button { width: 100%; }
}

/* Honour reduced motion for the callout too */
@media (prefers-reduced-motion: reduce) {
  .cb-signup, .cb-signup button { transition: none !important; }
}
