/* Custom font - Skeletor Stance */
@font-face {
  font-family: 'Skeletor Stance';
  src: url('../fonts/skeletor-stance.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables */
:root {
  color-scheme: light dark;
  
  /* Light theme */
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --text: rgba(0, 0, 0, 0.87);
  --muted: rgba(0, 0, 0, 0.60);

  --highlight: #6c6c6c;
  --accent: #9e9e9e;
  --error: #424242;

  --border: rgba(0, 0, 0, 0.12);
  --ring: rgba(0, 0, 0, 0.24);

  /* On-color roles */
  --on-primary: #ffffff;
  --on-secondary: #000000;
  --on-background: rgba(0, 0, 0, 0.87);
  --on-surface: rgba(0, 0, 0, 0.87);
  --on-error: #ffffff;

  /* Radius & motion */
  --radius: 8px;
  --radius-pill: 999px;
  --transition-fast: 150ms;
  --transition: 240ms;
  
  /* Typography */
  --text-sm: ;
  --text-base: 1rem;
  --text-hero: clamp(2.5rem, 6vw, 4.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark theme */
    --bg: #121212;
    --bg-elevated: #121212;
    --text: rgba(255, 255, 255, 0.87);
    --muted: rgba(255, 255, 255, 0.60);

    --highlight: #e0e0e0;
    --accent: #bdbdbd;
    --error: #f5f5f5;

    --border: rgba(255, 255, 255, 0.12);
    --ring: rgba(255, 255, 255, 0.24);

    /* On-color roles */
    --on-primary: #000000;
    --on-secondary: #000000;
    --on-background: rgba(255, 255, 255, 0.87);
    --on-surface: rgba(255, 255, 255, 0.87);
    --on-error: #000000;
  }
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  margin-top: 0;
  font-family: inherit;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--highlight);
  color: var(--on-primary);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
  outline: none;
  box-shadow: 0 0 0 6px var(--ring);
}

/* Cursor Follower */
.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 24px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease-out;
  opacity: 0.8;
}

.raindrop {
  width: 100%;
  height: 100%;
  background: var(--muted);
  opacity: 0.6;
  clip-path: path('M10 0C10 0 2 8 2 14C2 18.4 5.6 22 10 22C14.4 22 18 18.4 18 14C18 8 10 0 10 0Z');
}

/* Animated Background Gradient */
.animated-gradient {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 40vh;
  background: conic-gradient(
    from var(--angle, 396.82725deg) at 50% 0%, 
    rgba(20, 120, 100, 0.15) 0%, 
    rgba(20, 120, 100, 0.18) 15%, 
    rgba(34, 211, 238, 0.12) var(--stop1, 70.70349%), 
    rgba(20, 120, 100, 0.2) var(--stop2, 84.52409%), 
    rgba(34, 211, 238, 0.12) var(--stop3, 82.89659%), 
    rgba(14, 14, 14, 0.12) 92%, 
    rgba(20, 120, 100, 0.15) 100%
  );
  filter: blur(80px);
  border-radius: 0px 0px 50% 50%;
  z-index: 0;
  transform: translateY(calc(100% - 40px));
  pointer-events: none;
  animation: none;
  display: none;
}

/* Hero Section */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  position: relative;
}

.hero h1 {
  font-family: 'Skeletor Stance', 'Staatliches', sans-serif;
  font-size: var(--text-hero);
  font-weight: normal;
  margin: 2rem 0 1rem 0;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
  text-rendering: optimizeLegibility;
}

.hero .tagline {
  color: var(--muted);
  margin: 0 0 1rem 0;
  max-width: 500px;
}

