/* =====================================================
   XEN TESUTO GROUPS — Design tokens
   ===================================================== */
:root{
  --xen-black-0:#050505;
  --xen-black-1:#0a0a0a;
  --xen-black-2:#111111;
  --xen-line: rgba(255,255,255,0.08);
  --xen-orange:#ff6a1f;
  --xen-orange-dim: rgba(255,106,31,0.35);
  --xen-white: #f5f4f2;
  --xen-grey: #9a9a9a;
  --xen-grey-dim:#5c5c5c;

  --font-display:'Space Grotesk', 'Inter', sans-serif;
  --font-body:'Inter', sans-serif;

  --nav-h: 84px;
  --panel-max-w: 460px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior: smooth; }
html,body{
  margin:0; padding:0;
  background: var(--xen-black-0);
  color: var(--xen-white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body{ min-height: 100%; }

a{ color: inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3{ font-family: var(--font-display); margin:0; font-weight:600; letter-spacing:-0.01em; }
p{ margin:0; }

::selection{ background: var(--xen-orange); color: var(--xen-black-0); }

:focus-visible{
  outline: 2px solid var(--xen-orange);
  outline-offset: 3px;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.site-nav{
  position: fixed;
  top:0; left:0; right:0;
  height: var(--nav-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  z-index: 100;
  background: linear-gradient(to bottom, rgba(5,5,5,0.75), rgba(5,5,5,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand{
  display:flex; align-items:center; gap:12px;
  color: var(--xen-white);
}
.brand-mark{ color: var(--xen-white); display:flex; opacity:0.9; }
.brand-word{ display:flex; flex-direction:column; line-height:1.05; }
.brand-word-primary{
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.14em;
  font-weight:600;
}
.brand-word-secondary{
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.36em;
  color: var(--xen-grey);
  font-weight:500;
}
.nav-links{
  display:flex;
  gap: clamp(20px, 3vw, 40px);
}
.nav-links a{
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--xen-grey);
  transition: color 0.25s ease;
  position:relative;
}
.nav-links a::after{
  content:'';
  position:absolute; left:0; right:0; bottom:-6px;
  height:1px; background: var(--xen-orange);
  transform: scaleX(0); transform-origin:left;
  transition: transform .3s ease;
}
.nav-links a:hover{ color: var(--xen-white); }
.nav-links a:hover::after{ transform: scaleX(1); }

.nav-menu-toggle{
  display:none;
  background:none; border:none; cursor:pointer;
  width:34px; height:28px;
  flex-direction:column; justify-content:space-between;
  padding:4px 0;
}
.nav-menu-toggle span{
  display:block; height:1px; width:100%;
  background: var(--xen-white);
}
.mobile-nav{
  position: fixed; inset: var(--nav-h) 0 0 0;
  background: rgba(5,5,5,0.98);
  z-index: 99;
  display:flex; flex-direction:column;
  padding: 32px clamp(20px,6vw,56px);
  gap: 22px;
}
.mobile-nav a{
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--xen-white);
  border-bottom: 1px solid var(--xen-line);
  padding-bottom: 14px;
}
.mobile-nav[hidden]{ display:none; }

/* =====================================================
   FIXED 3D SCENE LAYER
   ===================================================== */
.scene-fixed-layer{
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(120% 100% at 70% 20%, #161616 0%, #0a0a0a 55%, #040404 100%);
}
#webgl-canvas{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
}
.scene-vignette{
  position:absolute; inset:0;
  pointer-events:none;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 45%),
    radial-gradient(140% 100% at 50% 0%, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 40%),
    linear-gradient(to right, rgba(0,0,0,0.35), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.35));
}
.scene-fallback{
  position:absolute; inset:0;
  background: radial-gradient(circle at 65% 45%, #171717 0%, #0a0a0a 55%, #050505 100%);
}
.fallback-glow{
  position:absolute; width:46vw; height:46vw; max-width:520px; max-height:520px;
  left:50%; top:48%; transform:translate(-50%,-50%);
  border-radius:50%;
  background: radial-gradient(circle, var(--xen-orange-dim) 0%, transparent 70%);
  filter: blur(30px);
}

/* =====================================================
   TEXT OVERLAY LAYER
   ===================================================== */
.overlay-layer{
  position: fixed;
  inset:0;
  z-index: 5;
  pointer-events:none;
}
.text-panel{
  position:absolute;
  max-width: var(--panel-max-w);
  padding: 0 clamp(20px, 5vw, 64px);
  opacity: 0;
  will-change: opacity, transform;
}
.text-panel .eyebrow{
  display:inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--xen-orange);
  margin-bottom: 18px;
  font-weight: 600;
}
.text-panel h1,
.text-panel h2{
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  color: var(--xen-white);
}
.text-panel .supporting{
  margin-top: 20px;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.55;
  color: var(--xen-grey);
  font-weight: 300;
  max-width: 40ch;
}
.text-panel .disclaimer{
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--xen-grey-dim);
  font-style: italic;
}

.panel-hero{
  top: 50%; left: clamp(20px, 6vw, 80px);
  transform: translateY(-46%);
}
.panel-hero .scroll-cue{
  margin-top: 56px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--xen-grey);
  display:flex; align-items:center; gap:12px;
}
.scroll-cue-line{
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, var(--xen-orange), transparent);
  display:block;
}

.panel-left{ top:50%; left: clamp(20px, 6vw, 80px); transform: translateY(-46%) translateX(-24px); }
.panel-right{ top:50%; right: clamp(20px, 6vw, 80px); left:auto; text-align:right; transform: translateY(-46%) translateX(24px); }
.panel-right .eyebrow, .panel-right .supporting{ margin-left:auto; }

.panel-final{
  top:50%; left:50%;
  transform: translate(-50%, -40%);
  text-align:center;
  max-width: 720px;
}
.panel-final h2{ font-size: clamp(28px, 4.2vw, 46px); line-height:1.15; }
.panel-final .eyebrow{ letter-spacing:0.3em; }

/* =====================================================
   SCROLL DRIVER
   ===================================================== */
.engineering-sequence{
  position: relative;
  height: 1300vh;
  z-index: 2;
}
.stage-anchor{ position:absolute; left:0; width:1px; height:1px; }
#stage-hero{ top:0; }
#stage-design{ top:12%; }
#stage-mesh{ top:25%; }
#stage-fea{ top:40%; }
#stage-optimization{ top:60%; }
#stage-cfd{ top:70%; }
#stage-printing{ top:80%; }
#stage-final{ top:94%; }

/* =====================================================
   FINAL CTA + FOOTER (normal flow, sit above the fixed scene)
   ===================================================== */
.final-cta{
  position: relative;
  z-index: 10;
  background: var(--xen-black-1);
  border-top: 1px solid var(--xen-line);
  padding: clamp(90px, 14vw, 160px) clamp(20px, 8vw, 120px);
  text-align:center;
  display:flex; flex-direction:column; align-items:center;
}
.final-cta .eyebrow{
  color: var(--xen-orange);
  font-size:11px; letter-spacing:0.22em; text-transform:uppercase; font-weight:600;
}
.final-cta h2{
  margin-top: 20px;
  font-size: clamp(30px, 4.4vw, 54px);
  max-width: 16ch;
  line-height: 1.08;
}
.final-cta .supporting{
  margin-top: 22px;
  max-width: 58ch;
  color: var(--xen-grey);
  font-weight:300;
  line-height:1.65;
  font-size: 15px;
}
.cta-button{
  margin-top: 40px;
  display:inline-flex; align-items:center; gap:10px;
  padding: 16px 30px;
  border: 1px solid var(--xen-orange);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--xen-white);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.cta-button:hover{
  background: var(--xen-orange);
  color: var(--xen-black-0);
  transform: translateY(-2px);
}

footer{
  position: relative;
  z-index: 10;
  background: var(--xen-black-0);
  padding: clamp(60px, 8vw, 90px) clamp(20px, 8vw, 120px) 30px;
}
.footer-top{
  display:flex; flex-wrap:wrap; gap: 60px;
  justify-content:space-between;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--xen-line);
}
.footer-brand .brand-word-primary{ display:block; font-size:16px; letter-spacing:0.14em; }
.footer-brand .brand-word-secondary{ display:block; margin-top:4px; }
.footer-tagline{
  margin-top: 18px;
  color: var(--xen-grey);
  font-size: 13px;
  max-width: 26ch;
  font-weight:300;
}
.footer-columns{ display:flex; gap: clamp(40px, 6vw, 90px); flex-wrap:wrap; }
.footer-col h3{
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform:uppercase;
  color: var(--xen-grey);
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col ul{ display:flex; flex-direction:column; gap: 11px; }
.footer-col li, .footer-col a{ font-size: 13.5px; color: var(--xen-white); font-weight:300; }
.footer-col a:hover{ color: var(--xen-orange); }
.footer-bottom{
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  padding-top: 26px;
  color: var(--xen-grey-dim);
  font-size: 11.5px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 860px){
  .nav-links{ display:none; }
  .nav-menu-toggle{ display:flex; }
  :root{ --panel-max-w: 88vw; }
  .panel-right{ text-align:left; left: clamp(20px,6vw,80px); right:auto; transform: translateY(-46%) translateX(-24px); }
  .panel-right .eyebrow, .panel-right .supporting{ margin-left:0; }
  .text-panel h1, .text-panel h2{ font-size: clamp(34px, 9vw, 54px); }
}

@media (max-width: 520px){
  .engineering-sequence{ height: 1500vh; }
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .text-panel{ transition:none !important; }
  .cta-button{ transition:none; }
}

/* =====================================================
   LOADING SCREEN
   ===================================================== */
.loader{
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--xen-black-0);
  display:flex;
  align-items:center;
  justify-content:center;
  transition: opacity 0.6s ease;
}
.loader-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 18px;
}
.loader-mark{ color: var(--xen-white); }
.loader-poly-outer{
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
  animation: loaderDrawOuter 1.4s ease forwards;
}
.loader-poly-inner{
  stroke-dasharray: 46;
  stroke-dashoffset: 46;
  animation: loaderDrawInner 1.2s ease 0.3s forwards;
}
@keyframes loaderDrawOuter{ to{ stroke-dashoffset: 0; } }
@keyframes loaderDrawInner{ to{ stroke-dashoffset: 0; } }
.loader-word{
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--xen-grey);
  margin-top: 4px;
}
.loader-bar{
  width: 180px;
  height: 2px;
  background: var(--xen-line);
  border-radius: 2px;
  overflow:hidden;
}
.loader-bar-fill{
  display:block;
  height:100%;
  width:0%;
  background: var(--xen-orange);
  transition: width 0.2s linear;
}
.loader-percent{
  font-size: 11px;
  color: var(--xen-grey-dim);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.loader.loader-hidden{
  opacity: 0;
  pointer-events: none;
}

/* =====================================================
   HERO TAGLINE
   ===================================================== */
.hero-accent{ color: var(--xen-orange); }
.hero-tagline{
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 19px);
  letter-spacing: 0.16em;
  color: var(--xen-white);
  font-weight: 500;
}
.tagline-dot{
  color: var(--xen-orange);
  margin: 0 10px;
  font-size: 0.7em;
  vertical-align: middle;
}

