/* Custom CSS Variables */
:root {
  --color-primary: oklch(0.41 0.08 250);      /* Deep Blue */
  --color-secondary: oklch(0.95 0.015 80);    /* Warm Beige */
  --color-accent: oklch(0.68 0.12 35);        /* Terracotta */
  --font-heading: 'Inter', 'Outfit', sans-serif;
  --font-body: 'Inter', 'Open Sans', sans-serif;
  
  /* Notion/Slate export variables */
  --text-blue: #2563eb;
  --text-gray: #6b7280;
  --text-red: #dc2626;
  --text-green: #16a34a;
  --bg-gray: #f3f4f6;
  --bg-blue: #dbeafe;
}

/* Header smooth transitions */
.header-transition {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hero scroll indicator (up/down animation) */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
.scroll-indicator {
  animation: scroll-bounce 1.6s ease-in-out infinite;
}

/* Custom Components */
.btn-primary {
  background-color: var(--color-primary);
  color: white;
  font-weight: bold;
  padding: 1rem 2rem;
  border-radius: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: inline-block;
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--color-primary);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: inline-block;
}

.btn-secondary:hover {
  opacity: 0.9;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-primary-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  font-weight: bold;
  padding: 1rem 2rem;
  border-radius: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  display: inline-block;
}

.btn-primary-outline:hover {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   - sm: 640px  (large phones landscape)
   - md: 768px  (tablet portrait)
   - lg: 1024px (tablet landscape / small desktop)
   - xl: 1280px (desktop)
   ============================================ */

.section-container {
  padding: 3rem 1rem;
}

@media (min-width: 640px) {
  .section-container {
    padding: 3.5rem 1.5rem;
  }
}

@media (min-width: 768px) {
  .section-container {
    padding: 4rem 2rem;
  }
}

@media (min-width: 1024px) {
  .section-container {
    padding: 5rem 2rem;
  }
}

@media (min-width: 1280px) {
  .section-container {
    padding: 6rem 2rem;
  }
}

.section-title {
  font-size: 1.75rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2rem;
    margin-bottom: 1.75rem;
  }
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
    margin-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
  }
}

@media (min-width: 1280px) {
  .section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
  }
}

.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) {
  .card:hover {
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
  }
}

.nav-link {
  color: var(--color-primary);
  font-weight: 500;
  transition: color 0.3s, opacity 0.3s;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link.text-white {
  color: white;
}

.nav-link.text-white:hover {
  opacity: 0.8;
}

/* Navigation text color changes when scrolled */
header.scrolled .nav-link.text-white {
  color: var(--color-primary);
}

header.scrolled .nav-link.text-white:hover {
  color: var(--color-accent);
  opacity: 1;
}

header.scrolled a.text-white,
header.scrolled button.text-white,
header.scrolled .text-white,
header.scrolled .text-white button {
  color: var(--color-primary) !important;
}

header.scrolled #mobile-menu-button,
header.scrolled #tablet-menu-button {
  color: var(--color-primary);
}

header.scrolled #mobile-menu .text-white,
header.scrolled #tablet-menu .text-white {
  color: var(--color-primary) !important;
}

/* Light header style for pages without dark hero */
header.header-light .nav-link {
  color: var(--color-primary);
}

header.header-light .nav-link:hover {
  color: var(--color-accent);
}

.nav-link-mobile {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-primary);
  font-weight: 500;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link-mobile:hover {
  background-color: var(--color-secondary);
  transform: none;
}

.nav-link-mobile:active {
  transform: none;
}

/* Mobile menu text color when header is scrolled */
header.scrolled .nav-link-mobile {
  color: var(--color-primary);
}

header.scrolled .nav-link-mobile:hover {
  background-color: var(--color-secondary);
}

/* Tablet menu specific styles (2-column grid) */
#tablet-menu .nav-link-mobile {
  padding: 0.875rem 1rem;
  text-align: center;
  border: 1px solid transparent;
  background-color: rgba(255, 255, 255, 0.5);
}

#tablet-menu .nav-link-mobile:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

#tablet-menu .nav-link-mobile:active {
  transform: translateY(0);
}

/* Menu animation */
#mobile-menu,
#tablet-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Science Page: Sticky Chapter Navigation */
.chapter-nav {
  position: fixed;
  left: 1rem;
  top: 6rem;
  width: 16rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  z-index: 40;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.chapter-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
  border-left: 2px solid transparent;
  transition: all 0.3s ease;
}

.chapter-link:hover {
  background-color: white;
  color: var(--color-primary);
  border-left-color: var(--color-primary);
}

