/* chassis-workshop.css - Redesign aligning with High-Tech Premium Aesthetic */

:root {
  --bg-color: #0a0a0a;
  --accent-red: #e8001d;
  --text-dark: #ffffff;
  --text-gray: #888;
  --font-family: 'Barlow', sans-serif;
  --font-display: 'Barlow Condensed', sans-serif;
}

body.cw-dark-body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-family: var(--font-family);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

.cw-main-content {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-50 {
  margin-top: 50px;
}

.highlight-red {
  color: #E10600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  margin-top: 0;
  color: var(--text-dark);
}

.section-label {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.25em;
  font-size: 0.9rem;
  color: var(--accent-red);
  margin-bottom: 12px;
  display: inline-block;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 30px;
}

.section-heading em {
  color: var(--accent-red);
  font-style: italic;
}


/* 1. HERO SECTION */
.cw-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../../images/gallery/DSC_0698.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Parallax effect */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0a0a0a 0%, rgba(10, 10, 10, 0.4) 100%);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
  margin-top: -80px;
}

.hero-text-wrap {
  text-align: center;
}

.cw-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 25px;
  letter-spacing: -1px;
}

.hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.scroll-indicator {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.7;
  animation: bounce 2s infinite ease-in-out;
}

.scroll-indicator span {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
}

@keyframes bounce {

  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 10px);
  }
}


/* 2. PHILOSOPHY SPLIT SECTION */
.split-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 100px 5%;
  gap: 60px;
  max-width: 1800px;
  margin: 0 auto;
}

.split-section--reverse {
  flex-direction: row-reverse;
}

.split-media {
  flex: 1;
  min-width: 320px;
  position: relative;
}

.wireframe-visual {
  width: 100%;
  aspect-ratio: 4/3;
  background: #111;
  border-radius: 20px;
  border: 1px solid #333;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wireframe {
  position: absolute;
  border: 2px dashed #444;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  letter-spacing: 2px;
  color: #666;
}

.wireframe.prev-year {
  width: 80%;
  height: 80%;
}

.wireframe.curr-year {
  width: 60%;
  height: 60%;
  border-color: var(--accent-red);
  color: var(--accent-red);
  border-style: solid;
}

.split-media-tag {
  position: absolute;
  bottom: -15px;
  right: -15px;
  background: var(--accent-red);
  color: #fff;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.split-content {
  flex: 1;
  min-width: 320px;
}

.split-content p {
  font-size: 1.15rem;
  color: #aaa;
  line-height: 1.7;
  margin-bottom: 30px;
}

.callout-badge {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 15px 25px;
  background: #1a1a1c;
  border-left: 4px solid var(--accent-red);
  font-size: 1rem;
  color: #fff;
  font-weight: 500;
}


/* 3. KEY PERFORMANCE INDICATORS (Bento Grid) */
.bento-section {
  background: #0d0d0f;
  padding: 80px 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.glass-card {
  background: #1a1a1c;
  padding: 40px;
  border-radius: 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
}

.dc-num {
  font-family: var(--font-display);
  color: var(--accent-red);
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.kpi-value {
  font-size: 2.5rem;
  font-family: var(--font-display);
  margin-bottom: 10px;
  line-height: 1;
}

.glass-card p {
  color: #888;
  font-size: 0.95rem;
}

.bento-icon {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 20px;
}

/* Icon + Heading inline row */
.card-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-header-row .bento-icon {
  font-size: 2rem;
  margin-bottom: 0;
  color: #fff;
  flex-shrink: 0;
}

.card-header-row .kpi-value {
  margin-bottom: 0;
}


/* 4. MATERIAL SCIENCE (Tabs) */
.cw-materials {
  padding: 100px 0;
}

.tabs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab-btn {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  padding: 12px 30px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 40px;
}

.tab-btn:hover,
.tab-btn.active {
  border-color: var(--accent-red);
  color: #fff;
}

.tab-btn.active {
  background: var(--accent-red);
}

.tab-content {
  display: none;
  max-width: 600px;
  text-align: center;
  animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
  display: block;
}

.tab-content p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #ddd;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* 5. TECH STACK */
.cw-tech-stack {
  padding: 60px 0 100px;
  background: #0d0d0f;
  overflow: hidden;
}

.marquee-track-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  padding: 20px 0;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
  display: inline-block;
  animation: marqueeScroll 30s linear infinite;
}

.text-logo {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  /* Dark muted text for background effect */
  margin: 0 50px;
  text-transform: uppercase;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.split-layout.align-center {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.tech-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-left: 3px solid #333;
  transition: border-color 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent-red);
}

.feature-card h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #fff;
}

