/* style.css - Design System & Layout */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600;700;800;900&display=swap');
/* --- Custom Properties --- */
:root {
  --color-white: #FFFFFF;
  --color-dark: #242121;
  --color-red: #BD0606;
  --color-red-rgb: 189, 6, 6;
  --color-dark-rgb: 36, 33, 33;
  --color-white-rgb: 255, 255, 255;
  
  --font-primary: 'Onest', sans-serif;
  --header-height: 80px;
  --transition-smooth: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.3s ease;
  
  /* Logo defaults */
  --logo-current-color: var(--color-white);
  --logo-scale: 1;
  --logo-rotate: 0deg;
}
/* --- CSS Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  font-family: var(--font-primary);
  background-color: var(--color-dark);
  color: var(--color-white);
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Hide Scrollbars but keep functionality */
::-webkit-scrollbar {
  display: none;
}
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
/* --- Theme Declarations --- */
section.theme-dark {
  --text-color: var(--color-white);
  --text-color-muted: rgba(255, 255, 255, 0.65);
  --bg-overlay: linear-gradient(135deg, rgba(36, 33, 33, 0.96) 0%, rgba(36, 33, 33, 0.7) 50%, rgba(36, 33, 33, 0.96) 100%);
  --accent-color: var(--color-red);
  --border-color: rgba(255, 255, 255, 0.15);
  --card-bg: rgba(255, 255, 255, 0.03);
  --shadow-color: rgba(0, 0, 0, 0.5);
  background-color: var(--color-dark);
}
section.theme-light {
  --text-color: var(--color-dark);
  --text-color-muted: rgba(36, 33, 33, 0.7);
  --bg-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(245, 245, 245, 0.98) 100%);
  --accent-color: var(--color-red);
  --border-color: rgba(36, 33, 33, 0.15);
  --card-bg: rgba(36, 33, 33, 0.03);
  --shadow-color: rgba(0, 0, 0, 0.05);
  background-color: var(--color-white);
}
section.theme-red {
  --text-color: var(--color-white);
  --text-color-muted: rgba(255, 255, 255, 0.8);
  --bg-overlay: linear-gradient(135deg, rgba(189, 6, 6, 0.96) 0%, rgba(36, 33, 33, 0.75) 50%, rgba(36, 33, 33, 0.96) 100%);
  --accent-color: var(--color-white);
  --border-color: rgba(255, 255, 255, 0.25);
  --card-bg: rgba(255, 255, 255, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.4);
  background-color: var(--color-red);
}
/* --- Layout Elements --- */
/* Fixed Header */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4%;
  z-index: 100;
  pointer-events: none;
}
.header-brand {
  pointer-events: auto;
  color: var(--color-white);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
}
.header-brand:hover {
  opacity: 0.8;
}
.header-brand span {
  color: var(--color-red);
}
.menu-trigger {
  pointer-events: auto;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  padding: 0;
}
.menu-trigger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  transition: var(--transition-fast);
}
/* Side Navigation Indicators */
.side-indicators {
  position: fixed;
  right: 3%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}
.indicator-dot:hover,
.indicator-dot.active {
  background-color: var(--color-red);
  transform: scale(1.5);
  box-shadow: 0 0 10px var(--color-red);
}
/* --- Central Floating Logo --- */
.center-logo-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--logo-scale)) rotate(var(--logo-rotate));
  width: 160px;
  height: 160px;
  z-index: 50;
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.center-logo {
  width: 100%;
  height: 100%;
  background-color: var(--logo-current-color);
  mask: url("https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Toyota_EU.svg/960px-Toyota_EU.svg.png") no-repeat center;
  -webkit-mask: url("https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Toyota_EU.svg/960px-Toyota_EU.svg.png") no-repeat center;
  mask-size: contain;
  -webkit-mask-size: contain;
  transition: background-color 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
/* --- Section Panel Setup --- */
section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  width: 100vw;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6%;
  overflow: hidden;
}
/* Background Zoom and Gradients */
.section-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transform: scale(1.08);
  transition: transform 1.8s cubic-bezier(0.25, 1, 0.5, 1);
}
section.active .section-bg {
  transform: scale(1);
}
.section-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: 2;
  transition: background 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
