:root {
  --orange: #ff6b35;
  --dark: #0d0d0d;
  --dark2: #161616;
  --card: #1b1b1b;
  --text: #ffffff;
  --light: #aaa;
  
  /* Responsive font sizes using clamp() */
  --h1-size: clamp(2.5rem, 8vw, 5rem);
  --h1-size-large: clamp(3rem, 10vw, 5.5rem);
  --p-size: clamp(1rem, 3vw, 1.25rem);
  --btn-padding: clamp(10px 20px, 3vw, 14px 30px);
}

body {
  margin: 0;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* LAYOUT */
.section {
  padding: 80px 5%; /* Reduced from 120px 8% for mobile */
  max-width: 1400px;
  margin: auto;
}

@media (min-width: 768px) {
  .section {
    padding: 100px 6%;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 120px 8%;
  }
}

.center {
  text-align: center;
}

.title {
  font-size: clamp(32px, 6vw, 48px);
  margin-bottom: 10px;
}

.subtitle {
  color: var(--light);
  max-width: 700px;
  line-height: 1.7;
  margin: 0 auto 40px;
  font-size: clamp(16px, 3vw, 18px);
}

@media (min-width: 768px) {
  .subtitle {
    margin: 0 auto 60px;
  }
}

/* HERO */
.hero {
  position: relative;
  height: 100vh; /* Changed from 92vh for better mobile experience */
  min-height: 600px; /* Ensures minimum height on very small screens */
  max-height: 1080px; /* Prevents excessive height on large screens */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #050505;
}

.hero canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: cover; /* Ensures canvas covers the area */
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: min(900px, 90%); /* Responsive max-width */
  padding: 20px; /* Adds padding on small screens */
}

.hero h1 {
  font-size: var(--h1-size);
  line-height: 1.2;
  margin: 0 0 20px;
  word-wrap: break-word; /* Prevents overflow */
}

/* Larger screens */
@media (min-width: 768px) {
  .hero h1 {
    font-size: var(--h1-size-large);
    line-height: 1.1;
  }
}

@media (min-width: 1200px) {
  .hero h1 {
    font-size: 70px; /* Original size for large screens */
  }
}

.hero span {
  color: var(--orange);
  display: inline-block; /* Ens proper wrapping */
}

.hero p {
  color: var(--light);
  margin: 20px auto;
  font-size: var(--p-size);
  max-width: 600px;
  padding: 0 15px; /* Adds padding on small screens */
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero p {
    font-size: 1.2rem;
    max-width: 550px;
  }
}

/* BUTTONS */
.btn {
  padding: 14px 30px;
  margin: 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease; /* Smooth hover effect */
  white-space: nowrap; /* Prevents button text wrapping */
}

/* Mobile button adjustments */
@media (max-width: 480px) {
  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .btn {
    width: 80%; /* Full width buttons on mobile */
    max-width: 250px;
    margin: 0; /* Remove margin since we're using gap */
    padding: 12px 20px;
    text-align: center;
  }
  
  .hero h1 {
    font-size: clamp(2rem, 7vw, 2.5rem);
    padding: 0 10px;
  }
  
  .hero p {
    font-size: 1rem;
    padding: 0 20px;
  }
}

/* Small mobile devices */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero-content {
    padding: 10px;
  }
}

.btn-primary {
  background: var(--orange);
  color: white;
}

.btn-outline {
  border: 2px solid var(--orange);
  color: white;
}

/* Hover effects */
.btn-primary:hover {
  background: #e55a2b; /* Darker shade on hover */
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.btn-outline:hover {
  background: var(--orange);
  color: white;
  transform: translateY(-2px);
}

/* Landscape orientation on mobile */
@media (max-width: 850px) and (orientation: landscape) {
  .hero {
    min-height: 500px;
  }
  
  .hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  
  .hero p {
    font-size: 0.9rem;
    margin: 10px auto;
  }
  
  .btn {
    padding: 8px 20px;
  }
}

/* High-resolution screens */
@media (min-width: 1600px) {
  .hero h1 {
    font-size: 5.5rem;
  }
  
  .hero p {
    font-size: 1.3rem;
  }
}

.hero-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.5s ease;
}

