/*
Theme Name: Takeda NT1
Theme URI: https://takeda.com
Author: Your Name
Author URI: https://yourwebsite.com
Description: Custom theme for Takeda Narcolepsy Type 1 with immersive 3D header animation
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: takeda-nt1
*/

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Work+Sans:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #4a4a4a;
  overflow-x: hidden;
  background: #E9E4DE;
}

/* ========================================
   3D HEADER ANIMATION CONTAINER
   ======================================== */

.header-animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  will-change: transform, opacity;
  transition: opacity 0.3s ease;
  z-index: 1;
  clip-path: inset(0);
}

.header-animation-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100vh;
}

#animation-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ========================================
   HEADER LOGO & NAVIGATION
   ======================================== */

.header-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 60px;
  z-index: 20;
  opacity: 1;
  visibility: visible;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo-text {
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.header-logo-image {
  max-height: 24px;
  width: auto;
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 21;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 1px;
  background: #fff;
  transition: all 0.3s ease;
}

.hamburger-menu:hover span {
  background: #ff6600;
}

/* Animation Control Button (Skip/Play Again) */
.animation-control {
  position: absolute;
  bottom: 40px;
  right: 60px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.3s ease;
  padding: 0;
}

.animation-control .control-text {
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.animation-control:hover .control-text {
  color: rgba(255, 255, 255, 1);
}

/* ========================================
   STICKY HEADER (Appears on Scroll)
   ======================================== */

.sticky-header {
  position: fixed;
  top: -100px;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-header.visible {
  transform: translateY(100px);
}

.sticky-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  max-width: 100%;
}

.sticky-header .header-logo-text {
  font-size: 14px;
  letter-spacing: 1.2px;
}

.sticky-header .header-logo-image {
  max-height: 24px;
}

.sticky-header .hamburger-menu {
  width: 18px;
  height: 12px;
}

/* ========================================
   HEADER CONTENT OVERLAY (After Animation)
   ======================================== */

.header-content {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 60px;
  pointer-events: none;
  z-index: 10;
}

.header-text-left,
.header-text-right {
  flex: 0 0 auto;
  max-width: 400px;
  color: white;
  opacity: 0;
  visibility: hidden;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.header-text-left {
  transform: translateX(-40px);
}

.header-text-right {
  transform: translateX(40px) translateY(60px);
  text-align: right;
}

.header-content.visible .header-text-left {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.header-content.visible .header-text-right {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) translateY(60px);
}

.header-text-left h1 {
  font-size: 41px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.header-text-right h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: #ff6600;
  max-width: 350px;
}

.header-text-left p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  margin-bottom: 30px;
}

.header-text-right p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  margin-bottom: 30px;
}

.cta-button {
  display: inline-block;
  padding: 16px 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.cta-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* Orange highlight text */
.highlight-orange {
  color: #ff6600;
}

/* ========================================
   PAGE CONTENT SECTIONS
   ======================================== */

.page-content {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  z-index: 10;
  margin-top: 100vh;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Section 0: Top Image Grid + Branding */
.section-top-grid {
  background: #fff;
  padding: 8px;
}

.top-image-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  width: 100%;
}

.grid-image-item {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.grid-image-item {
  overflow: hidden;
}

.grid-image-item img,
.grid-image-item .placeholder-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.6s ease, filter 0.6s ease;
}

/* Default zoom effect */
.top-image-grid[data-hover-effect="zoom"] .grid-image-item:hover img,
.top-image-grid[data-hover-effect="zoom"] .grid-image-item:hover .placeholder-image {
  transform: scale(1.15);
}

/* Fade effect */
.top-image-grid[data-hover-effect="fade"] .grid-image-item:hover img,
.top-image-grid[data-hover-effect="fade"] .grid-image-item:hover .placeholder-image {
  opacity: 0.6;
}

/* Slide up effect */
.top-image-grid[data-hover-effect="slide"] .grid-image-item:hover img,
.top-image-grid[data-hover-effect="slide"] .grid-image-item:hover .placeholder-image {
  transform: translateY(-20px);
}

/* Blur effect */
.top-image-grid[data-hover-effect="blur"] .grid-image-item:hover img,
.top-image-grid[data-hover-effect="blur"] .grid-image-item:hover .placeholder-image {
  filter: blur(4px);
}

/* Marbling effect */
.marbling-effect {
  position: relative;
  cursor: pointer;
}

.marbling-effect img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marbling-effect canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.branding-section {
  padding: 40px 10px 10px 10px;
  background: #fff;
  text-align: center;
}

.brand-logo-huge {
  font-size: 170px;
  line-height: 1;
  letter-spacing: -2px;
}

.brand-italic {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-weight: 400;
  color: #ff6600;
  margin-right: 8px;
}

.brand-bold {
  font-family: 'Work Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #2a2a2a;
  letter-spacing: 4px;
}

.brand-letter {
  display: inline-block;
  will-change: opacity;
}

/* Section 1: Hero Intro */
.section-hero {
  padding: 20px 80px 40px;
  background: #fff;
  text-align: center;
  position: relative;
}

.hero-container {
  max-width: 700px;
  margin: 0 auto;
}

.hero-heading {
  font-family: 'Work Sans', sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.5;
  color: #ff6600;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero-image-wrapper {
  margin: 50px 0;
}

.hero-center-image {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.hero-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.hero-icon {
  color: #ff6600;
  stroke: #ff6600;
}

.hero-body-text {
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.9;
  color: #7a7a7a;
  max-width: 550px;
  margin: 0 auto;
  letter-spacing: 0.2px;
}

/* Section 2: Problems & Solutions */
.section-problems {
  padding: 90px 80px;
  background: #fff;
  position: relative;
}

.problems-container {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

.problems-container::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #d0c9bd 25%, #d0c9bd 75%, transparent);
}

.problems-title {
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #b5a89a;
  margin-bottom: 70px;
  text-align: center;
  letter-spacing: 1.5px;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.problem-column {
  padding: 40px 30px;
  border-right: 1px solid #d0c9bd;
  position: relative;
}


.problem-column:last-child {
  border-right: none;
}

.problem-column [data-feather] {
  color: #ff6600;
  stroke: #ff6600;
  margin-bottom: 4px;
  display: block;
}

.problem-column h4 {
  font-family: 'Work Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #2a2a2a;
  margin-bottom: 18px;
  letter-spacing: 0.8px;
  line-height: 1.5;
}

.problem-column p {
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  color: #6a6a6a;
  letter-spacing: 0.2px;
}

/* Section 4: Large Typography */
.section-large-text {
  position: relative;
  min-height: 750px;
  display: flex;
  align-items: flex-start;
  padding: 120px 80px;
  overflow: hidden;
  background: #fff;
}

.large-text-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 1;
}

.large-text-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.large-text-container {
  flex: 1;
  max-width: 750px;
  padding-top: 60px;
}

.large-text-image-wrapper {
  flex: 0 0 auto;
  max-width: 450px;
}

.large-text-image {
  overflow: hidden;
  margin-bottom: 16px;
}

.large-text-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease, opacity 0.6s ease, filter 0.6s ease;
}

/* Large image hover effects */
.large-text-image[data-hover-effect="zoom"]:hover img {
  transform: scale(1.1);
}

.large-text-image[data-hover-effect="fade"]:hover img {
  opacity: 0.6;
}

.large-text-image[data-hover-effect="slide"]:hover img {
  transform: translateY(-20px);
}

.large-text-image[data-hover-effect="blur"]:hover img {
  filter: blur(4px);
}

.large-heading {
  font-family: 'Work Sans', sans-serif;
  font-size: 52px;
  font-weight: 300;
  line-height: 1.15;
  color: #000;
  letter-spacing: -0.5px;
}

.large-body-text {
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  color: #6a6a6a;
  margin-top: 32px;
  max-width: 600px;
  letter-spacing: 0.2px;
}

.image-caption {
  font-family: 'Work Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #2a2a2a;
  margin-top: 16px;
  letter-spacing: 0.8px;
  text-align: left;
}

/* Scroll-Lock Carousel Section */
.section-carousel {
  margin-top: 80px;
  margin-bottom: 80px;
  background: #fff;
  overflow: hidden;
}

#carousel-watermark-wrap {
  overflow: hidden;
}

#carousel-watermark-text {
  display: inline-block;
  font-size: 35vw;
  font-family: 'Work Sans', sans-serif;
  font-weight: 900;
  line-height: 1;
  opacity: 0.05;
  pointer-events: none;
  white-space: nowrap;
}