/* =====================================================
   SHARED CONTENT SECTION LAYOUT
   ===================================================== */
.content-section{
  position: relative;
  z-index: 10;
  background: var(--xen-black-1);
  border-top: 1px solid var(--xen-line);
  padding: clamp(70px, 10vw, 130px) clamp(20px, 8vw, 120px);
}
.section-inner{ max-width: 1180px; margin: 0 auto; }
.section-title{
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  margin-top: 16px;
}
.eyebrow{
  display:inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--xen-orange);
  font-weight: 600;
}
.eyebrow.center, .section-title.center{ text-align:center; display:block; }
.content-section .supporting{
  color: var(--xen-grey);
  font-weight: 300;
  line-height: 1.65;
  font-size: 15px;
}

/* Scroll-reveal utility (JS toggles .reveal-visible on intersection) */
.reveal{
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.reveal-visible{
  opacity: 1;
  transform: translateY(0);
}
.reveal-child{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal-visible .reveal-child{
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   ABOUT THE FOUNDER
   ===================================================== */
.about-grid{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items:start;
}
.about-photo{
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px solid var(--xen-line);
  background: radial-gradient(circle at 35% 30%, #1c1c1c, #0a0a0a 70%);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display);
  font-size: 44px;
  letter-spacing: 0.05em;
  color: var(--xen-orange);
}
.about-copy h2{ font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 20px; line-height:1.15; }
.about-copy .supporting{ margin-bottom: 16px; max-width: 62ch; }
.founder-signature{ margin-top: 26px; }
.founder-name{ font-family: var(--font-display); font-size: 16px; color: var(--xen-white); }
.founder-title{ font-size: 12px; color: var(--xen-grey-dim); margin-top: 3px; }

/* =====================================================
   3 NAVIGATION BUTTONS
   ===================================================== */
.cta-buttons-section{ text-align:center; }
.cta-buttons-grid{
  margin-top: 34px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap: 18px;
}
.big-cta-button{
  display:inline-flex; align-items:center; gap:10px;
  padding: 20px 34px;
  border: 1px solid var(--xen-line);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--xen-white);
  background: var(--xen-black-2);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
  min-width: 220px;
  justify-content: center;
}
.big-cta-button svg{ color: var(--xen-orange); transition: transform .25s ease; }
.big-cta-button:hover{
  border-color: var(--xen-orange);
  background: #161616;
  transform: translateY(-3px);
}
.big-cta-button:hover svg{ transform: translateX(4px); }

/* =====================================================
   STATS
   ===================================================== */
.stats-grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  text-align:center;
}
.stat-card{
  padding: 30px 14px;
  border: 1px solid var(--xen-line);
  border-radius: 14px;
  background: var(--xen-black-2);
}
.stat-number-wrap{
  display:flex; align-items:flex-start; justify-content:center;
  font-family: var(--font-display);
  color: var(--xen-white);
}
.stat-number{
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-plus{
  font-size: 22px;
  color: var(--xen-orange);
  margin-top: 4px;
}
.stat-label{
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--xen-grey);
}

/* =====================================================
   10 PILLARS
   ===================================================== */
.pillars-grid{
  margin-top: 48px;
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.pillar-card{
  padding: 26px 20px;
  border: 1px solid var(--xen-line);
  border-radius: 14px;
  background: var(--xen-black-2);
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.pillar-card:hover{
  transform: translateY(-6px);
  border-color: var(--xen-orange-dim);
  background: #161616;
}
.pillar-index{
  display:block;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--xen-orange);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.pillar-card h3{ font-size: 15px; line-height:1.3; margin-bottom:8px; }
.pillar-card p{ font-size: 12.5px; color: var(--xen-grey); font-weight:300; line-height:1.5; }

/* =====================================================
   COMPLETED WORKS
   ===================================================== */
.works-grid{
  margin-top: 48px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.work-card{
  border: 1px solid var(--xen-line);
  border-radius: 14px;
  overflow:hidden;
  background: var(--xen-black-2);
  transition: transform .3s ease, border-color .3s ease;
}
.work-card:hover{ transform: translateY(-6px); border-color: var(--xen-orange-dim); }
.work-thumb{
  height: 160px;
  background-size: 140% 140%;
  background-position: center;
}
.work-thumb-1{ background: linear-gradient(135deg, #201d1a, #3a2412 40%, #ff6a1f22); }
.work-thumb-2{ background: linear-gradient(135deg, #10181c, #16323b 45%, #ff6a1f18); }
.work-thumb-3{ background: linear-gradient(135deg, #17151f, #2a2140 45%, #ff6a1f14); }
.work-thumb-4{ background: linear-gradient(135deg, #1c1414, #3b1c17 45%, #ff6a1f24); }
.work-thumb-5{ background: linear-gradient(135deg, #101a1a, #143231 45%, #ff6a1f14); }
.work-thumb-6{ background: linear-gradient(135deg, #16171b, #24293a 45%, #ff6a1f18); }
.work-card h3{ font-size: 15px; padding: 18px 18px 6px; }
.work-card p{ font-size: 12.5px; color: var(--xen-grey); font-weight:300; padding: 0 18px 20px; line-height:1.5; }

/* =====================================================
   JOIN OUR TEAM
   ===================================================== */
.careers-grid{
  margin-top: 48px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.career-card{
  padding: 24px 20px;
  border: 1px solid var(--xen-line);
  border-radius: 14px;
  background: var(--xen-black-2);
  transition: transform .3s ease, border-color .3s ease;
}
.career-card:hover{ transform: translateY(-6px); border-color: var(--xen-orange-dim); }
.career-card h3{ font-size: 15px; margin-bottom: 8px; }
.career-card p{ font-size: 12.5px; color: var(--xen-grey); font-weight:300; line-height:1.5; margin-bottom: 16px; }
.career-card a{
  display:inline-flex; align-items:center;
  font-size: 12px; letter-spacing:0.05em;
  color: var(--xen-orange);
  border-bottom: 1px solid var(--xen-orange-dim);
  padding-bottom: 2px;
}

/* =====================================================
   GET IN TOUCH
   ===================================================== */
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 80px);
  align-items:start;
}
.contact-intro h2{ font-size: clamp(26px, 3.4vw, 38px); margin: 16px 0 18px; line-height:1.15; }
.contact-form{ display:flex; flex-direction:column; gap: 18px; }
.contact-form label{ display:flex; flex-direction:column; gap:8px; font-size:12px; letter-spacing:0.05em; color: var(--xen-grey); text-transform:uppercase; }
.contact-form input,
.contact-form textarea{
  background: var(--xen-black-2);
  border: 1px solid var(--xen-line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--xen-white);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  transition: border-color .25s ease;
}
.contact-form input:focus,
.contact-form textarea:focus{
  outline:none;
  border-color: var(--xen-orange);
}
.contact-form .cta-button{ align-self:flex-start; border:1px solid var(--xen-orange); background:none; }
.form-success{
  margin-top: 6px;
  font-size: 13px;
  color: var(--xen-orange);
}

/* =====================================================
   NEW-SECTION RESPONSIVE RULES
   ===================================================== */
@media (max-width: 960px){
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }
  .pillars-grid{ grid-template-columns: repeat(2, 1fr); }
  .works-grid{ grid-template-columns: repeat(2, 1fr); }
  .careers-grid{ grid-template-columns: repeat(2, 1fr); }
  .contact-grid{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr; }
  .about-photo{ width:140px; height:140px; font-size:30px; }
}
@media (max-width: 560px){
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }
  .pillars-grid{ grid-template-columns: 1fr; }
  .works-grid{ grid-template-columns: 1fr; }
  .careers-grid{ grid-template-columns: 1fr; }
}