/* ===================================================================
   Avaris Technologies — Global Styles
=================================================================== */

:root{
  --black: #050709;
  --bg: #060a0f;
  --bg-alt: #0a1119;
  --panel: #0b131c;
  --panel-2: #0e1720;
  --navy: #0a1929;
  --navy-deep: #071019;
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --cyan: #38bdf8;
  --turquoise: #2dd4bf;
  --turquoise-bright: #5eead4;
  --text: #f3f6f9;
  --text-muted: #93a1b0;
  --text-faint: #5b6b7a;
  --border: rgba(255,255,255,0.08);
  --border-bright: rgba(94,234,212,0.35);
  --grad-primary: linear-gradient(120deg, var(--blue) 0%, var(--cyan) 50%, var(--turquoise) 100%);
  --grad-text: linear-gradient(120deg, #ffffff 0%, var(--cyan) 60%, var(--turquoise-bright) 100%);
  --ease: cubic-bezier(.16,.84,.44,1);
  --ease-soft: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
  background: var(--bg);
}

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4{
  font-family: 'Manrope', 'Inter', -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

p{ margin: 0; color: var(--text-muted); }

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

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

ul{ list-style: none; margin:0; padding:0; }

::selection{
  background: var(--turquoise);
  color: #041014;
}

.section-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow{
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--turquoise-bright);
  font-weight: 600;
  margin-bottom: 18px;
  display: block;
}

.center{ text-align: center; margin-left: auto; margin-right: auto; }

section h2{
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  margin-bottom: 24px;
}

/* ===================================================================
   Noise overlay + cursor glow
=================================================================== */

.noise-overlay{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#cursor-glow{
  position: fixed;
  top:0; left:0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(45,212,191,0.10) 0%, rgba(37,99,235,0.06) 40%, transparent 70%);
  transition: opacity .3s ease;
  opacity: 0;
  will-change: transform;
}
@media (hover:hover){ #cursor-glow.active{ opacity: 1; } }

/* ===================================================================
   Preloader
=================================================================== */

#preloader{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity .8s var(--ease), visibility .8s var(--ease);
}
#preloader.done{ opacity: 0; visibility: hidden; }

.preloader-mark svg{
  width: 54px;
  height: 54px;
  fill: var(--turquoise-bright);
  animation: pulse-mark 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(45,212,191,0.55));
}
@keyframes pulse-mark{
  0%,100%{ transform: scale(1); opacity: .85; }
  50%{ transform: scale(1.12); opacity: 1; }
}

.preloader-bar{
  width: 180px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-bar span{
  display:block;
  height: 100%;
  width: 0%;
  background: var(--grad-primary);
  animation: load-bar 1.6s var(--ease) forwards;
}
@keyframes load-bar{ to{ width: 100%; } }

/* ===================================================================
   Header
=================================================================== */

#site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 22px 0;
  transition: padding .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
#site-header.scrolled{
  padding: 14px 0;
  background: rgba(6,10,15,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo-mark{ width: 26px; height: 26px; }
.logo-thin{
  display: block;
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--text-faint);
  margin-top: 2px;
}

#main-nav ul{ display: flex; gap: 40px; }

.nav-link{
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .3s ease;
  padding: 4px 0;
}
.nav-link::after{
  content:'';
  position: absolute;
  left:0; bottom: -2px;
  width: 0%;
  height: 1px;
  background: var(--grad-primary);
  transition: width .35s var(--ease);
}
.nav-link:hover{ color: var(--text); }
.nav-link:hover::after{ width: 100%; }

.header-cta{ font-size: 13px; padding: 10px 22px; }

#nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 600;
}
#nav-toggle span{
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--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); }

#mobile-nav{
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(5,8,12,0.98);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
#mobile-nav.open{ transform: translateY(0); }
#mobile-nav ul{ display: flex; flex-direction: column; gap: 32px; text-align: center; }
#mobile-nav .nav-link{ font-size: 28px; font-family:'Manrope',sans-serif; font-weight: 700; }

/* ===================================================================
   Buttons
=================================================================== */

.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
  overflow: hidden;
  white-space: nowrap;
}
.btn.small{ padding: 10px 22px; font-size: 13px; }
.btn.full{ width: 100%; }

.btn-primary{
  background: var(--grad-primary);
  color: #04121a;
  box-shadow: 0 8px 30px -8px rgba(45,212,191,0.45);
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(45,212,191,0.65);
}

