@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Color Palette - Warm Sand Paper theme */
  --bg-primary: #fcfaf7; /* Sand-white background */
  --bg-secondary: #f5f0ea; /* Sand-beige */
  --bg-surface: #ffffff; /* Pure white */
  --border-color: rgba(28, 26, 23, 0.08); /* Minimalist border */
  
  --accent-clay: #d9774a; /* Terracotta orange clay */
  
  --text-primary: #1c1a17; /* Dark slate charcoal */
  --text-secondary: #5c564f; /* Muted grey */
  --text-muted: #9c948b;
  
  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --container-width: 1200px;
  --transition-smooth: all 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Reset & Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  overflow-x: hidden;
  timeline-scope: --tl-1, --tl-2, --tl-3, --tl-4, --tl-5, --tl-6, --tl-7;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #ede6da;
  border-radius: 4px;
}



/* Header & Logo styling */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 76px;
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(252, 250, 247, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
}

.site-logo {
  height: 42px; /* Elegant height to fit beautifully inside the 76px header */
  width: auto;
  display: block;
  object-fit: contain;
}

/* Sticky Viewport Split Stage */
#scrolly-view {
  position: sticky;
  top: 76px; /* Sits immediately below the header */
  height: calc(100vh - 76px);
  width: 100vw;
  overflow: hidden;
  z-index: 5;
  background: transparent;
  pointer-events: none;
}

/* Background Image Stage */
.image-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--bg-primary);
}

.image-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out; /* Smooth cross-fade */
  pointer-events: none;
}

.image-layer.active-layer {
  opacity: 1;
  pointer-events: all;
}

.image-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Full-bleed layout */
}

