:root{
  --bg:#07060a;
  --text:#e7e7ea;
  --muted:#a6a6ac;
  --accent:#c91f2d;
  --max-width:1100px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Montserrat,system-ui,Arial,sans-serif;
  background:linear-gradient(180deg,#050409 0%, #07060a 60%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

/* Three.js background canvas */
#bg-canvas{
  position:fixed;
  top:0;left:0;
  width:100%;height:100%;
  z-index:0;
  pointer-events:none;
}

/* Ensure content sits above canvas */
.site-header, main, footer{
  position:relative;
  z-index:1;
}

.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 24px;
  max-width:var(--max-width);
  margin:0 auto;
}
.brand{display:flex;align-items:center;gap:12px}
.brand .scales{width:42px;height:42px;color:var(--muted)}
.brand .script{font-family:'Great Vibes',cursive;font-size:34px;color:var(--text);letter-spacing:1px}
.nav a{color:var(--muted);text-decoration:none;margin-left:18px}
.nav a.cta{background:transparent;border:1px solid var(--muted);padding:8px 12px;border-radius:6px;color:var(--text)}

/* Hero */
.hero{display:flex;flex-direction:column;gap:18px;align-items:center;max-width:var(--max-width);margin:20px auto;padding:16px}
.hero-left{width:100%}
.hero-right{width:100%;display:flex;align-items:center;justify-content:center}
.eyebrow{color:var(--muted);margin:0 0 8px 0}
.hero-title{font-size:44px;margin:0 0 12px 0;color:var(--text);font-weight:700}
.lead{color:var(--muted);line-height:1.5}
.btn-primary{display:inline-block;margin-top:16px;background:var(--accent);color:white;padding:12px 18px;border-radius:6px;text-decoration:none}
.btn-secondary{display:inline-block;margin-top:12px;background:rgba(201,31,45,0.15);color:var(--accent);padding:10px 16px;border-radius:6px;text-decoration:none;border:1px solid var(--accent);font-size:14px;font-weight:500;transition:all 0.3s ease}
.btn-secondary:hover{background:var(--accent);color:white}
.small{color:var(--muted);font-size:14px;margin-top:16px;font-weight:500;letter-spacing:0.5px;line-height:1.6}

.poster-image{width:100%;max-width:420px;height:auto;border-radius:6px;box-shadow:0 20px 40px rgba(0,0,0,.6);border-left:10px solid rgba(200,30,40,.12);object-fit:cover}

/* Services with 3D tilt cards */
.services, .about, .contact{max-width:var(--max-width);margin:36px auto;padding:24px;border-top:1px solid rgba(255,255,255,0.02)}
.services h4, .about h4, .contact h4{margin:0 0 12px 0;color:var(--text)}
.service-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:24px;
  margin-top:18px;
  perspective:1000px;
}
.service{
  background:linear-gradient(180deg,rgba(255,255,255,0.02),transparent);
  padding:24px 20px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.04);
  transform-style:preserve-3d;
  transition:transform 0.5s cubic-bezier(0.23,1,0.32,1), box-shadow 0.5s ease;
  position:relative;
  overflow:hidden;
}
.service::before{
  content:'';
  position:absolute;
  inset:0;
  background:radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(201,31,45,0.15), transparent 60%);
  opacity:0;
  transition:opacity 0.4s ease;
  pointer-events:none;
  z-index:0;
}
.service:hover::before{opacity:1}
.service:hover{
  box-shadow:0 12px 40px rgba(201,31,45,0.2), 0 0 60px rgba(201,31,45,0.05);
  border-color:rgba(201,31,45,0.3);
}
.service-front{position:relative;z-index:1;transform:translateZ(30px)}
.service h5{margin:0 0 8px 0;font-size:16px;color:var(--text)}
.service p{margin:0;color:var(--muted);font-size:14px;line-height:1.5}