.btn-outline{
  border-color: var(--border);
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.btn-outline:hover{
  border-color: var(--border-bright);
  background: rgba(45,212,191,0.06);
  transform: translateY(-2px);
}

.btn-ghost{
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover{
  border-color: var(--border-bright);
  background: rgba(45,212,191,0.08);
}

/* ===================================================================
   Hero
=================================================================== */

#hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
}

#hero-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-gradient{
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(37,99,235,0.25), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 0%, rgba(45,212,191,0.12), transparent 60%),
    linear-gradient(180deg, rgba(5,7,9,0.2) 0%, var(--black) 92%);
  pointer-events: none;
}

.hero-content{
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
  padding: 0 24px;
}

.hero-content .eyebrow{ justify-content: center; display: flex; }

#hero h1{
  font-size: clamp(42px, 7.5vw, 92px);
  line-height: 1.18;
  margin-bottom: 28px;
}
#hero h1 .line{ display: block; }
#hero h1 em{
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub{
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 44px;
}

.hero-actions{
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue{
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-cue-line{
  width: 1px;
  height: 46px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.scroll-cue-line i{
  display:block;
  width: 100%;
  height: 40%;
  background: linear-gradient(var(--turquoise-bright), transparent);
  animation: scroll-cue-anim 1.8s ease-in-out infinite;
}
@keyframes scroll-cue-anim{
  0%{ transform: translateY(-100%); }
  100%{ transform: translateY(250%); }
}

/* ===================================================================
   Marquee
=================================================================== */

.marquee{
  position: relative;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 22px 0;
}
.marquee-track{
  display: flex;
  align-items: center;
  width: max-content;
  gap: 28px;
  animation: marquee-scroll 32s linear infinite;
  white-space: nowrap;
}
.marquee-track span{
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.marquee-track i{
  font-style: normal;
  color: var(--turquoise);
  font-size: 8px;
  opacity: 0.7;
}
@keyframes marquee-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ===================================================================
   About
=================================================================== */

#about{ padding: 150px 0 130px; background: var(--bg); }

.about-grid{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-copy p{ margin-bottom: 18px; font-size: 16px; }
.about-copy p:last-child{ margin-bottom: 0; }
.about-copy h2{ margin-bottom: 26px; }

.about-badges{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.badge-card{
  position: relative;
  padding: 26px 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  transition: border-color .4s ease, transform .4s var(--ease), background .4s ease;
}
.badge-card:hover{
  border-color: var(--border-bright);
  transform: translateY(-4px);
  background: linear-gradient(160deg, rgba(45,212,191,0.08), rgba(255,255,255,0));
}
.badge-card.wide{
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.badge-wide-icon{
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  color: var(--turquoise);
  opacity: 0.55;
}
.badge-wide-icon svg{ width: 100%; height: 100%; }
.badge-index{
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--turquoise);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.badge-card h3{ font-size: 18px; margin-bottom: 6px; }
.badge-card p{ font-size: 13.5px; }

/* ===================================================================
   Divisions
=================================================================== */

#divisions{ padding: 130px 0; background: var(--bg-alt); position: relative; }
#divisions::before{
  content:'';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(37,99,235,0.10), transparent 70%);
  pointer-events: none;
}

#divisions h2{ margin-bottom: 64px; }

.division-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.division-card{
  padding: 36px 30px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0.005));
  transition: transform .45s var(--ease), border-color .45s ease, box-shadow .45s ease;
}
.division-card:hover{
  transform: translateY(-8px);
  border-color: var(--border-bright);
  box-shadow: 0 24px 60px -24px rgba(45,212,191,0.25);
}
.division-icon{
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--turquoise-bright);
}
.division-icon svg{ width: 100%; height: 100%; }
.division-card h3{ font-size: 20px; margin-bottom: 12px; }
.division-card p{ font-size: 14.5px; }

.cta-card{
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--grad-primary);
  border: none;
}
.cta-card h3, .cta-card p{ color: #04121a; }
.cta-card p{ margin-bottom: 24px; opacity: 0.85; }
.cta-card .btn-outline{
  border-color: rgba(4,18,26,0.35);
  color: #04121a;
  background: rgba(4,18,26,0.06);
  align-self: flex-start;
}
.cta-card .btn-outline:hover{ background: rgba(4,18,26,0.14); }

/* ===================================================================
   Why Us
=================================================================== */

#why{ padding: 150px 0; background: var(--bg); overflow: hidden; }

.why-grid{
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.why-visual{
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-orb{
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--turquoise-bright), var(--blue) 60%, transparent 80%);
  filter: blur(6px);
  animation: orb-float 7s ease-in-out infinite;
  box-shadow: 0 0 120px 20px rgba(45,212,191,0.25);
}
@keyframes orb-float{
  0%,100%{ transform: translateY(-10px) scale(1); }
  50%{ transform: translateY(14px) scale(1.05); }
}
.why-ring{
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  animation: ring-spin 18s linear infinite;
}
.why-ring.ring-2{
  width: 380px;
  height: 380px;
  border-color: rgba(59,130,246,0.25);
  animation-duration: 26s;
  animation-direction: reverse;
}
@keyframes ring-spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

.why-copy h2{ margin-bottom: 50px; }

.why-item{
  display: flex;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}
.why-item:last-child{ border-bottom: 1px solid var(--border); }
.why-num{
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--turquoise);
  padding-top: 3px;
  flex-shrink: 0;
}
.why-item h3{ font-size: 18px; margin-bottom: 8px; }
.why-item p{ font-size: 14.5px; }

/* ===================================================================
   Contact
=================================================================== */

#contact{ padding: 150px 0; background: var(--bg-alt); position: relative; }
#contact::before{
  content:'';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 50% at 100% 30%, rgba(45,212,191,0.10), transparent 70%);
  pointer-events: none;
}

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  position: relative;
  z-index: 1;
}