#carousel-watermark-text .carousel-italic {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
}

.brand-bold {
  text-transform: uppercase;
}

#carousel-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
}

#carousel-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#carousel-labels {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.carousel-label {
  position: absolute;
  font-family: 'Work Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.8px;
  pointer-events: none;
  transform: translate(0, -100%);
  transition: opacity 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#carousel-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.carousel-icon {
  position: absolute;
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
  pointer-events: none;
  transform: translate(-100%, 0);
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
  z-index: 20;
}

.carousel-icon svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
}

/* Centered Text Section (Below Carousel) */
.section-centered-text {
  padding: 0 80px 80px;
  background: #fff;
}

.centered-text-container {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.centered-large-heading {
  font-family: 'Work Sans', sans-serif;
  font-size: 52px;
  font-weight: 300;
  line-height: 1.15;
  color: #000;
  letter-spacing: -0.5px;
}

.centered-body-text {
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  color: #6a6a6a;
  margin-top: 32px;
  letter-spacing: 0.2px;
}

/* Section 5: Bottom Cards */
.section-cards {
  padding: 90px 80px 120px;
  background: #fff;
}

.cards-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px;
  position: relative;
}

.cards-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: #d0c9bd;
}

.card {
  text-align: center;
  padding: 0 40px;
  position: relative;
}