.hero-loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--light);
  border-bottom-color: var(--orange);
  border-radius: 50%;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}




/* CLIENTS SECTION */
.clients-section {
  padding: 0;
  background: black;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Simple fade edges - optional, remove if you don't want them */
.clients-section::before,
.clients-section::after {
  content: '';
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.clients-section::before {
  left: 0;
  background: linear-gradient(to right, var(--dark2), transparent);
}

.clients-section::after {
  right: 0;
  background: linear-gradient(to left, var(--dark2), transparent);
}

/* Optional: Remove the fade edges on mobile */
@media (max-width: 768px) {
  .clients-section::before,
  .clients-section::after {
    width: 40px;
  }
}

/* MARQUEE - Clean version */
.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px;
}

.marquee-content {
  display: flex;
  animation: scroll 40s linear infinite;
  width: max-content;
}

.client-logo {
  height: 60px;
  width: auto;
  margin: 0 40px;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: brightness(0.9);
  object-fit: contain;
}

/* Optional: Different sizes for different logos - add classes if needed */
.client-logo:hover {
  opacity: 1;
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Pause on hover */
.marquee:hover .marquee-content {
  animation-play-state: paused;
}

/* Animation - smooth and continuous */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.33%); /* Move by 1/3 since we have 3 sets */
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .client-logo {
    height: 50px;
    margin: 0 30px;
  }
}

@media (max-width: 768px) {
  .client-logo {
    height: 45px;
    margin: 0 25px;
  }
  
  .marquee-content {
    animation: scroll 30s linear infinite;
  }
}

@media (max-width: 480px) {
  .client-logo {
    height: 40px;
    margin: 0 20px;
  }
  
  .marquee-content {
    animation: scroll 25s linear infinite;
  }
}

/* Performance optimization */
.marquee-content {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}



/* SHOWCASE SECTION */
.showcase-section {
  padding: 10px 5%;
  background: var(--dark);
  position: relative;
}

.showcase-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 700px;
}

/* Left Panel - 3D Viewer */
.viewer-panel {
  background: var(--dark2);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 107, 53, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.model-viewer {
  position: relative;
  width: 100%;
  height: 500px;
  background: #0a0a0a;
  overflow: hidden;
}

#stlCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.model-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: var(--light);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px 30px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.model-loader.show {
  opacity: 1;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 107, 53, 0.3);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.view-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 10;
  background: rgba(22, 22, 22, 0.8);
  padding: 8px;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 107, 53, 0.2);
}

.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: var(--orange);
  color: white;
  transform: scale(1.1);
}

.model-tabs {
  display: flex;
  padding: 15px;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 107, 53, 0.1);
}

