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

:root {
  --bg: #060b18;
  --bg-light: #0a1128;
  --cyan: #00d4ff;
  --blue: #0066ff;
  --accent: #00aaff;
  --white: #ffffff;
  --gray: #8899aa;
  --gray-light: #c0ccdd;
  --text: #e0e8f0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

a, button, input, textarea {
  cursor: none;
}

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

/* === Loading Screen === */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-logo {
  opacity: 0;
  transform: translateY(12px);
  animation: loaderFadeIn 1s ease 0.3s forwards;
}

.loader-logo-svg {
  width: min(700px, 85vw);
  height: auto;
}

.loader-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  margin: 1.5rem auto 0;
  animation: loaderLine 1.5s ease 0.8s forwards;
}

@keyframes loaderFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loaderLine {
  to {
    width: min(350px, 50vw);
  }
}

/* === Custom Cursor === */
.cursor-glow {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.35) 0%, rgba(0, 212, 255, 0.08) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
  mix-blend-mode: screen;
  opacity: 0;
}

.cursor-glow.visible {
  opacity: 1;
}

.cursor-glow.hovering {
  width: 50px;
  height: 50px;
}

/* === Film Grain === */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  animation: grainShift 0.3s steps(3) infinite;
}

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2px, 1px); }
  66% { transform: translate(1px, -2px); }
  100% { transform: translate(0, 0); }
}

/* === Nav === */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  background: transparent;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--white);
  cursor: pointer;
}

.nav-logo .mx {
  color: var(--cyan);
  margin-left: 0.15em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  position: relative;
  padding-bottom: 6px;
}

.nav-link:not(.client-login-btn)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,3 Q30,3 40,1.8 Q60,3 80,4.2 Q100,3 120,3' fill='none' stroke='%2300d4ff' stroke-width='1'/%3E%3C/svg%3E") no-repeat center;
  background-size: 100% 100%;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.8)) drop-shadow(0 0 12px rgba(0, 212, 255, 0.4));
}

.nav-link:not(.client-login-btn):hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-link:hover {
  color: var(--white);
}

.client-login-btn {
  color: var(--cyan) !important;
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 2px;
  transition: all 0.3s;
}

.client-login-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--cyan) !important;
  color: var(--white) !important;
}

/* === Scroll Progress === */
.scroll-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  z-index: 200;
}

/* === Section Indicators === */
.section-indicators {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--gray);
  background: transparent;
  cursor: pointer;
  transition: all 0.4s;
  padding: 0;
}

.indicator.active {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

/* === Horizontal Scroll === */
.horizontal-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.horizontal-wrapper::-webkit-scrollbar {
  display: none;
}

.horizontal-track {
  display: flex;
  height: 100vh;
  flex-shrink: 0;
}

.panel {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.panel-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 4rem;
  overflow-y: auto;
  max-height: 100vh;
}

/* === Hero === */
.panel-hero {
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: transparent;
}

.hero-bg-elements {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#waveCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero-logo-text {
  width: min(700px, 85vw);
  height: auto;
}

.hero-wave-canvas {
  width: min(620px, 80vw);
  height: 180px;
  margin-top: -90px;
  position: relative;
  z-index: 2;
}

.hero-tagline {
  margin-top: -3.5rem;
  position: relative;
  z-index: 3;
  text-shadow: 0 0 30px rgba(6, 11, 24, 1), 0 0 60px rgba(6, 11, 24, 0.8);
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray);
}

.scroll-hint {
  position: absolute;
  bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  animation: hintPulse 2s ease-in-out infinite;
}

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

/* === Section Shared === */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 3rem;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.title-line {
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
}

.title-line.accent {
  color: var(--cyan);
}

/* Clip-mask headline reveal */
.title-mask {
  display: block;
  overflow: hidden;
}

.title-reveal {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.title-reveal.visible {
  transform: translateY(0);
}

.title-mask:nth-child(2) .title-reveal {
  transition-delay: 0.12s;
}

/* === About === */
.panel-about {
  background: transparent;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}

.about-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-light);
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.5;
}

.deco-waveform {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 4px,
    rgba(0, 170, 255, 0.03) 4px,
    rgba(0, 170, 255, 0.03) 5px
  );
  mask-image: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  pointer-events: none;
}

/* === Services === */
.panel-services {
  background: transparent;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 4rem;
}

.service-card {
  padding: 2.5rem;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 4px;
  background: rgba(6, 11, 24, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  border-color: rgba(0, 212, 255, 0.15);
  background: rgba(0, 212, 255, 0.03);
}

.service-card:hover::before {
  opacity: 1;
}

.service-number {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.service-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.service-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray);
}

.service-line {
  margin-top: 2rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 170, 255, 0.3), transparent);
  width: 60px;
}

/* Frequency bars decoration */
.freq-bars {
  position: absolute;
  bottom: 2rem;
  right: 4rem;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  opacity: 0.15;
  pointer-events: none;
}

.freq-bar {
  width: 3px;
  background: var(--cyan);
  border-radius: 1px 1px 0 0;
  animation: freqBounce 1.5s ease-in-out infinite;
}

@keyframes freqBounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* === Contact === */
.panel-contact {
  background: transparent;
  flex-direction: column;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}

.contact-cta {
  margin-bottom: 3rem;
}

.contact-inquiry {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.contact-email {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  padding-bottom: 0.25rem;
  transition: all 0.3s;
}

.contact-email:hover {
  color: var(--white);
  border-color: var(--white);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 1rem 1.25rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all 0.3s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.04);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 1rem 2.5rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.3s;
  align-self: flex-start;
}

.form-submit:hover {
  background: var(--cyan);
  color: var(--bg);
}

/* === Footer === */
.site-footer {
  position: absolute;
  bottom: 2rem;
  left: 4rem;
  font-size: 0.7rem;
  color: var(--gray);
  letter-spacing: 0.1em;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 11, 24, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  width: min(440px, 90vw);
  padding: 3rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: rgba(10, 17, 40, 0.9);
  transform: translateY(20px);
  transition: transform 0.4s;
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--white);
}

.modal-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.modal-logo {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.login-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 1rem;
  line-height: 1.5;
}

/* === Reveal Animations === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* === 3D Orb Canvas === */
.orb-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* === Radial Pulse === */
.radial-pulse {
  position: absolute;
  top: 50%;
  left: 25%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(0, 140, 255, 0.06) 0%, rgba(0, 100, 255, 0.02) 40%, transparent 70%);
  animation: radialPulse 6s ease-in-out infinite;
}

@keyframes radialPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

/* === Responsive === */
@media (max-width: 1024px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .panel-inner {
    padding: 6rem 2.5rem;
  }

  #nav {
    padding: 1.25rem 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: 1.5rem;
  }

  .nav-link:not(.client-login-btn) {
    display: none;
  }

  .section-indicators {
    right: 1rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .panel-inner {
    padding: 5rem 1.5rem;
  }

  .title-line {
    font-size: 2rem;
  }

  .freq-bars {
    display: none;
  }

  .site-footer {
    left: 1.5rem;
  }
}
