/* ============================================
   HOME PAGE STYLES
   ============================================ */

/* ===================
   HERO SECTION
   =================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__background img,
.hero__background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 9, 11, 0.7) 0%,
    rgba(9, 9, 11, 0.5) 50%,
    rgba(9, 9, 11, 0.9) 100%
  );
  z-index: -1;
}

[data-theme="light"] .hero__overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.9) 100%
  );
}

.hero__content {
  text-align: center;
  max-width: 900px;
  padding: var(--space-xl) var(--space-md);
}

.hero__overline {
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: clamp(var(--text-4xl), 8vw, var(--text-7xl));
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: var(--line-height-relaxed);
}

.hero__cta,
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

/* Hero with visual side by side */
.hero__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
  text-align: center;
}

@media (min-width: 1024px) {
  .hero__container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .hero__content {
    text-align: left;
    max-width: 50%;
    padding: 0;
  }

  .hero__cta,
  .hero__actions {
    justify-content: flex-start;
  }
}

/* Centered Hero Content (no visual) */
.hero__content--centered {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .hero__content--centered {
    text-align: center;
    max-width: 800px;
  }

  .hero__content--centered .hero__cta,
  .hero__content--centered .hero__actions {
    justify-content: center;
  }

  .hero__content--centered .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero__visual {
  flex-shrink: 0;
}

.hero__image-wrapper {
  max-width: 500px;
}

.hero__image {
  width: 100%;
  height: auto;
}

/* Hero gradient background */
.hero__gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(var(--color-primary-rgb), 0.15), transparent 60%),
              radial-gradient(ellipse at 30% 70%, rgba(var(--color-primary-rgb), 0.1), transparent 50%);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-text-muted);
  animation: bounce 2s infinite;
}

.scroll-indicator__mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--color-text-muted);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-indicator__wheel {
  width: 4px;
  height: 8px;
  background: var(--color-text-muted);
  border-radius: 2px;
  animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* Particles/Decorative Elements */
.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero__particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  opacity: 0;
  animation: particleFloat 8s ease-in-out infinite;
}

.hero__particle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; width: 8px; height: 8px; }
.hero__particle:nth-child(2) { top: 65%; left: 15%; animation-delay: 1.5s; }
.hero__particle:nth-child(3) { top: 25%; left: 85%; animation-delay: 3s; width: 10px; height: 10px; }
.hero__particle:nth-child(4) { top: 75%; left: 75%; animation-delay: 0.8s; }
.hero__particle:nth-child(5) { top: 45%; left: 50%; animation-delay: 2.2s; width: 5px; height: 5px; }

@keyframes particleFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.4;
    transform: translateY(-30px) scale(1);
  }
  90% {
    opacity: 0.6;
  }
}

/* Hero Image Glow Effect */
.hero__image-wrapper {
  position: relative;
  transition: transform 0.15s ease-out;
}

.hero__image-wrapper::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 70%);
  border-radius: var(--radius-2xl);
  opacity: 0;
  animation: heroGlow 4s ease-in-out infinite;
  animation-delay: 1s;
  z-index: -1;
}