/* Text Overlay Stage - positioned on the right half */
.copy-stage {
  position: absolute;
  right: 0;
  top: 0;
  width: 50vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* Floating semi-transparent text card */
.copy-container {
  position: relative;
  width: 85%;
  max-width: 440px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(252, 250, 247, 0.85); /* Semi-transparent sand-white */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  border: 1px solid rgba(28, 26, 23, 0.08);
  padding: 32px 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  pointer-events: all;
}

.copy-block {
  position: absolute;
  width: calc(100% - 80px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.copy-block.active-block {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.editorial-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.editorial-badge-accent {
  color: var(--accent-clay);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: inline-block;
}

.copy-block p {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Scroll Trigger Track */
#scroll-track {
  position: relative;
  width: 100%;
}

.scroll-marker {
  height: 100vh;
  width: 100%;
  pointer-events: none;
}

/* Checkpoint timelines */
#marker-1 { view-timeline: --tl-1 block; }
#marker-2 { view-timeline: --tl-2 block; }
#marker-3 { view-timeline: --tl-3 block; }
#marker-4 { view-timeline: --tl-4 block; }
#marker-5 { view-timeline: --tl-5 block; }
#marker-6 { view-timeline: --tl-6 block; }
#marker-7 { view-timeline: --tl-7 block; }

/* CSS Keyframes for crossfading image layers */
@keyframes fade-layer-1 {
  0%, 75% { opacity: 1; }
  85%, 100% { opacity: 0; }
}

@keyframes fade-layer-middle {
  0%, 15% { opacity: 0; }
  25%, 75% { opacity: 1; }
  85%, 100% { opacity: 0; }
}

@keyframes fade-layer-final {
  0%, 15% { opacity: 0; }
  25%, 100% { opacity: 1; }
}

/* Non-overlapping text transitions (Quick fade in/out, longer stay time) */
@keyframes scrolly-fade-text {
  0%, 15% {
    opacity: 0;
    transform: translateY(20px);
  }
  25%, 75% {
    opacity: 1;
    transform: translateY(0);
  }
  85%, 100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes scrolly-fade-text-cover {
  0%, 75% {
    opacity: 1;
    transform: translateY(0);
  }
  85%, 100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes scrolly-fade-text-global {
  0%, 15% {
    opacity: 0;
    transform: translateY(20px);
  }
  25%, 100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply CSS Scroll animations natively if supported (Desktop only) */
@media (min-width: 901px) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    /* Image Layers scroll binding */
    .image-layer:nth-child(1) { animation: fade-layer-1 linear both; animation-timeline: --tl-1; animation-range: cover 0% cover 100%; }
    .image-layer:nth-child(2) { animation: fade-layer-middle linear both; animation-timeline: --tl-2; animation-range: cover 0% cover 100%; }
    .image-layer:nth-child(3) { animation: fade-layer-middle linear both; animation-timeline: --tl-3; animation-range: cover 0% cover 100%; }
    .image-layer:nth-child(4) { animation: fade-layer-middle linear both; animation-timeline: --tl-4; animation-range: cover 0% cover 100%; }
    .image-layer:nth-child(5) { animation: fade-layer-middle linear both; animation-timeline: --tl-5; animation-range: cover 0% cover 100%; }
    .image-layer:nth-child(6) { animation: fade-layer-middle linear both; animation-timeline: --tl-6; animation-range: cover 0% cover 100%; }
    .image-layer:nth-child(7) { animation: fade-layer-final linear both; animation-timeline: --tl-7; animation-range: cover 0% cover 100%; }
    
    /* Text Blocks scroll binding */
    .copy-block:nth-child(1) { animation: scrolly-fade-text-cover linear both; animation-timeline: --tl-1; animation-range: cover 0% cover 100%; }
    .copy-block:nth-child(2) { animation: scrolly-fade-text linear both; animation-timeline: --tl-2; animation-range: cover 0% cover 100%; }
    .copy-block:nth-child(3) { animation: scrolly-fade-text linear both; animation-timeline: --tl-3; animation-range: cover 0% cover 100%; }
    .copy-block:nth-child(4) { animation: scrolly-fade-text linear both; animation-timeline: --tl-4; animation-range: cover 0% cover 100%; }
    .copy-block:nth-child(5) { animation: scrolly-fade-text linear both; animation-timeline: --tl-5; animation-range: cover 0% cover 100%; }
    .copy-block:nth-child(6) { animation: scrolly-fade-text linear both; animation-timeline: --tl-6; animation-range: cover 0% cover 100%; }
    .copy-block:nth-child(7) { animation: scrolly-fade-text-global linear both; animation-timeline: --tl-7; animation-range: cover 0% cover 100%; }
  }
}


/* Accessibility Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .image-layer, .copy-block {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .image-layer {
    position: relative;
    height: auto;
    width: 100%;
    margin-bottom: 24px;
  }
  #scrolly-view {
    position: relative;
    height: auto;
    flex-direction: column;
    pointer-events: all;
  }
  .copy-stage {
    width: 100%;
    height: auto;
  }
}

/* Responsive adjust */
/* Responsive adjust */
@media (max-width: 900px) {
  #scroll-track {
    display: none !important;
  }

  #scrolly-view {
    position: relative !important;
    top: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    margin-top: 76px !important; /* Offset for fixed header */
    padding: 0 !important;
    pointer-events: all !important;
    background: var(--bg-primary) !important;
  }

  .image-stage,
  .copy-stage,
  .copy-container {
    display: contents !important;
  }

  .image-layer {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 55vh !important;
    min-height: 300px !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: all !important;
    display: block !important;
    z-index: 1 !important;
  }

  .image-layer img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .copy-block {
    position: relative !important;
    width: calc(100% - 32px) !important;
    max-width: 500px !important;
    margin: -40px auto 48px auto !important;
    padding: 32px 24px !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: all !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    background: rgba(252, 250, 247, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(28, 26, 23, 0.08) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    z-index: 2 !important;
  }

  .copy-block:last-of-type {
    margin-bottom: 24px !important;
  }

  /* Interleaving Order */
  #layer-1 { order: 1 !important; }
  #text-1  { order: 2 !important; }
  #layer-2 { order: 3 !important; }
  #text-2  { order: 4 !important; }
  #layer-3 { order: 5 !important; }
  #text-3  { order: 6 !important; }
  #layer-4 { order: 7 !important; }
  #text-4  { order: 8 !important; }
  #layer-5 { order: 9 !important; }
  #text-5  { order: 10 !important; }
  #layer-6 { order: 11 !important; }
  #text-6  { order: 12 !important; }
  #layer-7 { order: 13 !important; }
  #text-7  { order: 14 !important; }
}

/* Scrollytelling Wrapper to constrain sticky bounds */
.scrollytelling-wrapper {
  position: relative;
  width: 100%;
}

/* Full-Width Info Section below scrollytelling */
.full-width-block {
  width: 100%;
  background: var(--bg-primary); /* Sand-beige baseline */
  padding: 120px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  z-index: 20;
}

.info-container {
  max-width: 900px;
  width: 90%;
  padding: 64px 80px;
  background: rgba(252, 250, 247, 0.88); /* Semi-transparent sand-white block */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(28, 26, 23, 0.08);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 10;
}

.info-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.info-text {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
  text-align: left;
}

.info-text p {
  margin-bottom: 20px;
}

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

@media (max-width: 900px) {
  .full-width-block {
    padding: 80px 16px;
    min-height: auto;
  }
  .info-container {
    width: 100%;
    padding: 40px 24px;
    gap: 30px;
  }
}

/* Chart Block at the very bottom */
.chart-block {
  width: 100%;
  background: var(--bg-surface);
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 20;
  overflow: hidden;
}

.chart-image-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}

.chart-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Why Choose Section (Footer text block) */
.footer-text-block {
  width: 100%;
  background: var(--bg-primary); /* Sand-beige */
  padding: 120px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 20;
}

.footer-text-container {
  max-width: 960px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  text-align: center;
}

.footer-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.footer-desc {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 800px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-cta {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 700;
  color: var(--accent-clay);
  letter-spacing: -0.01em;
  margin-top: 12px;
  line-height: 1.3;
}

.footer-branding {
  width: 100%;
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.footer-brand-tagline {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.6;
  max-width: 700px;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-contacts h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.footer-contacts p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.footer-contacts a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--text-primary);
  transition: var(--transition-fast);
}

.footer-contacts a:hover {
  color: var(--accent-clay);
  border-bottom-color: var(--accent-clay);
}

@media (max-width: 900px) {
  .footer-text-block {
    padding: 80px 16px;
  }
  .footer-text-container {
    gap: 36px;
  }
  .footer-branding {
    padding: 24px 0;
  }
}