.contact-copy h2{ margin-bottom: 20px; }
.contact-copy > p{ font-size: 16px; margin-bottom: 40px; max-width: 400px; }

.contact-details{ display: flex; flex-direction: column; gap: 20px; }
.contact-details li{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.contact-details span{
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact-details a{
  font-size: 17px;
  font-weight: 500;
  transition: color .3s ease;
}
.contact-details li a:hover{ color: var(--turquoise-bright); }

#contact-form{ display: flex; flex-direction: column; gap: 20px; }

.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-field{ position: relative; }
.form-field input,
.form-field textarea{
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  resize: none;
  transition: border-color .3s ease, background .3s ease;
}
.form-field textarea{ padding-top: 22px; min-height: 120px; }
.form-field input:focus,
.form-field textarea:focus{
  outline: none;
  border-color: var(--border-bright);
  background: rgba(45,212,191,0.04);
}
.form-field label{
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 15px;
  color: var(--text-faint);
  pointer-events: none;
  transition: transform .25s var(--ease), font-size .25s var(--ease), color .25s var(--ease), top .25s var(--ease);
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label{
  top: 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--turquoise-bright);
}

.form-status{
  min-height: 20px;
  font-size: 14px;
  color: var(--turquoise-bright);
}

/* ===================================================================
   Footer
=================================================================== */

footer{ background: var(--black); border-top: 1px solid var(--border); padding-top: 60px; }
.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 40px;
}
.footer-nav{ display: flex; gap: 32px; flex-wrap: wrap; }
.footer-social{ display: flex; gap: 14px; }
.footer-social a{
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: border-color .3s ease, color .3s ease, transform .3s var(--ease);
}
.footer-social a svg{ width: 16px; height: 16px; }
.footer-social a:hover{
  border-color: var(--border-bright);
  color: var(--turquoise-bright);
  transform: translateY(-3px);
}
.footer-bottom{
  border-top: 1px solid var(--border);
  padding: 22px 0;
}
.footer-bottom p{ font-size: 13px; text-align: center; }

/* ===================================================================
   Reveal on scroll
=================================================================== */

.reveal{
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   Magnetic buttons
=================================================================== */

.magnetic{ will-change: transform; }

/* ===================================================================
   Responsive
=================================================================== */

@media (max-width: 900px){
  #main-nav, .header-cta{ display: none; }
  #nav-toggle{ display: flex; }

  .about-grid, .why-grid, .contact-grid{
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .why-visual{ height: 280px; order: -1; }

  .division-grid{ grid-template-columns: 1fr 1fr; }

  #about, #divisions, #why, #contact{ padding: 100px 0; }
}

@media (max-width: 640px){
  .section-inner{ padding: 0 20px; }
  .division-grid{ grid-template-columns: 1fr; }
  .about-badges{ grid-template-columns: 1fr 1fr; }
  .badge-wide-icon{ width: 40px; height: 40px; }
  .form-row{ grid-template-columns: 1fr; }
  .footer-inner{ flex-direction: column; text-align: center; }
  #hero h1{ font-size: clamp(36px, 11vw, 56px); }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