@keyframes heroGlow {
  0%, 100% {
    opacity: 0;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Enhanced Hero Gradient with Parallax */
.hero__gradient {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ===================
   ENHANCED HERO ANIMATIONS
   =================== */

/* Staggered Load Animations */
.animate-on-load {
  opacity: 0;
  transform: translateY(40px);
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-on-load[data-delay="0"] { animation-delay: 0.1s; }
.animate-on-load[data-delay="200"] { animation-delay: 0.3s; }
.animate-on-load[data-delay="400"] { animation-delay: 0.5s; }
.animate-on-load[data-delay="600"] { animation-delay: 0.7s; }

@keyframes heroReveal {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient Text Animation */
.text-gradient {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 25%,
    var(--color-accent) 50%,
    var(--color-primary-light) 75%,
    var(--color-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

/* Glowing Button */
.btn--glow {
  position: relative;
  overflow: visible;
}

.btn--glow::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-primary));
  background-size: 200% 200%;
  border-radius: inherit;
  opacity: 0;
  z-index: -1;
  filter: blur(15px);
  animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% {
    opacity: 0;
    background-position: 0% 50%;
  }
  50% {
    opacity: 0.6;
    background-position: 100% 50%;
  }
}

/* Animated Lines */
.hero__lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero__line {
  position: absolute;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(var(--color-primary-rgb), 0.3) 50%,
    transparent 100%
  );
  animation: lineDrop 8s ease-in-out infinite;
}

.hero__line:nth-child(1) {
  left: 20%;
  animation-delay: 0s;
}

.hero__line:nth-child(2) {
  left: 50%;
  animation-delay: 2.5s;
}

.hero__line:nth-child(3) {
  left: 80%;
  animation-delay: 5s;
}

@keyframes lineDrop {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* More Particles */
.hero__particle:nth-child(6) { top: 35%; left: 5%; animation-delay: 4s; width: 7px; height: 7px; }
.hero__particle:nth-child(7) { top: 85%; left: 45%; animation-delay: 2.8s; }
.hero__particle:nth-child(8) { top: 10%; left: 60%; animation-delay: 3.5s; width: 9px; height: 9px; }

/* ===================
   HERO 3D BACKGROUND ANIMATION
   Soft, performant, non-intrusive 3D effect
   =================== */

.hero__3d-visual {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: clamp(280px, 40vw, 550px);
  height: clamp(280px, 40vw, 550px);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: hero3dFadeIn 2s ease-out 1s forwards;
}

.hero__3d-model {
  width: 100% !important;
  height: 100% !important;
  --poster-color: transparent;
  --min-hotspot-opacity: 0;
  opacity: 0.45;
  filter: saturate(0.9);
  animation: hero3dFloat 12s ease-in-out infinite;
  animation-delay: 2s;
}

/* Hide progress bar for cleaner look */
.hero__3d-model::part(default-progress-bar) {
  display: none;
}

/* Soft glow effect behind 3D model */
.hero__3d-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--color-primary-rgb), 0.15) 0%,
    rgba(var(--color-primary-rgb), 0.08) 30%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: -1;
  animation: hero3dGlowPulse 6s ease-in-out infinite;
  animation-delay: 2s;
  filter: blur(30px);
}

/* Fade in animation */
@keyframes hero3dFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* Subtle floating animation */
@keyframes hero3dFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(0.5deg);
  }
  50% {
    transform: translateY(-15px) rotate(0deg);
  }
  75% {
    transform: translateY(-8px) rotate(-0.5deg);
  }
}

/* Soft glow pulse */
@keyframes hero3dGlowPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Light theme adjustments */
[data-theme="light"] .hero__3d-model {
  opacity: 0.35;
  filter: saturate(0.85) brightness(0.95);
}

[data-theme="light"] .hero__3d-glow {
  background: radial-gradient(
    ellipse at center,
    rgba(var(--color-primary-rgb), 0.12) 0%,
    rgba(var(--color-primary-rgb), 0.05) 30%,
    transparent 70%
  );
}

/* Tablet - reposition for better balance */
@media (max-width: 1023px) {
  .hero__3d-visual {
    right: -5%;
    width: clamp(200px, 35vw, 350px);
    height: clamp(200px, 35vw, 350px);
    opacity: 0;
    animation: hero3dFadeIn 2s ease-out 1.5s forwards;
  }

  .hero__3d-model {
    opacity: 0.35;
  }

  .hero__3d-glow {
    filter: blur(20px);
  }
}

/* Mobile - position at bottom of hero */
@media (max-width: 767px) {
  .hero__3d-visual {
    top: auto;
    bottom: 10%;
    right: 50%;
    transform: translateX(50%);
    width: clamp(150px, 40vw, 200px);
    height: clamp(150px, 40vw, 200px);
    z-index: -1;
  }

  .hero__3d-model {
    opacity: 0.2;
  }

  .hero__3d-glow {
    inset: -10%;
    filter: blur(12px);
    opacity: 0.4;
  }
}

/* Small mobile - hide or make very subtle */
@media (max-width: 480px) {
  .hero__3d-visual {
    bottom: 15%;
    width: 120px;
    height: 120px;
  }

  .hero__3d-model {
    opacity: 0.15;
    animation: none; /* Disable float on very small screens for performance */
  }

  .hero__3d-glow {
    animation: none;
    opacity: 0.3;
  }
}

/* Enhanced Hero Image */
.hero__image-wrapper {
  animation: heroImageFloat 6s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes heroImageFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(1deg);
  }
}

/* ===================
   SERVICES PREVIEW SECTION
   =================== */
.services-preview {
  background: var(--gradient-radial);
}

.services-grid,
.services-preview__grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .services-grid,
  .services-preview__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid,
  .services-preview__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Service Card in Preview */
.card--service {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-normal);
}

.card--service:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.card--service .card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-lg);
  background: rgba(var(--color-primary-rgb), 0.1);
  border-radius: var(--radius-xl);
  color: var(--color-primary);
}

.card--service .card__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
}

.card--service .card__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-md);
}

.card--service .card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  transition: gap var(--transition-fast);
}

.card--service .card__link:hover {
  gap: var(--space-sm);
}

.card--service .card__link::after {
  content: '\2192';
}