/* Projects banner */
.projects-banner{max-width:var(--max-width);margin:24px auto;padding:16px 24px;border-top:1px solid rgba(201,31,45,0.2);border-bottom:1px solid rgba(201,31,45,0.2);background:rgba(201,31,45,0.03)}
.banner-content{display:flex;align-items:center;gap:16px;justify-content:center;flex-wrap:wrap}
.banner-label{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:1px;font-weight:500}
.banner-projects{display:flex;align-items:center;gap:14px}
.banner-link{color:var(--accent);text-decoration:none;font-weight:500;font-size:14px;transition:color 0.3s ease}
.banner-link:hover{color:#ff6b6b}
.separator{color:var(--muted);opacity:0.5}

/* 3D Carousel Scene */
.projects-showcase{max-width:var(--max-width);margin:48px auto;padding:0 24px}
.scene-3d{
  perspective:1200px;
  width:100%;
  max-width:900px;
  margin:0 auto;
  position:relative;
  min-height:420px;
}
.carousel-3d{
  position:relative;
  width:100%;
  height:420px;
  transform-style:preserve-3d;
  transition:transform 0.8s cubic-bezier(0.23,1,0.32,1);
}
.carousel-3d-item{
  position:absolute;
  top:0;left:0;
  width:100%;
  height:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  transform-style:preserve-3d;
  backface-visibility:hidden;
  transition:all 0.8s cubic-bezier(0.23,1,0.32,1);
  opacity:0;
  pointer-events:none;
  transform:rotateY(45deg) translateZ(-200px) scale(0.8);
}
.carousel-3d-item.active{
  opacity:1;
  pointer-events:auto;
  transform:rotateY(0deg) translateZ(100px) scale(1);
}
.carousel-3d-item.prev{
  opacity:0.4;
  pointer-events:none;
  transform:rotateY(-55deg) translateZ(-150px) scale(0.85);
}
.carousel-3d-item.next{
  opacity:0.4;
  pointer-events:none;
  transform:rotateY(55deg) translateZ(-150px) scale(0.85);
}

/* Project Card */
.project-card{
  background:linear-gradient(180deg,rgba(255,255,255,0.02),transparent);
  border-radius:14px;
  box-shadow:0 8px 32px rgba(0,0,0,0.18);
  display:flex;
  flex-direction:column;
  align-items:center;
  max-width:400px;
  width:100%;
  padding:28px 24px 24px 24px;
  gap:16px;
  border:1px solid rgba(255,255,255,0.04);
  transform:translateZ(40px);
  transform-style:preserve-3d;
}
.project-card-image{
  width:100%;
  max-width:320px;
  height:180px;
  object-fit:contain;
  border-radius:8px;
  background:#18171b;
  box-shadow:0 2px 12px rgba(0,0,0,0.10);
}
.project-card-body{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.project-card-title{
  margin:0;
  font-size:22px;
  color:var(--text);
  font-weight:700;
  text-align:center;
}
.project-card-desc{
  margin:0;
  color:var(--muted);
  font-size:14px;
  text-align:center;
}
.carousel-cta{
  display:inline-block;
  background:var(--accent);
  color:#fff;
  padding:10px 20px;
  border-radius:6px;
  text-decoration:none;
  font-weight:500;
  width:fit-content;
  transition:background 0.3s ease;
  font-size:15px;
  margin-top:6px;
}
.carousel-cta:hover{background:#ff6b6b}

.carousel-btn{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,0.5);color:#fff;border:0;font-size:28px;padding:12px 16px;cursor:pointer;border-radius:4px;transition:background 0.3s ease;z-index:10}
.carousel-btn:hover{background:rgba(201,31,45,0.6)}
.carousel-btn.prev{left:0}
.carousel-btn.next{right:0}

.carousel-dots{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:10}
.dot{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,0.5);border:0;cursor:pointer;transition:background 0.3s ease}
.dot.active{background:var(--accent);width:28px;border-radius:5px}

/* Contact */
.contact form{max-width:720px}
.contact label{display:block;margin-top:12px;color:var(--muted);font-size:14px}
.contact input,.contact textarea{width:100%;padding:10px;margin-top:6px;border-radius:6px;border:1px solid rgba(201,31,45,0.25);background:rgba(255,255,255,0.02);color:var(--text);transition:border-color 0.3s ease}
.contact input:focus,.contact textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px rgba(201,31,45,0.15)}
.form-status{margin-top:8px;color:var(--muted)}

/* hidden honeypot field */
.hidden-field{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

/* Notification / toast */
.notice{position:fixed;right:20px;bottom:20px;z-index:9999;max-width:360px;border-radius:8px;padding:14px 16px;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.4);font-size:15px}
.notice p{margin:6px 0 0 0;color:rgba(255,255,255,0.9);font-size:14px}
.notice strong{display:block;font-size:16px;margin-bottom:2px}
.notice.success{background:#fff;color:#000;box-shadow:0 8px 24px rgba(0,0,0,.3);border:1px solid #ddd}
.notice.success strong{color:#000}
.notice.success p{color:#333}
.notice .notice-dismiss{position:absolute;top:6px;right:8px;background:transparent;border:0;color:#666;font-size:20px;line-height:1;cursor:pointer}

.site-footer{padding:20px;text-align:center;color:var(--muted);border-top:1px solid rgba(255,255,255,0.02)}

/* Large screens */
@media (min-width:861px){
  .hero{flex-direction:row;gap:40px;padding:24px}
  .hero-left{flex:1;min-width:260px}
  .hero-right{flex:1}
  .poster-image{max-width:520px;height:520px}
}

/* Mobile */
@media (max-width:900px){
  .site-header{flex-direction:column;align-items:flex-start;padding:18px 10px 10px 10px;gap:8px}
  .brand{margin-bottom:8px}
  .nav{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
  .nav a{margin-left:0;margin-bottom:4px;padding-left:0;width:100%;text-align:left}
  .nav a.cta{align-self:flex-start}
}
@media (max-width:768px){
  .scene-3d{min-height:340px}
  .carousel-3d{height:340px}
  .carousel-btn{font-size:24px;padding:8px 12px}
  .project-card{padding:20px 16px}
  .project-card-image{max-width:260px;height:140px}
  .project-card-title{font-size:18px}
}
@media (max-width:420px){
  .hero{padding:12px}
  .hero-title{font-size:28px}
  .btn-primary{padding:10px 14px}
}

a,button{cursor:pointer}
button{border:0}
