/* ==========================================================================
   3D UPPSALA - DESIGN SYSTEM & STYLESHEET
   Domain: 3duppsala.se | 3D Printing, CAD Design, Rapid Prototyping
   ========================================================================== */

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

:root {
  /* Dark Tech Color Palette */
  --bg-dark: #07090E;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-card-solid: #0F172A;
  --bg-header: rgba(7, 9, 14, 0.85);
  
  /* Primary Glow Accents */
  --accent-cyan: #00F0FF;
  --accent-cyan-glow: rgba(0, 240, 255, 0.35);
  --accent-violet: #8B5CF6;
  --accent-violet-glow: rgba(139, 92, 246, 0.35);
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;

  /* Text & Border Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.3);

  /* Fonts & Shadows */
  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --glow-shadow: 0 0 25px var(--accent-cyan-glow);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(0, 240, 255, 0.12) 0%, transparent 40%),
    linear-gradient(to bottom, var(--bg-dark), #0C101B);
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-cyan) 50%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cyan-text {
  color: var(--accent-cyan);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-normal);
}

.glass-panel:hover {
  border-color: rgba(0, 240, 255, 0.25);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: all var(--transition-fast);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #000;
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Toggle Switch */
.lang-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 3px;
  cursor: pointer;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #00B8D9 100%);
  color: #040D1A;
  box-shadow: 0 4px 20px var(--accent-cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* HERO SECTION */
.hero {
  padding-top: 9rem;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 30px;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 3.4rem;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.stat-item h4 {
  font-size: 1.8rem;
  color: var(--accent-cyan);
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 3D VIEWER CONTAINER */
.viewer-wrapper {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.15);
  background: radial-gradient(circle at center, #0F172A 0%, #07090E 100%);
}

#canvas3d {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-overlay {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  pointer-events: auto;
}

.viewer-controls {
  display: flex;
  gap: 0.5rem;
}

.v-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.v-btn:hover, .v-btn.active {
  background: var(--accent-cyan);
  color: #000;
}

.viewer-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* SECTION TITLES */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-tag {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* SERVICES SECTION */
.services-section {
  padding: 6rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.4rem;
  margin-bottom: 0.85rem;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.service-features li svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* INSTANT CALCULATOR SECTION */
.calculator-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.5) 50%, transparent 100%);
}

.calc-container {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
}

.calc-form {
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-select, .form-input {
  width: 100%;
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

/* Tech Pills Grid */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.option-pill {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.option-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.option-pill.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.option-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
}

.option-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Range Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-slider {
  flex-grow: 1;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.slider-val {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 50px;
}

/* File Drop Zone */
.dropzone {
  border: 2px dashed rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  background: rgba(0, 240, 255, 0.03);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropzone:hover, .dropzone.dragover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--accent-cyan);
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

/* Calc Summary Box */
.calc-summary {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(11, 16, 27, 0.95));
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.summary-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.summary-label {
  color: var(--text-secondary);
}

.summary-value {
  font-weight: 600;
  color: var(--text-primary);
}

.price-total {
  font-size: 2.8rem;
  font-family: var(--font-heading);
  color: var(--accent-cyan);
  font-weight: 700;
  margin: 1.5rem 0;
  text-shadow: 0 0 20px var(--accent-cyan-glow);
}

/* MATERIAL MATRIX SECTION */
.material-section {
  padding: 6rem 0;
}

.material-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.mat-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mat-filter-btn.active, .mat-filter-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 600;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.mat-card {
  padding: 1.75rem;
}

.mat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.mat-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-violet);
  border-radius: 4px;
  font-weight: 700;
}

.mat-title {
  font-size: 1.25rem;
}

.mat-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.mat-specs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.spec-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spec-name {
  width: 90px;
  color: var(--text-muted);
}

.spec-bar-bg {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.spec-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  border-radius: 3px;
}

/* PROCESS WORKFLOW */
.process-section {
  padding: 6rem 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.process-card {
  padding: 1.75rem;
  position: relative;
  text-align: center;
}

.process-num {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.process-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.process-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* SHOWCASE / GALLERY SECTION */
.gallery-section {
  padding: 6rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.gallery-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  height: 280px;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(7, 9, 14, 0.95), transparent);
}

.gallery-title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.gallery-sub {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

/* FOOTER */
.footer {
  background: #04060A;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .calc-container { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .materials-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .hero-title { font-size: 2.4rem; }
  .services-grid { grid-template-columns: 1fr; }
  .materials-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