/* 3D Model Icon Styling */
.card--service .card__icon--3d {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  background: transparent;
  border-radius: var(--radius-lg);
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card--service .card__icon--3d model-viewer {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px;
  min-height: 80px;
  --poster-color: transparent;
  --min-hotspot-opacity: 0;
  touch-action: pan-y; /* Allow scrolling on mobile */
}

.card--service .card__icon--3d model-viewer::part(default-progress-bar) {
  display: none;
}

/* ===================
   STATS SECTION
   =================== */
.stats-section {
  position: relative;
  background: var(--gradient-primary);
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
  display: grid;
  gap: var(--space-lg);
  text-align: center;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats-section .stat {
  padding: var(--space-lg);
}

.stats-section .stat__number,
.stats-section .stat__value {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: var(--font-weight-bold);
  color: white;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.stats-section .stat__label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

/* ===================
   FEATURED PORTFOLIO SECTION
   =================== */
.portfolio-preview__grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .portfolio-preview__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.portfolio-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-item:hover .portfolio-item__image {
  transform: scale(1.1);
}

.portfolio-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-item__overlay {
  opacity: 1;
}

.portfolio-item__category {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  margin-bottom: var(--space-xs);
}

.portfolio-item__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: white;
}

/* ===================
   TESTIMONIALS SECTION
   =================== */
.testimonials-section {
  background: var(--color-bg-secondary);
}

.testimonials__wrapper {
  max-width: 800px;
  margin: 0 auto;
}

/* Testimonial Card */
.testimonial {
  text-align: center;
  padding: var(--space-xl);
}

.testimonial__content {
  max-width: 700px;
  margin: 0 auto;
}

.testimonial__rating {
  display: flex;
  justify-content: center;
  gap: var(--space-xxs);
  margin-bottom: var(--space-lg);
  color: #fbbf24;
}

.testimonial__quote {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text-primary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .testimonial__quote {
    font-size: var(--text-2xl);
  }
}

.testimonial__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.testimonial__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--color-bg-tertiary);
}

.testimonial__info {
  text-align: left;
}

.testimonial__name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  font-style: normal;
}

.testimonial__role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Carousel in Testimonials */
.testimonials-section .carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.testimonials-section .carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.testimonials-section .carousel__nav:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Mobile-first: Inside container */
.testimonials-section .carousel__nav--prev {
  left: 0;
}

.testimonials-section .carousel__nav--next {
  right: 0;
}

/* Large screens: Outside container */
@media (min-width: 1100px) {
  .testimonials-section .carousel__nav--prev {
    left: -60px;
  }

  .testimonials-section .carousel__nav--next {
    right: -60px;
  }
}

.testimonials-section .carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

/* ===================
   CTA SECTION
   =================== */
