@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=B612+Mono:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

/* ============================================
   DESIGN TOKENS - Global Variables
   ============================================ */
:root {
  /* Colors */
  --bg: #f5f5f3;
  --surface: #ffffff;
  --text: #0f0f0f;
  --muted: #6b6b6b;
  --accent: #000000;
  --hov-color: #333;
  --white: #ffffff;
  --black: #000000;
  --warning: #ffc107;
  
  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  
  /* Border Radius */
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-full: 999px;
  
  /* Typography */
  --font-body: "Inter", sans-serif;
  --font-accent: "Source Serif 4", serif;
  --font-mono: "B612 Mono", monospace;
  
  /* Layout */
  --container-max: 1200px;
  --section-gap: 120px;
  
  /* Effects */
  --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl);
}

.container-narrow { max-width: 800px; }
.container-wide { max-width: 1400px; }

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Grid Utilities */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }
.m-xl { margin: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mt-section { margin-top: var(--section-gap); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Size Utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.min-h-400 { min-height: 400px; }

/* Z-Index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

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

.text-sm { font-size: 14px; }
.text-md { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 24px; }
.text-2xl { font-size: 32px; }
.text-3xl { font-size: 56px; }
.text-4xl { font-size: 96px; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

/* Background Utilities */
.bg-surface { background: var(--surface); }
.bg-dark { background: var(--text); }
.bg-transparent { background: transparent; }

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.2;
}

h1 { font-size: 96px; line-height: 0.95; }
h2 { font-size: 56px; }
h3 { font-size: 32px; }
h4 { font-size: 24px; }
h5 { font-size: 18px; }
h6 { 
  font-size: 14px; 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
  color: var(--muted); 
}

/* Typography Modifiers */
.heading-xl { font-size: 96px; line-height: 0.95; }
.heading-lg { font-size: 56px; }
.heading-md { font-size: 48px; }
.heading-sm { font-size: 36px; }

/* Body Text */
.body-lg { font-size: 18px; }
.body-md { font-size: 16px; }
.body-sm { font-size: 14px; }
.body-xs { font-size: 12px; }

/* Special Typography */
.font-accent {
  font-family: var(--font-accent);
  font-weight: 100;
  font-style: italic;
}

.font-mono {
  font-family: var(--font-mono);
}

.eyebrow {
  font-family: var(--font-accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  font-size: 18px;
  max-width: 420px;
}

/* ============================================
   COMPONENTS - Buttons
   ============================================ */

/* Button Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

/* Button Sizes */
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 18px 32px; font-size: 16px; }

/* Button Variants */
.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--hov-color);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--text);
}

.btn-secondary:hover {
  background: var(--text);
  color: var(--surface);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid currentColor;
}

.btn-ghost:hover {
  background: var(--hov-color);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
}

.btn-ghost-light:hover {
  background: var(--hov-color);
  color: var(--white);
  border-color: var(--hov-color);
  box-shadow: var(--shadow-md);
}