.feature-card p {
  color: #aaa;
  font-size: 0.95rem;
  margin: 0;
}

.tech-stack-desc {
  flex: 1;
}

.tech-stack-desc p {
  color: #aaa;
  font-size: 1.15rem;
  line-height: 1.7;
}


/* --- Overcoming Design Constraints (Challenges Solved) --- */
.cw-problems {
  background-color: var(--bg-color);
  padding-top: 40px;
  padding-bottom: 40px;
}

.cw-problems .glass-card {
  background: rgba(255, 255, 255, 0.02);
  background-image: linear-gradient(135deg, rgba(232, 0, 29, 0.06) 0%, transparent 50%);
}

.cw-problems .glass-card:hover {
  box-shadow: 0 8px 24px rgba(232, 0, 29, 0.15);
}

.cw-problems .kpi-value {
  font-size: 2rem;
  font-family: var(--font-display);
}

/* 6. ADVANCED PACKAGING (X-RAY SLIDER) */
.xray-section {
  background-color: #111111;
  padding: 6rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.xray-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4rem;
}

.xray-content {
  flex: 1;
  min-width: 300px;
}

.xray-subheading {
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-family: var(--font-primary, sans-serif);
}

.xray-heading {
  color: #ffffff;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  font-family: var(--font-display, "Barlow Condensed", sans-serif);
}

.xray-accent {
  color: #dc2626;
  font-style: italic;
}

.xray-paragraph {
  color: #9ca3af;
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 300;
  max-width: 500px;
  font-family: var(--font-primary, "Barlow", sans-serif);
}

/* Slider Wrapper */
.xray-slider-wrapper {
  flex: 1.5;
  min-width: 300px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: #0a0a0a;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  aspect-ratio: 16/9;
  cursor: col-resize;
  user-select: none;
  -webkit-user-drag: none;
}

.xray-base-img,
.xray-top-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transform: scale(1.3);
  transform-origin: center center;
}

.xray-base-img {
  z-index: 1;
}

.xray-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  will-change: clip-path;
}

/* Labels */
.xray-label {
  position: absolute;
  top: 1.5rem;
  z-index: 4;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 4px;
  pointer-events: none;
  font-family: var(--font-primary, sans-serif);
  transition: opacity 0.2s ease;
}

.xray-label-right {
  right: 1.5rem;
}

.xray-label-left {
  left: 1.5rem;
  z-index: 5;
}

/* Handle */
.xray-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: #dc2626;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: left;
}

.xray-handle-thumb {
  width: 48px;
  height: 48px;
  background-color: #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.24);
  border: 4px solid #111111;
  transition: transform 0.1s ease;
}

.xray-slider-wrapper:active .xray-handle-thumb {
  transform: scale(0.9);
}

.xray-handle-thumb i {
  color: white;
  font-size: 1.25rem;
}

@media (max-width: 991px) {
  .xray-container {
    flex-direction: column;
    gap: 3rem;
  }

  .xray-slider-wrapper {
    width: 100%;
  }

  .xray-content {
    width: 100%;
  }
}

/* 7. WORKSHOP STANDARD (Before/After) */
.slider-container {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.ba-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #222;
  cursor: ew-resize;
}

.ba-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Hardcode dark solid colors or pattern for "Before/After" if no specific images are provided */
.ba-after {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%231a1a1c" width="100" height="100"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="%23333" stroke-width="1"/></svg>') repeat;
}

.ba-before {
  /* Using clip path to hide right side */
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%233c2a21" width="100" height="100"/><rect fill="%2348342a" width="50" height="100"/></svg>') repeat;
  border-right: 2px solid var(--accent-red);
}

.ba-label {
  position: absolute;
  top: 20px;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.8rem;
  font-family: var(--font-display);
  letter-spacing: 1px;
}

.ba-label-before {
  left: 20px;
}

.ba-label-after {
  right: 20px;
}

.ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent-red);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.ba-slider-handle::after {
  content: '< >';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-red);
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-family: monospace;
}

/* =========================================================================
   MOBILE RESPONSIVE — Compact Layout (≤ 600px)
   Blinkit/Zepto-style: tight padding, smaller fonts, optimal screen usage
   ========================================================================= */
@media (max-width: 768px) {

  /* --- Global --- */
  .container {
    padding: 32px 12px;
  }

  .mt-50 {
    margin-top: 24px;
  }

  /* --- Typography --- */
  .section-label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    margin-bottom: 6px;
  }

  .section-heading {
    font-size: clamp(2rem, 7vw, 3rem);
    margin-bottom: 16px;
    line-height: 1;
  }

  /* --- Hero --- */
  .cw-hero {
    height: 85vh;
    background-attachment: scroll;     /* Fix iOS fixed bg issue */
  }

  .hero-container {
    margin-top: -40px;
    padding: 0 12px;
  }

  .cw-hero-title {
    font-size: clamp(2.2rem, 9vw, 3.5rem);
    margin-bottom: 14px;
    line-height: 1;
  }

  .hero-lead {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .scroll-indicator span {
    font-size: 0.7rem;
  }

  /* --- Philosophy Split --- */
  .split-section {
    padding: 40px 4%;
    gap: 24px;
    flex-direction: column;
  }

  .split-media {
    min-width: unset;
    width: 100%;
  }

  .split-content {
    min-width: unset;
    width: 100%;
  }

  .split-content p {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .callout-badge {
    padding: 10px 14px;
    font-size: 0.82rem;
    gap: 8px;
  }

  .split-media-tag {
    font-size: 0.7rem;
    padding: 8px 12px;
    bottom: -8px;
    right: -8px;
  }

  /* --- Bento Grid / Glass Cards --- */
  .bento-section {
    padding: 40px 0;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .glass-card {
    padding: 16px;
    border-radius: 12px;
  }

  .glass-card p {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .kpi-value {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .cw-problems .kpi-value {
    font-size: 1.2rem;
    line-height: 1.15;
  }

  .dc-num {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }

  .bento-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  /* --- Material Science Tabs --- */
  .cw-materials {
    padding: 48px 0;
  }

  .tab-btn {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  .tab-content p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* --- Tech Stack --- */
  .cw-tech-stack {
    padding: 32px 0 48px;
  }

  .text-logo {
    font-size: 1.5rem;
    margin: 0 20px;
  }

  .split-layout.align-center {
    gap: 24px;
  }

  .feature-card {
    padding: 16px;
  }

  .feature-card h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }

  .feature-card p {
    font-size: 0.8rem;
  }

  .tech-stack-desc p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  /* --- Workshop Standard (inline-style section) --- */
  .workshop-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* --- X-Ray Slider --- */
  .xray-section {
    padding: 3rem 1rem;
  }

  .xray-container {
    gap: 2rem;
  }

  .xray-heading {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    margin-bottom: 1rem;
  }

  .xray-paragraph {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .xray-subheading {
    font-size: 0.72rem;
  }

  .xray-label {
    font-size: 0.6rem;
    padding: 0.35rem 0.6rem;
    top: 0.75rem;
  }

  .xray-label-right {
    right: 0.75rem;
  }

  .xray-label-left {
    left: 0.75rem;
  }

  .xray-handle-thumb {
    width: 36px;
    height: 36px;
  }

  .xray-handle-thumb i {
    font-size: 0.9rem;
  }
}

/* =========================================================================
   SMALL-MEDIUM PHONES (≤ 400px) — Extra compact
   ========================================================================= */
@media (max-width: 480px) {

  .container {
    padding: 24px 8px;
  }

  .cw-hero-title {
    font-size: clamp(1.8rem, 8.5vw, 2.8rem);
  }

  .hero-lead {
    font-size: 0.8rem;
  }

  .section-heading {
    font-size: clamp(1.6rem, 6.5vw, 2.5rem);
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .glass-card {
    padding: 14px;
  }

  .kpi-value {
    font-size: 1.3rem;
  }

  .split-section {
    padding: 28px 3%;
    gap: 16px;
  }

  .split-content p {
    font-size: 0.82rem;
  }

  .tab-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .feature-card {
    padding: 12px;
  }

  .xray-heading {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  }
}