/* ---------- Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0c;
  --bg-alt: #111113;
  --surface: #17171a;
  --surface-2: #1e1e22;
  --border: rgba(255,255,255,0.08);
  --text: #f2f1ec;
  --text-dim: #a6a5a1;
  --text-faint: #6f6f6d;
  --accent: #e2a445;
  --accent-2: #f0c98a;
  --accent-soft: rgba(226,164,69,0.14);
  --radius: 14px;
  --container: 1180px;
  --ff-head: 'Sora', sans-serif;
  --ff-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3 { font-family: var(--ff-head); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #14100a;
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-2); }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  backdrop-filter: blur(12px);
  background: rgba(10,10,12,0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10,10,12,0.85);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--ff-head); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-sub { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a { font-size: 14px; font-weight: 500; color: var(--text-dim); transition: color 0.2s ease; }
.main-nav a:hover { color: var(--text); }
.nav-cta {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 78px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(226,164,69,0.16) 0%, rgba(226,164,69,0) 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.eyebrow { }
.hero h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  margin-bottom: 24px;
}
.hero-lead {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-skills span {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}
.wire-cube {
  position: relative;
  width: 220px;
  height: 220px;
  transform-style: preserve-3d;
  animation: spin 18s linear infinite;
}
.wire-cube .face {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(226,164,69,0.45);
  background: rgba(226,164,69,0.03);
}
.wire-cube .front  { transform: translateZ(110px); }
.wire-cube .back   { transform: translateZ(-110px) rotateY(180deg); }
.wire-cube .right  { transform: rotateY(90deg) translateZ(110px); }
.wire-cube .left   { transform: rotateY(-90deg) translateZ(110px); }
.wire-cube .top    { transform: rotateX(90deg) translateZ(110px); }
.wire-cube .bottom { transform: rotateX(-90deg) translateZ(110px); }

@keyframes spin {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ---------- Section shared ---------- */
section { padding: 120px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.section-lead { color: var(--text-dim); font-size: 16px; }

/* ---------- Work / Portfolio ---------- */
.work { background: var(--bg-alt); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #14100a; border-color: var(--accent); }

.grid { display: grid; gap: 24px; }
.work-grid { grid-template-columns: repeat(3, 1fr); }

.work-item {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease;
}
.work-item:hover { transform: translateY(-6px); }
.work-item.hidden { display: none; }

.tile {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
}
.tile-tag, .tile-title { position: relative; z-index: 1; }
.tile-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
}
.tile-title { font-family: var(--ff-head); font-weight: 600; font-size: 16px; }

.tile-product { background: linear-gradient(135deg, #3a2f18, #1d160a); }
.tile-product.alt { background: linear-gradient(135deg, #2c2412, #17130a); }
.tile-sim { background: linear-gradient(135deg, #142b30, #0b1618); }
.tile-sim.alt { background: linear-gradient(135deg, #10262c, #0a1518); }
.tile-scan { background: linear-gradient(135deg, #24202e, #131118); }
.tile-vfx { background: linear-gradient(135deg, #301419, #16090c); }
.tile-tools { background: linear-gradient(135deg, #1c2416, #0f130a); }

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
.about-visual { position: relative; height: 320px; }
.stat-card {
  position: absolute;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  top: 0; left: 0;
}
.stat-card.offset { top: 110px; left: 90px; background: var(--surface-2); }
.stat-num { font-family: var(--ff-head); font-size: 30px; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-detail { font-size: 14px; color: var(--text); margin-top: 6px; }

.about-text h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 20px; }
.about-text p { color: var(--text-dim); margin-bottom: 18px; max-width: 620px; }
.about-list { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.about-list li { color: var(--text-dim); font-size: 15px; padding-left: 18px; position: relative; }
.about-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.about-list strong { color: var(--text); }

/* ---------- Services ---------- */
.services { background: var(--bg-alt); }
.services-grid { grid-template-columns: repeat(4, 1fr); }
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.service-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  margin-bottom: 20px;
  position: relative;
}
.service-icon::before {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
}
.service-card h3 { font-size: 17px; margin-bottom: 10px; }
.service-card p { color: var(--text-dim); font-size: 14px; }

/* ---------- Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step { border-top: 1px solid var(--border); padding-top: 24px; }
.step-num { font-family: var(--ff-head); color: var(--accent); font-size: 14px; font-weight: 700; }
.step h3 { font-size: 18px; margin: 12px 0 10px; }
.step p { color: var(--text-dim); font-size: 14px; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-alt); }
.contact-inner { text-align: center; max-width: 640px; }
.contact-inner h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 16px; }
.contact-lead { color: var(--text-dim); margin-bottom: 32px; }
.email-link {
  display: inline-block;
  font-family: var(--ff-head);
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.email-link:hover { border-color: var(--accent); }
.contact-meta {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6,6,7,0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 24px;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-inner {
  max-width: 640px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.lightbox-media {
  aspect-ratio: 16/9;
  border-radius: 10px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-alt));
  border: 1px solid var(--border);
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }
#lightboxTitle { font-family: var(--ff-head); font-size: 20px; margin-bottom: 8px; }
#lightboxDesc { color: var(--text-dim); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { order: -1; margin-bottom: 20px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { height: 240px; margin-bottom: 20px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 78px; left: 0; right: 0;
    background: rgba(10,10,12,0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 32px 24px;
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { border: none; padding: 14px 0; }
  .nav-toggle { display: flex; }
  section { padding: 80px 0; }
  .work-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-card { position: static; width: 100%; margin-bottom: 16px; }
  .about-visual { height: auto; }
}