.chapter-link.active {
  background-color: white;
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Science Page: Content Area with Left Margin for Navigation */
.science-content {
  margin-left: 0;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .science-content {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .science-content {
    margin-left: 18rem;
    padding: 0 2rem;
  }
}

@media (min-width: 1280px) {
  .science-content {
    margin-left: 20rem;
  }
}

/* ============================================
   RESPONSIVE BUTTON SIZES
   ============================================ */

/* Tablet adjustments for primary buttons */
@media (min-width: 768px) and (max-width: 1023px) {
  .btn-primary {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
  }
  
  .btn-secondary {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* ============================================
   RESPONSIVE CARD STYLES
   ============================================ */

.card {
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .card {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .card {
    padding: 1.75rem;
  }
}

/* FAQ Styles */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

.faq-question {
  cursor: pointer;
}

.faq-icon {
  transition: transform 0.3s;
}

.faq-icon.rotate-180 {
  transform: rotate(180deg);
}

/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: clip;
}

/* Smooth scroll + base font (1rem = 15px, mobile = 16px) */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (min-width: 640px) {
  html {
    font-size: 15px;
  }
}

/* Text balance utility */
.text-balance {
  text-wrap: balance;
}

/* Fade-in Animation Classes */
.fade-in,
.section-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: 0s;
}

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

/* Delay classes for staggered animations */
.fade-in.delay-200 {
  transition-delay: 0.2s;
}

.fade-in.delay-400 {
  transition-delay: 0.4s;
}

.fade-in.delay-600 {
  transition-delay: 0.6s;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Larger shadows for all boxes */
.faq-item {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) {
  .faq-item:hover {
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
  }
}

/* Hover effects for links */
a[href^="#"],
a[href^="/"] {
  transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

a[href^="#"]:hover,
a[href^="/"]:hover {
  transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect for topic cards */
.card a {
  transition: color 0.3s ease, transform 0.3s ease;
}

.card a:hover {
  color: var(--color-accent);
  transform: translateX(4px);
}

/* Footer with blur multi-gradient background */
footer {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.95) 0%,
    rgba(30, 41, 59, 0.9) 25%,
    rgba(51, 65, 85, 0.85) 50%,
    rgba(30, 41, 59, 0.9) 75%,
    rgba(15, 23, 42, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

footer > * {
  position: relative;
  z-index: 1;
}

/* Booking Modal Styles */
#booking-modal {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#booking-modal.show {
  display: flex !important;
  opacity: 1;
}

#booking-modal.show .modal-container {
  transform: scale(1);
  opacity: 1;
}

.modal-container {
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Form Input Focus Styles */
input:focus,
textarea:focus {
  outline: none;
}

/* What-is-it: prose grids one column on mobile */
#what-is-it .prose .grid.grid-cols-3 {
  grid-template-columns: 1fr;
}
#what-is-it .prose .grid.grid-cols-2 {
  grid-template-columns: 1fr;
}
/* What-is-it: place the cross icon left of text on mobile */
#what-is-it .prose .grid.grid-cols-2 .card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  align-items: start;
}
#what-is-it .prose .grid.grid-cols-2 .card > .text-2xl {
  margin-bottom: 0;
}
#what-is-it .prose .grid.grid-cols-2 .card > h4,
#what-is-it .prose .grid.grid-cols-2 .card > p {
  grid-column: 2;
}
@media (min-width: 768px) {
  #what-is-it .prose .grid.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  #what-is-it .prose .grid.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  #what-is-it .prose .grid.grid-cols-2 .card {
    display: block;
  }
  #what-is-it .prose .grid.grid-cols-2 .card > .text-2xl {
    margin-bottom: 0.5rem;
  }
}

/* Prose/Content Styling for CMS content */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: #374151;
}

.prose p {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.prose p:first-child {
  margin-top: 0;
}

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

.prose-lg {
  font-size: 1.125rem;
  line-height: 1.8;
}

.prose-lg p {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose th,
.prose td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  text-align: left;
}

@media (max-width: 639px) {
  .prose th,
  .prose td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }
}

.prose th {
  background-color: var(--color-secondary);
  font-weight: 600;
  color: var(--color-primary);
}

.prose tr:nth-child(even) {
  background-color: #f9fafb;
}

.prose tr:hover {
  background-color: #f3f4f6;
}

.prose blockquote {
  border-left: 4px solid var(--color-accent);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background-color: #f9fafb;
  font-style: italic;
  color: #4b5563;
}

.prose blockquote p {
  margin: 0;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.prose ul,
.prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.prose ul {
  list-style-type: disc;
  list-style-position: outside;
}

.prose ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2rem 0;
}

.prose strong {
  font-weight: 600;
  color: #1f2937;
}

.prose a {
  color: var(--color-primary);
  text-decoration: underline;
}

.prose a:hover {
  opacity: 0.8;
}

/* Prose on dark background (e.g. base package description) */
.prose.prose-invert,
.prose-invert.prose {
  color: #fff;
}.prose-invert.prose p,
.prose-invert.prose li,
.prose-invert.prose strong {
  color: #fff;
}

.prose-invert.prose a {
  color: rgba(255, 255, 255, 0.9);
}.prose-invert.prose a:hover {
  color: #fff;
}

/* Hero description: moderate sizing for readability */
#hero .prose,
#hero .prose p {
  font-size: 1.25rem !important;    /* text-xl */
  line-height: 1.6 !important;
  margin-top: 0 !important;
  margin-bottom: 0.5em !important;
}

@media (min-width: 640px) {
  #hero .prose,
  #hero .prose p {
    font-size: 1.375rem !important;
  }
}

@media (min-width: 768px) {
  #hero .prose,
  #hero .prose p {
    font-size: 1.5rem !important;   /* text-2xl */
  }
}