/* Legacy class names for backward compatibility */
.primary { background: var(--accent); color: #fff; transition: var(--transition); }
.primary:hover { background: var(--hov-color); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.ghost { border: 1px solid var(--accent); transition: var(--transition); }
.ghost:hover { background: var(--hov-color); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.ghost-light { border: 1px solid var(--surface); transition: var(--transition); }
.ghost-light:hover { background: var(--hov-color); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--hov-color); }

/* ============================================
   COMPONENTS - Cards
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--space-lg);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  opacity: 0;
  transition: var(--transition);
}

.card:hover .card-overlay {
  opacity: 1;
}

/* ============================================
   SECTIONS - Layout Components
   ============================================ */

.section {
  margin-top: var(--section-gap);
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: 56px;
  margin-bottom: var(--space-lg);
}

/* Hero Section */
.hero {
  margin-top: 50px;
  min-height: 95vh;
  background: url(../img/hero2.jpg) bottom left / cover no-repeat;
  color: var(--surface);
  display: flex;
  align-items: center;
}

.hero-content {
position: absolute;
top: 10%;
left: 20%;
}

/* Feature Grid */
.feature-grid {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xl);
}

.feature-item p {
  font-size: 14px;
  color: var(--muted);
}

/* FEATURES */
.features {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}


.feature p {
  font-size: 14px;
  color: var(--muted);
}

/* VR Viewer Component */
.viewer-container {
  width: 100%;
  height: 80vh;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.viewer-content {
  position: relative;
  z-index: 999;
}

.viewer-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  cursor: grab;
}

.viewer-canvas:active {
  cursor: grabbing;
}

/* Loading State */
.loading-indicator {
  position: absolute;
  top: 50%;
  right: 25%;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.loading-indicator::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Legacy selectors for backward compatibility */
.vr { width: 100%; height: 80vh; display: flex; flex-direction: column; gap: 64px; position: relative; }
.vr-content { width: 100%; display: flex; flex-direction: column; gap: 64px; z-index: 999; }
.vr-content-text { max-width: 400px; }
.vr-content-text .muted { max-width: 50%; }
.vr-box { position: absolute; z-index: -1; width: 100%; height: 100%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: grab; }
#loading-text { position: absolute; top: 50%; right: 25%; color: rgba(255, 255, 255, 0.8); font-size: 14px; font-weight: 500; z-index: 10; background: rgba(0, 0, 0, 0.5); padding: 12px 24px; border-radius: 24px; backdrop-filter: blur(10px); transition: opacity 0.3s ease; transform: none; }
#loading-text::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 8px; border: 2px solid rgba(255, 255, 255, 0.3); border-top: 2px solid #fff; border-radius: 50%; animation: spin 1s linear infinite; }

/* Stats/Metrics Component */
.stats-grid {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.stat-item {
  flex: 1;
}

.stat-value {
  font-size: 56px;
  font-weight: 700;
  margin: 0;
}

.stat-label {
  color: var(--muted);
}

/* Legacy selectors */
.metrics { display: flex; justify-content: space-around; text-align: center; }
.metric { flex: 1; }
.metric h3 { font-size: 56px; margin: 0; }
.metric p { color: var(--muted); }

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-lg);
  height: 600px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.portfolio-item.featured {
  grid-row: 1 / 3;
  grid-column: 1 / 2;
}

.portfolio-image {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.portfolio-image .thumb {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ddd 0%, #ccc 100%);
  transition: var(--transition);
}

.portfolio-image .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  opacity: 0;
  transition: var(--transition);
}

.portfolio-image:hover .thumb {
  transform: scale(1.05);
}

.portfolio-image:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h4 {
  color: var(--white);
  font-size: 24px;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.portfolio-overlay p {
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  margin: 0 0 16px 0;
}

.portfolio-overlay .btn.ghost {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
  font-size: 12px;
  padding: 8px 16px;
  width: fit-content;
}

.portfolio-overlay .btn.ghost:hover {
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border-color: var(--white);
}

/* Testimonials/Carousel Component */
.carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  padding: var(--space-xl);
}

.carousel-controls {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  display: flex;
  gap: var(--space-sm);
}

.carousel-controls .btn {
  width: 70px;
}

/* Rating Component */
.rating {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 18px;
  color: var(--warning);
}

.star.empty {
  color: #e0e0e0;
}

.rating-number {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* Testimonial Card */
.testimonial-card {
  display: flex;
  gap: var(--space-xl);
  text-align: left;
}

.testimonial-media {
  flex-shrink: 0;
}

.testimonial-media img {
  height: 200px;
  border-radius: var(--radius-sm);
}

.testimonial-body {
  padding-top: var(--space-lg);
}

.testimonial-author strong {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.testimonial-author p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.testimonial-text {
  margin: 0;
}

.testimonial-text p {
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 8px 0;
}

/* Legacy selectors */
.testimonials { text-align: center; }
.testimonials h2 { font-size: 48px; margin-bottom: 64px; font-weight: 700; }
.testimonials-carousel { width: 100%; position: relative; margin: 0 auto; overflow: hidden; }
.testimonials-grid { display: flex; transition: transform 0.5s ease; }
.testimonial-card { padding: 32px; text-align: left; display: flex; min-width: 100%; flex-shrink: 0; }
.testimonial-image { margin-bottom: 24px; }
.testimonial-image img { height: 200px; }
.testimonial-content { margin-left: 50px; padding-top: 25px; }


/* CTA Section */
.cta-section {
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cta-visual {
  text-align: center;
  min-height: 400px;
  width: 100%;
  height: 100%;
}

.cta-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  text-align: center;
  z-index: 20;
  background: 
    linear-gradient(rgba(29, 26, 25, 0.5), rgba(29, 26, 25, 0.5)),
    url(../img/cta-3d-2.webp) no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cta-overlay h2 {
  color: var(--bg);
  font-size: 36px;
  margin-bottom: 40px;
  font-weight: 700;
}

/* Legacy selectors */
.cta-main { height: 100vh; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cta-3d { text-align: center; min-height: 400px; width: 100%; height: 100%; }
.cta-3d-text { width: 100%; height: 100%; position: absolute; text-align: center; z-index: 20; background: linear-gradient(rgba(29, 26, 25, 0.5), rgba(29, 26, 25, 0.5)), url(../img/cta-3d-2.webp) no-repeat center center; background-size: cover; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.cta-3d-text h2 { color: var(--bg); font-size: 36px; margin-bottom: 40px; font-weight: 700; }
.cta-3d .vr-box-cta { width: 100%; height: 100%; overflow: hidden; z-index: 10; }
.cta-3d .vr-box-cta canvas { display: block !important; cursor: grab !important; z-index: 11 !important; width: 100% !important; height: 100% !important; }