.cta-section {
  position: relative;
  text-align: center;
  background: var(--color-bg-secondary);
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section__content {
  position: relative;
  z-index: 1;
}

.cta-section__title {
  margin-bottom: var(--space-md);
}

.cta-section__text {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

/* ===================
   CLIENTS SECTION
   =================== */
.clients-section {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.clients__title {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  margin-bottom: var(--space-xl);
}

.clients__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
}

.clients__logo {
  height: 32px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all var(--transition-normal);
}

.clients__logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* ===================
   WHY CHOOSE US SECTION
   =================== */
.features-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===================
   TYPEWRITER HERO ANIMATION (Mobile-First)
   =================== */

/* Mobile base styles */
.hero__title--main {
  font-size: clamp(1.25rem, 7vw, 1.75rem);
  font-weight: 600;
  font-family: var(--font-heading);
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  line-height: 1.4;
  overflow: visible;
  padding: 0 var(--space-sm);
  text-align: center;
}

/* Typewriter Container */
.typewriter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
}

/* Line wrapper - holds text and cursor */
.typewriter-line-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* Each line of text */
.typewriter-line {
  display: inline-block;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  opacity: 0;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(255, 255, 255, 0.2);
}

/* Line 1 animation */
.typewriter-line--1 {
  animation:
    typewriterReveal 1.5s steps(16, end) 0.5s forwards,
    glowPulse 3s ease-in-out 2s infinite;
}

/* Line 2 animation - starts after line 1 */
.typewriter-line--2 {
  animation:
    typewriterReveal 2s steps(26, end) 2.2s forwards,
    glowPulse 3s ease-in-out 4.2s infinite;
}

/* Base cursor styles */
.typewriter-cursor {
  display: inline-block;
  color: #fff;
  font-weight: 300;
  opacity: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  margin-left: 2px;
}

/* Cursor 1 - appears at start, hides when line 1 ends */
.typewriter-cursor--1 {
  animation:
    cursorAppear 0.1s ease 0.5s forwards,
    cursorBlink 0.8s step-end 0.5s infinite,
    cursorFadeOut 0.3s ease 2s forwards;
}

/* Cursor 2 - appears when line 2 starts */
.typewriter-cursor--2 {
  animation:
    cursorAppear 0.1s ease 2.2s forwards,
    cursorBlink 0.8s step-end 2.2s infinite,
    cursorFadeOut 0.3s ease 4.5s forwards;
}

/* Line 3 - only used for English (longer text) */
.typewriter-line--3 {
  animation:
    typewriterReveal 1.2s steps(12, end) 4.7s forwards,
    glowPulse 3s ease-in-out 6s infinite;
}

/* Cursor 3 - appears when line 3 starts */
.typewriter-cursor--3 {
  animation:
    cursorAppear 0.1s ease 4.7s forwards,
    cursorBlink 0.8s step-end 4.7s infinite,
    cursorFadeOut 0.3s ease 6.2s forwards;
}

/* Hide line 3 for Turkish language */
html[lang="tr"] .typewriter-line-wrapper--3 {
  display: none !important;
}

/* Hide line 3 wrapper when empty (fallback) */
.typewriter-line-wrapper--3:has(.typewriter-line--3:empty) {
  display: none;
}

/* Fallback for browsers without :has() support */
.typewriter-line--3:empty {
  display: none;
}

.typewriter-line--3:empty + .typewriter-cursor--3 {
  display: none;
}

/* Typewriter reveal animation */
@keyframes typewriterReveal {
  0% {
    width: 0;
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

/* Cursor animations */
@keyframes cursorAppear {
  to { opacity: 1; }
}

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

@keyframes cursorFadeOut {
  to { opacity: 0; }
}

/* Soft glow pulse after typing */
@keyframes glowPulse {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(255, 255, 255, 0.4),
      0 0 40px rgba(255, 255, 255, 0.2);
  }
  50% {
    text-shadow:
      0 0 30px rgba(255, 255, 255, 0.6),
      0 0 60px rgba(255, 255, 255, 0.3),
      0 0 80px rgba(255, 255, 255, 0.15);
  }
}

/* Small screens and up (640px+) */
@media (min-width: 640px) {
  .hero__title--main {
    font-size: clamp(1.5rem, 5vw, 2rem);
    padding: 0 var(--space-md);
  }

  .typewriter-container {
    gap: 0.3em;
  }
}

/* Tablet and up (768px+) */
@media (min-width: 768px) {
  .hero__title--main {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    line-height: 1.3;
    margin-bottom: 2rem;
    padding: 0 var(--space-lg);
  }

  .typewriter-container {
    gap: 0.35em;
  }

  .typewriter-line {
    text-shadow:
      0 0 30px rgba(255, 255, 255, 0.5),
      0 0 60px rgba(255, 255, 255, 0.25);
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .hero__title--main {
    font-size: clamp(2rem, 4vw, 3rem);
    padding: 0 var(--space-md);
  }

  .typewriter-container {
    gap: 0.4em;
  }

  .typewriter-line {
    text-shadow:
      0 0 40px rgba(255, 255, 255, 0.5),
      0 0 80px rgba(255, 255, 255, 0.3);
  }

  @keyframes glowPulse {
    0%, 100% {
      text-shadow:
        0 0 40px rgba(255, 255, 255, 0.5),
        0 0 80px rgba(255, 255, 255, 0.3);
    }
    50% {
      text-shadow:
        0 0 60px rgba(255, 255, 255, 0.7),
        0 0 100px rgba(255, 255, 255, 0.4),
        0 0 120px rgba(255, 255, 255, 0.2);
    }
  }
}

/* Light theme */
[data-theme="light"] .typewriter-line {
  color: var(--color-primary-dark);
  text-shadow:
    0 0 30px rgba(114, 47, 55, 0.3),
    0 0 60px rgba(114, 47, 55, 0.15);
}

[data-theme="light"] .typewriter-cursor {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(114, 47, 55, 0.5);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .typewriter-line {
    animation: fadeInSimple 1s ease-out forwards !important;
    width: 100%;
  }

  .typewriter-line--1 {
    animation-delay: 0.3s !important;
  }

  .typewriter-line--2 {
    animation-delay: 0.6s !important;
  }

  .typewriter-cursor {
    display: none;
  }

  /* 3D Model - show static, disable animations */
  .hero__3d-visual {
    animation: none !important;
    opacity: 0.3;
  }

  .hero__3d-model {
    animation: none !important;
  }

  .hero__3d-glow {
    animation: none !important;
    opacity: 0.4;
  }

  /* Disable auto-rotate for 3D model */
  .hero__3d-model::part(default-ar-button) {
    display: none;
  }

  @keyframes fadeInSimple {
    0% {
      opacity: 0;
      transform: translateY(10px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