/* Layout Components */
.container {
  max-width: 530px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.product-info,
.faq-section,
.product-quotes { margin: 2rem 0; }

.product-description {
  margin: 2rem 0 1rem;
  text-align: left;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  font-family: inherit;
}

.cta-section {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cta-buttons {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.faq-link {
  color: var(--highlight);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: var(--text-base);
  position: relative;
  transition: color var(--transition-fast) ease;
}

.disclaimer {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
  text-align: left;
}

.faq-link:hover {
  color: var(--accent);
}

.description-text {
  margin: 2rem 0 1rem;
  text-align: left;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  font-family: inherit;
}

/* Specifications Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.spec-label {
  padding: 0.75rem 0;
  color: var(--muted);
  width: 30%;
  vertical-align: top;
}

.spec-value {
  padding: 0.75rem 0;
  color: var(--text);
}

/* Product Quotes Section */
.product-quotes {
  margin: 2rem 0;
}

.product-quotes h2.quotes,
.product-quotes blockquote {
  max-width: 100% !important;
  width: 100% !important;
}

/* Footer */
footer {
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

footer .container {
  position: relative;
  z-index: 1;
}

footer h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

footer p {
  margin-top: 1rem;
  font-size: var(--text-base);
  color: var(--muted);
}

footer .contact-email {
  display: block;
  margin-top: 2rem;
  font-size: var(--text-base);
  color: var(--highlight);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

footer .copyright {
  margin-top: 2rem;
  font-size: var(--text-base);
  color: var(--muted);
  opacity: 0.7;
}

section h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  font-weight: 600;
  text-align: left;
  line-height: 1.2;
  font-family: inherit;
}

/* Lists */
ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-family: inherit;
}

ul li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition) ease, transform var(--transition) ease;
  text-align: left;
}

ul li:last-child {
  border-bottom: none;
}

ul li::before {
  content: "✓";
  color: var(--muted);
  margin-right: 0.75rem;
  font-weight: 500;
  font-size: var(--text-base);
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  font-style: italic;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.6;
  text-align: left;
}

/* Buttons */
.cta-button {
  display: inline-block;
  background: var(--highlight);
  color: var(--on-primary);
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: var(--text-base);
  margin: 0;
  transition: background-color var(--transition-fast) ease, filter var(--transition-fast) ease;
  border-radius: var(--radius-pill);
  box-shadow: none;
}

.cta-button:hover {
  background: var(--accent);
  filter: none;
}

.cta-button:active {
  filter: none;
}

.cta-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px var(--ring);
}

/* Pricing Section */
.pricing {
  text-align: left;
  margin: 2rem 0;
}

.highlight {
  font-weight: 600;
  color: var(--highlight);
}

/* 3D Model Viewer */
.model-viewer {
  margin-top: 2rem;
  text-align: center;
}

#model-container {
  width: calc(100% - 0.5rem);
  height: 320px;
  margin: 0 auto;
  padding: 0 0.25rem;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: color-mix(in oklab, var(--bg-elevated), white 2%);
  border: none;
  box-shadow: none;
}

#model-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#loading-message, #error-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-base);
  color: var(--muted);
  text-align: center;
  padding: 1rem;
}

#error-message {
  color: var(--on-error);
  background: var(--error);
  border-radius: 8px;
  border: 1px solid var(--error);
}

.progress-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  width: 200px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  animation: progressPulse 2s ease-in-out infinite;
}

.progress-text {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.5rem;
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* FAQ Section */
.faq-accordion {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  padding: 1rem 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast) ease;
}

.faq-question:hover {
  color: var(--highlight);
}

.faq-question::after {
  content: "+";
  font-size: var(--text-base);
  font-weight: 300;
  transition: transform var(--transition-fast) ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 0 1.5rem 0;
  color: var(--muted);
  line-height: 1.6;
  display: none;
  font-size: var(--text-base);
  font-family: inherit;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-contact {
  font-size: var(--text-base);
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.faq-contact a {
  color: var(--text);
  text-decoration: none;
}

.faq-contact a:hover {
  text-decoration: underline;
}

.contact-email:hover {
  color: var(--text) !important;
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  ul li,
  .faq-accordion,
  .faq-item,
  .faq-contact {
    border-color: var(--border);
  }
}

/* Focus states for links */
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px var(--ring);
  border-radius: 6px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Material Surface with elevation overlay */
.surface-1 {
  background: #f5f5f5; /* light grey surface */
  box-shadow: none;
}
@media (prefers-color-scheme: dark) {
  .surface-1 {
    background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), var(--bg-elevated);
    box-shadow: none;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --text-hero: clamp(2rem, 6vw, 3.5rem);
  }
  
  .hero .tagline {
    max-width: 500px;
  }
  
  .hero .model-container {
    height: 230px;
    max-width: 350px;
  }
  
  .container {
    padding: 0 1.5rem;
  }
  
  #model-container {
    width: calc(100% - 0.25rem);
    height: 320px;
    padding: 0 0.125rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1.5rem;
    min-height: 60vh;
  }
  
  .container {
    padding: 0 1rem;
  }
}

@media (min-width: 1200px) {
  #model-container {
    height: 600px;
  }
}