/* Section Grid Layout */
.section-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  display: grid;
  grid-template-columns: 1.1fr 180px 1.1fr;
  align-items: center;
  gap: 30px;
  color: var(--text-color);
  transition: color 0.8s ease;
}
/* Left & Right Column Placements */
.col-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.col-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
/* Layout Alternations */
.layout-left .col-text {
  grid-column: 1;
}
.layout-left .col-visual {
  grid-column: 3;
}
.layout-right .col-text {
  grid-column: 3;
}
.layout-right .col-visual {
  grid-column: 1;
}
/* Typography Details */
.section-num {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--accent-color);
  opacity: 0.15;
  margin-bottom: -15px;
}
.section-title {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 25px;
  position: relative;
  padding-left: 15px;
  border-left: 4px solid var(--accent-color);
}
.section-desc {
  font-size: clamp(1rem, 1.2vw, 1.35rem);
  line-height: 1.6;
  color: var(--text-color-muted);
  margin-bottom: 30px;
  font-weight: 300;
}
.accent-block {
  font-size: clamp(1.1rem, 1.4vw, 1.6rem);
  font-weight: 600;
  color: var(--text-color);
  border-left: 2px solid var(--accent-color);
  padding-left: 20px;
  margin-bottom: 25px;
  line-height: 1.4;
}
/* Interactive Cards */
.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 10px 30px var(--shadow-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  transition: var(--transition-smooth);
}
.info-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}
/* --- Specific Section Styles --- */
/* Hero Panel */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  width: 100%;
  z-index: 10;
  max-width: 900px;
}
.hero-subtitle {
  font-size: clamp(0.9rem, 1.3vw, 1.4rem);
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 20px;
  font-weight: 700;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin-bottom: 30px;
}
.hero-objective {
  font-size: clamp(1rem, 1.3vw, 1.4rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
  font-weight: 300;
  max-width: 700px;
}
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  animation: bounce 2s infinite ease-in-out;
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
/* Visual Components (SVG Graphs & Maps) */
.visual-container {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.chart-svg, .map-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}
.graph-grid {
  stroke: var(--border-color);
  stroke-dasharray: 4,4;
}
.bar-rect {
  transition: height 1.5s cubic-bezier(0.25, 1, 0.5, 1), y 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.line-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s cubic-bezier(0.25, 1, 0.5, 1);
}
section.active .line-path {
  stroke-dashoffset: 0;
}
/* Flags and Nodes */
.flag-container {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}
.flag-svg {
  width: 55px;
  height: 35px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.map-node {
  fill: var(--color-red);
  stroke: var(--color-white);
  stroke-width: 2;
  cursor: pointer;
  transition: transform 0.3s ease, fill 0.3s ease;
}
.map-node:hover {
  transform: scale(1.6);
  fill: var(--color-white);
  stroke: var(--color-red);
}
.node-pulse {
  animation: pulse 2s infinite ease-out;
  transform-origin: center;
}
@keyframes pulse {
  0% { r: 6px; opacity: 1; }
  100% { r: 20px; opacity: 0; }
}
/* Statistics Big numbers */
.stat-box {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}
.stat-number {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1;
}
.stat-label {
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-color-muted);
  font-weight: 600;
  margin-top: 5px;
}
/* --- Sources & Citation Section --- */
.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}
.sources-list li {
  font-size: clamp(0.95rem, 1.1vw, 1.2rem);
  line-height: 1.6;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  color: var(--text-color-muted);
}
.sources-list li strong {
  color: var(--accent-color);
  font-weight: 600;
  display: inline-block;
  min-width: 200px;
}
.sources-list a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-color);
  transition: var(--transition-fast);
}
.sources-list a:hover {
  color: var(--color-red);
  border-color: var(--color-red);
}
/* --- Scroll Reveal Animations --- */
.reveal-el {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal-el.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-el.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-el.reveal-delay-3 { transition-delay: 0.45s; }
section.active .reveal-el {
  opacity: 1;
  transform: translateY(0);
}
/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .center-logo-container {
    width: 120px;
    height: 120px;
  }
  
  .section-content {
    grid-template-columns: 1.2fr 130px 1.2fr;
    gap: 20px;
  }
}
/* Mobile & Portrait Viewports */
@media (max-width: 900px) {
  html, body {
    scroll-snap-type: none; /* disable snap scroll for better mobile readability */
  }
  
  section {
    min-height: auto;
    padding: 100px 6% 60px 6%;
    scroll-snap-align: none;
  }
  
  .center-logo-container {
    position: fixed;
    top: 25px;
    left: auto;
    right: 4%;
    transform: none !important;
    width: 35px;
    height: 35px;
    z-index: 110;
  }
  
  .header-nav {
    background: rgba(36, 33, 33, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    pointer-events: auto;
    padding: 0 6%;
  }
  
  .side-indicators {
    display: none; /* hide side dots on mobile */
  }
  
  .section-content {
    grid-template-columns: 1fr; /* stack single column */
    gap: 40px;
  }
  
  .layout-left .col-text, .layout-right .col-text {
    grid-column: 1;
    order: 1;
  }
  
  .layout-left .col-visual, .layout-right .col-visual {
    grid-column: 1;
    order: 2;
    margin-top: 20px;
  }
  
  .section-title {
    margin-top: 15px;
  }
  
  .visual-container {
    max-width: 100%;
    aspect-ratio: 1.3;
  }
}
/* --- New Layout Layout-New Overrides --- */
.layout-new {
  --header-height: 90px;
}
.layout-new .header-brand {
  color: var(--logo-current-color);
}
.layout-new .header-brand span {
  color: inherit;
}
.layout-new .menu-trigger span {
  background-color: var(--logo-current-color);
}
.layout-new .center-logo-container {
  top: 9px;
  left: 50%;
  transform: translate(-50%, 0) scale(var(--logo-scale)) rotate(var(--logo-rotate));
  width: 72px;
  height: 72px;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.layout-new .section-content {
  grid-template-columns: 1.1fr 1.1fr;
  gap: 60px;
}
.layout-new .layout-left .col-text {
  grid-column: 1;
}
.layout-new .layout-left .col-visual {
  grid-column: 2;
}
.layout-new .layout-right .col-text {
  grid-column: 2;
}
.layout-new .layout-right .col-visual {
  grid-column: 1;
}
@media (max-width: 900px) {
  .layout-new .section-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .layout-new .center-logo-container {
    left: 50%;
    right: auto;
    transform: translate(-50%, 0) !important;
  }
}