.model-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 10px;
  color: var(--light);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.model-tab:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.model-tab.active {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* Right Panel - Info & Calculator */
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dimensions-card,
.calculator-card,
.specs-card {
  background: var(--dark2);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid rgba(255, 107, 53, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.panel-title {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  padding-left: 15px;
}

.panel-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--orange);
  border-radius: 2px;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dimension-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dimension-label {
  font-size: 12px;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dimension-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* Calculator */
.material-selector {
  margin-bottom: 25px;
}

.selector-label {
  display: block;
  margin-bottom: 8px;
  color: var(--light);
  font-size: 14px;
}

.material-select {
  width: 100%;
  padding: 12px 15px;
  background: var(--dark);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.material-select:hover,
.material-select:focus {
  border-color: var(--orange);
  outline: none;
}

.material-select option {
  background: var(--dark2);
  color: var(--text);
}

.calculator-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.calc-item {
  background: var(--dark);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
}

.calc-label {
  display: block;
  font-size: 12px;
  color: var(--light);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calc-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--orange);
}

.total-cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--orange), #ff8c5a);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}

.total-label {
  font-size: 16px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.total-value {
  font-size: 28px;
  font-weight: 700;
  color: white;
}

.estimate-btn {
  width: 100%;
  padding: 15px;
  background: transparent;
  border: 2px solid var(--orange);
  border-radius: 12px;
  color: var(--orange);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.estimate-btn:hover {
  background: var(--orange);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
}

/* Specs Card */
.specs-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 20px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--dark);
  padding: 12px;
  border-radius: 10px;
}

.spec-icon {
  font-size: 20px;
}

.spec-detail {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 11px;
  color: var(--light);
  text-transform: uppercase;
}

.spec-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Responsive */
@media (max-width: 1200px) {
  .showcase-container {
    grid-template-columns: 1fr;
  }
  
  .model-viewer {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .showcase-section {
    padding: 60px 20px;
  }
  
  .dimension-grid {
    grid-template-columns: 1fr;
  }
  
  .calculator-row {
    grid-template-columns: 1fr;
  }
  
  .specs-card {
    grid-template-columns: 1fr;
  }
  
  .view-controls {
    bottom: 10px;
    right: 10px;
  }
  
  .model-tabs {
    flex-wrap: wrap;
  }
  
  .model-tab {
    flex: 1 1 calc(50% - 5px);
  }
}

@media (max-width: 480px) {
  .model-tab {
    flex: 1 1 100%;
  }
  
  .total-value {
    font-size: 22px;
  }
}




/* CALL TO ACTION SECTION */
.cta-section {
  position: relative;
  padding: 10px 5%;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  overflow: hidden;
  border-top: 1px solid rgba(255, 107, 53, 0.1);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.cta-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: center;
}

.cta-content {
  color: var(--text);
}

.cta-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.2;
  margin-bottom: 20px;
}

.cta-title span {
  color: var(--orange);
  position: relative;
  display: inline-block;
}

.cta-title span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(255, 107, 53, 0.2);
  z-index: -1;
}

.cta-text {
  color: var(--light);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.7;
  max-width: 550px;
  margin-bottom: 40px;
}

/* Main CTA Button */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 18px 40px;
  background: var(--orange);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--orange);
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:hover {
  background: transparent;
  color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 20px 30px rgba(255, 107, 53, 0.3);
}

.cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.cta-button:hover .cta-arrow {
  transform: translateX(5px);
}

.cta-arrow {
  transition: transform 0.3s ease;
}

/* Stats */
.cta-stats {
  display: flex;
  gap: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Preview Cards */
.cta-preview {
  position: relative;
  height: 300px;
}

.preview-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 25px;
  background: rgba(27, 27, 27, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 50px;
  color: var(--text);
  font-weight: 500;
  animation: float 3s ease-in-out infinite;
  animation-delay: var(--delay);
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.preview-card:nth-child(1) {
  top: 10%;
  right: 0;
}

.preview-card:nth-child(2) {
  top: 35%;
  left: 0;
}

.preview-card:nth-child(3) {
  top: 60%;
  right: 20%;
}

.preview-card:nth-child(4) {
  bottom: 10%;
  left: 10%;
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Background Shapes */
.cta-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.cta-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
}

.shape-2 {
  width: 300px;
  height: 300px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
}

.shape-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
}

/* Responsive */
@media (max-width: 992px) {
  .cta-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .cta-preview {
    height: 250px;
  }
  
  .cta-stats {
    justify-content: center;
  }
  
  .cta-button {
    display: flex;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }
  
  .cta-content {
    text-align: center;
  }
  
  .cta-text {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .cta-section {
    padding: 80px 20px;
  }
  
  .cta-stats {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  
  .stat-item {
    align-items: center;
  }
  
  .preview-card {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .preview-card:nth-child(1) {
    top: 0;
    right: 10%;
  }
  
  .preview-card:nth-child(2) {
    top: 30%;
    left: 5%;
  }
  
  .preview-card:nth-child(3) {
    top: 60%;
    right: 5%;
  }
  
  .preview-card:nth-child(4) {
    bottom: 0;
    left: 10%;
  }
}

@media (max-width: 480px) {
  .cta-button {
    width: 100%;
    justify-content: center;
    padding: 15px 30px;
  }
  
  .preview-card {
    font-size: 12px;
    padding: 8px 15px;
  }
  
  .preview-card:nth-child(1) {
    top: 5%;
  }
  
  .preview-card:nth-child(2) {
    top: 28%;
  }
  
  .preview-card:nth-child(3) {
    top: 51%;
  }
  
  .preview-card:nth-child(4) {
    bottom: 5%;
  }
}