.card-icon {
  color: #ff6600;
  stroke: #ff6600;
  margin: 0 auto 8px;
  display: block;
}

.card h4 {
  font-family: 'Work Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #2a2a2a;
  margin-bottom: 18px;
  letter-spacing: 0.8px;
  line-height: 1.5;
}

.card p {
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.9;
  color: #6a6a6a;
  letter-spacing: 0.2px;
  margin-bottom: 30px;
}

.card-button {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid #ff6600;
  color: #2a2a2a;
  text-decoration: none;
  font-family: 'Work Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #2a2a2a;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.card-button:hover {
  color: #fff;
  border-color: #ff6600;
}

.card-button:hover::before {
  left: 0;
  background: #ff6600;
}

.flexible-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* Grid column spans */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* Grid column offsets */
.offset-1 { grid-column-start: 2; }
.offset-2 { grid-column-start: 3; }
.offset-3 { grid-column-start: 4; }
.offset-4 { grid-column-start: 5; }
.offset-5 { grid-column-start: 6; }
.offset-6 { grid-column-start: 7; }
.offset-7 { grid-column-start: 8; }
.offset-8 { grid-column-start: 9; }
.offset-9 { grid-column-start: 10; }
.offset-10 { grid-column-start: 11; }
.offset-11 { grid-column-start: 12; }

/* Content blocks */
.content-block {
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.content-block h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ff6600;
}

.content-block h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #333;
}

.content-block p {
  margin-bottom: 1rem;
}

.content-block img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ========================================
   FOOTER & CLOUDS
   ======================================== */

.clouds-footer {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: #87CEEB;
  z-index: 20;
  isolation: isolate;
}

.clouds-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.footer-content {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

.footer-logo {
  margin-bottom: 24px;
}

.footer-logo-image {
  max-height: 40px;
  width: auto;
  display: inline-block;
}

.footer-logo-text {
  font-family: 'Work Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-content p {
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #000;
  margin: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.clouds-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
  .header-text-left h1,
  .header-text-right h1 {
    font-size: 2rem;
  }

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

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

  .large-heading {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .header-text-left h1,
  .header-text-right h1 {
    font-size: 32px;
  }

  .header-text-left p,
  .header-text-right p {
    font-size: 16px;
  }

  .header-content {
    flex-direction: column;
    gap: 60px;
    padding: 0 40px;
  }

  .header-text-right {
    text-align: left;
    transform: translateX(40px);
  }

  .header-content.visible .header-text-right {
    transform: translateX(0);
  }

  /* Page sections mobile */
  .section-hero,
  .section-problems,
  .section-cards {
    padding: 60px 30px;
  }

  .hero-heading {
    font-size: 24px;
  }

  .problems-grid,
  .cards-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .large-heading {
    font-size: 32px;
  }

  .section-large-text {
    min-height: 500px;
    padding: 60px 30px;
  }

  .phone-mockup {
    width: 250px;
    height: 500px;
  }
}
