:root{
  --purple:#5f3757;
  --blue:#1f2d51;
  --red:#d32029;
  --white:#ffffff;

  --glass-bg: rgba(10, 12, 18, 0.62);
  --glass-border: rgba(255,255,255,0.14);
  --glow: rgba(95, 55, 87, 0.55);

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);

  --shadow: 0 18px 45px rgba(0,0,0,0.45);

  --ringX: min(30vw, 500px);
  --ringY: clamp(220px, 18vw, 320px);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family:"Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);

  overflow-x:hidden;
  overflow-y:hidden;   
  background:#000;

  overscroll-behavior: none;
}

.preloader{
  position:fixed; inset:0;
  display:grid; place-items:center;
  background:#000;
  z-index:9999;
  overflow:hidden;
}

.preloader::before{
  content:"";
  position:absolute; inset:-20%;
  background:
    radial-gradient(1000px 900px at 20% 85%, rgba(31,45,81,0.95), rgba(0,0,0,0) 60%),
    radial-gradient(950px 820px at 80% 20%, rgba(95,55,87,0.85), rgba(0,0,0,0) 60%),
    radial-gradient(900px 700px at 55% 55%, rgba(95,55,87,0.20), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, rgba(0,0,0,0.92), rgba(0,0,0,0.98));
  filter: saturate(1.05) contrast(1.05);
  opacity:0.95;
}

.preloader::after{
  content:"";
  position:absolute; inset:0;
  background-image:url("assets/img/hex-shadow.png");
  background-size:cover;
  background-position:center;
  opacity:0.12;
  filter: blur(0.3px);
}

.preloader__inner{
  position:relative;
  z-index:1;
}

.preloader__logo{
  width:min(460px, 76vw);
  height:auto;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.65));
}

.preloader__sub {
  margin-top: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  opacity: 0.6;
  text-transform: uppercase;
}

.preloader__progress{
  margin-top: 22px;
  width: min(420px, 70vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.signal-track{
  position: relative;
  width: 100%;
  height: 16px;
}

.signal-line{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  overflow: hidden;
}

.signal-line::before{
  content: "";
  position: absolute;
  inset: 0;
  width: var(--p, 0%);
  height: 100%;
  background: var(--red);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(211, 32, 41, 0.55);
  transition: width 120ms linear;
}

.signal-dot{
  position: absolute;
  top: 50%;
  left: var(--p, 0%);
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
  box-shadow:
    0 0 10px rgba(211, 32, 41, 0.75),
    0 0 18px rgba(211, 32, 41, 0.35);
  transition: left 120ms linear;
}

.signal-dot--static{
  left: 0;
  transform: translate(-50%, -50%);
  opacity: 0.95;
}

.signal-dot:not(.signal-dot--static){
  animation: dotPulse 900ms ease-in-out infinite;
}

@keyframes dotPulse{
  0%,100%{ transform: translate(-50%, -50%) scale(1); }
  50%{ transform: translate(-50%, -50%) scale(1.25); }
}

.preloader.is-hidden{
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}


.app{
  position:relative;
  height:100vh;       
  width:100%;
}

.bg{
  position:fixed;
  inset:0;
  overflow:hidden;
  z-index:0;

  opacity:0;
  transition: opacity 900ms ease;
}
.app.is-ready .bg{ opacity:1; }

.bg__gradient{
  position:absolute; inset:-20%;
  background:
    radial-gradient(1000px 900px at 20% 85%, rgba(31,45,81,0.95), rgba(0,0,0,0) 60%),
    radial-gradient(950px 820px at 80% 20%, rgba(95,55,87,0.85), rgba(0,0,0,0) 60%),
    radial-gradient(900px 700px at 55% 55%, rgba(95,55,87,0.25), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.95));
  filter: saturate(1.05) contrast(1.05);
  transform: translateZ(0);
}

.bg__hexShadow{
  position:absolute; inset:0;
  background-image:url("assets/img/hex-shadow.png");
  background-size:cover;
  background-position:center;
  opacity:0.20;
  filter: blur(0.2px);
  transform: translateZ(0);
  animation: drift 18s ease-in-out infinite alternate;
}

.bg__noise{
  position:absolute; inset:0;
  background-image:url("assets/img/bg-noise.png");
  background-repeat:repeat;
  opacity:0.55;
  mix-blend-mode: overlay;
  pointer-events:none;
  transform: translateZ(0);
}

@keyframes drift{
  from{ transform: translate3d(-10px,-8px,0) scale(1.02); }
  to  { transform: translate3d(10px,8px,0) scale(1.04); }
}


.sound{
  position:fixed;
  top:18px; right:18px;
  display:flex; gap:10px; align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.25);
  color:rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor:pointer;
  z-index:5;
}
.sound__label{
  font-size:12px;
  letter-spacing:0.12em;
}
.sound:focus-visible{
  outline:2px solid rgba(255,255,255,0.28);
  outline-offset:2px;
}


.stage{
  position:relative;
  z-index:2;
  height:100vh;     
  width:100%;
  display:grid;
  place-items:center;
  padding:28px;

  transform-style: preserve-3d;
  perspective: 1400px;
}


@media (min-width: 821px){
  .stage{ transform: translateY(-40px); }
}


.app.is-overlay-open .bg{
  opacity: 0.55;
  filter: blur(1.2px) saturate(0.9) contrast(0.95);
  transition: opacity 420ms ease, filter 420ms ease;
}

.app.is-overlay-open .hex{
  transform: var(--base-t) translateY(8px) scale(0.985);
  filter: blur(0.6px) drop-shadow(0 12px 28px rgba(0,0,0,0.35));
  transition: transform 420ms cubic-bezier(.22,.61,.36,1), filter 420ms ease;
}


.signature{
  position:absolute;
  bottom:26px;
  left:50%;
  transform:translateX(-50%);
  font-size:14px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.78);
  user-select:none;
  text-align:center;
  width:min(92vw, 820px);
}

.hex{
  position:absolute;
  width:240px;
  height:210px;
  text-decoration:none;
  color:var(--text);

 
  --base-t: translate(-50%, -50%) translateZ(0);

  opacity:0;
  transform: var(--base-t) translateY(60px) scale(.92);
  filter: blur(6px) drop-shadow(0 18px 40px rgba(0,0,0,.45));

  will-change: transform, filter;
  transition: transform 260ms cubic-bezier(.22,.61,.36,1),
              filter 260ms ease;

  isolation:isolate;
}

.hex::before{
  content:"";
  position:absolute;
  inset:-3px;
  pointer-events:none;

  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);

  z-index:0;
  opacity:.30;

  background: linear-gradient(120deg,
    rgba(95,55,87,0.00) 0%,
    rgba(95,55,87,0.22) 30%,
    rgba(255,255,255,0.14) 50%,
    rgba(95,55,87,0.22) 70%,
    rgba(95,55,87,0.00) 100%
  );

  filter:
    drop-shadow(0 0 10px rgba(95,55,87,0.22))
    drop-shadow(0 0 26px rgba(95,55,87,0.12));

  transition: opacity .35s ease, filter .35s ease;
}

.hex__inner{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:22px 18px;

  background: var(--glass-bg);
  border: 1px solid rgba(95,55,87,0.22);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    inset 0 0 18px rgba(95,55,87,0.10),
    0 18px 45px rgba(0,0,0,0.50);

  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  position: relative;
  z-index: 1;

  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.hex__inner::before{
  content:"";
  position:absolute;
  inset:0;
  clip-path: inherit;
  pointer-events:none;

  box-shadow:
    inset 0 0 0 1px rgba(95,55,87,0.28),
    inset 0 0 18px rgba(95,55,87,0.10),
    0 0 22px rgba(95,55,87,0.08);

  opacity:.90;
  transition: box-shadow .35s ease, opacity .35s ease;
}

.hex__inner::after{
  content:"";
  position:absolute;
  left: var(--rpx, 50%);
  top:  var(--rpy, 50%);
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 999px;

  background: radial-gradient(circle,
    rgba(255,255,255,0.55) 0%,
    rgba(95,55,87,0.35) 35%,
    rgba(95,55,87,0.00) 70%
  );

  opacity: 0;
  pointer-events:none;
}

.hex.rippling .hex__inner::after{
  animation: hexRipple 520ms ease-out forwards;
}

@keyframes hexRipple{
  0%   { transform: translate(-50%, -50%) scale(0);   opacity: 0.0; }
  15%  { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}

.hex__label{
  font-size:16px;
  letter-spacing:0.10em;
  text-transform:uppercase;
  line-height:1.05;
}
.hex__sub{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
  letter-spacing:0.06em;
  text-transform:lowercase;
}

@media (hover:hover){
  .hex:hover::before{
    opacity: .70;
    filter:
      drop-shadow(0 0 14px rgba(95,55,87,0.32))
      drop-shadow(0 0 44px rgba(95,55,87,0.18));
  }

  .hex:hover .hex__inner{
    transform: translateY(-6px) scale(1.02);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.06),
      inset 0 0 26px rgba(210, 170, 255, 0.436),
      0 0 34px rgba(160, 110, 220, 0.418),
      0 22px 55px rgba(0,0,0,0.55);
  }

  .hex:hover .hex__inner::before{
    box-shadow:
      inset 0 0 0 1px rgba(95,55,87,0.55),
      inset 0 0 28px rgba(95,55,87,0.18),
      0 0 45px rgba(95,55,87,0.18);
    opacity:1;
  }
}


.hex:focus-visible{
  outline:2px solid rgba(255,255,255,0.32);
  outline-offset:6px;
  border-radius:18px;
}


.hex--logo{
  left: 50%;
  top: 50%;
}
.hex__inner--logo{ padding:18px; }
.hex__logo{
  width: min(220px, 70%);
  height:auto;
  opacity:0.98;
}
.hex--logo { cursor: pointer; }


.hex--s1{ 
  left: calc(50% - (var(--ringX) * 0.55)); 
  top: calc(50% - var(--ringY) + 40px); 
}

.hex--s2{ 
  left: calc(50% + (var(--ringX) * 0.55)); 
  top: calc(50% - var(--ringY) + 40px); 
}
.hex--s3{ left: calc(50% + var(--ringX)); top:  calc(50% + (var(--ringY) * 0.10)); }
.hex--s4{ left: calc(50% - var(--ringX)); top: calc(50% + (var(--ringY) * 0.35)); }
.hex--contact{ left: calc(50% + (var(--ringX) * 0.35)); top:  calc(50% + (var(--ringY) * 0.70)); }


.overlay{
  position:fixed; inset:0;
  z-index:10;

  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.overlay.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition: opacity 220ms ease;
}

.overlay__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,0.62);

  opacity:0;
  transition: opacity 240ms ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.overlay.is-open .overlay__backdrop{ opacity:1; }

.overlay__panel{
  position:absolute;
  left:50%; top:50%;
  width:min(860px, 92vw);
  max-height:min(80vh, 720px);
  overflow:auto;

  background: rgba(10,12,18,0.72);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius:22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  --dx: 0px;
  --dy: 0px;

  opacity:0;
  transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.96);
  transform-origin:center;

  transition:
    transform 520ms cubic-bezier(.16,.84,.24,1),
    opacity 240ms ease;
}

.overlay.is-open .overlay__panel{
  opacity:1;
  transform: translate(-50%, -50%) scale(1);
  animation: portalIn 2600ms cubic-bezier(.16,.84,.24,1) both;
}

@keyframes portalIn{
  0%{
    box-shadow:
      0 0 0 rgba(95,55,87,0),
      0 18px 45px rgba(0,0,0,0.45);
  }
  18%{
    box-shadow:
      0 0 60px rgba(95,55,87,0.55),
      0 0 160px rgba(31,45,81,0.38),
      0 28px 80px rgba(0,0,0,0.60);
  }
  45%{
    box-shadow:
      0 0 42px rgba(95,55,87,0.40),
      0 0 110px rgba(31,45,81,0.26),
      0 22px 60px rgba(0,0,0,0.55);
  }
  75%{
    box-shadow:
      0 0 26px rgba(95,55,87,0.28),
      0 0 70px rgba(31,45,81,0.18),
      0 20px 55px rgba(0,0,0,0.50);
  }
  100%{
    box-shadow:
      0 0 18px rgba(95,55,87,0.20),
      0 18px 45px rgba(0,0,0,0.45);
  }
}

.overlay__top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:18px 18px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.overlay__title{
  margin:0;
  font-size:18px;
  letter-spacing:0.08em;
  text-transform:uppercase;
}
.overlay__close{
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.18);
  color:rgba(255,255,255,0.88);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
}
.overlay__body{
  padding:18px;
  color:rgba(255,255,255,0.86);
  line-height:1.6;
}


.form{ display:grid; gap:12px; margin-top:10px; }
.input, .textarea{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color:rgba(255,255,255,0.92);
  padding:12px 12px;
  font: inherit;
  outline:none;
}
.textarea{ min-height:140px; resize:vertical; }
.btn{
  justify-self:start;
  border-radius:14px;
  border:1px solid rgba(95,55,87,0.55);
  background: rgba(95,55,87,0.18);
  color:rgba(255,255,255,0.92);
  padding:12px 14px;
  cursor:pointer;
}
.btn:hover{ background: rgba(95,55,87,0.26); }

.form-status{
  display:none;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  line-height: 1.4;
}

.hex.is-visible{
  animation: hexRise 1200ms cubic-bezier(.12,.9,.18,1) forwards;
}

@keyframes hexRise{
  0%{
    opacity:0;
    transform: var(--base-t) translateY(60px) scale(.92);
    filter: blur(6px);
  }
  60%{
    opacity:1;
    transform: var(--base-t) translateY(-6px) scale(1.02);
    filter: blur(0px);
  }
  100%{
    opacity:1;
    transform: var(--base-t) translateY(0px) scale(1);
    filter: blur(0px);
  }
}


.hex.float .hex__inner{ animation: floatInner 6s ease-in-out infinite; }
.hex.float[data-float="2"] .hex__inner{ animation-duration:7s; }
.hex.float[data-float="3"] .hex__inner{ animation-duration:6.2s; }
.hex.float[data-float="4"] .hex__inner{ animation-duration:7.6s; }
.hex.float[data-float="5"] .hex__inner{ animation-duration:6.5s; }

@keyframes floatInner{
  0%{ transform: translateY(0px); }
  50%{ transform: translateY(-10px); }
  100%{ transform: translateY(0px); }
}

@media (hover:hover){
  .hex.float:hover .hex__inner{ animation-play-state: paused; }
}

@media (prefers-reduced-motion: reduce){
  .bg__hexShadow{ animation:none; }
  .hex__inner{ transition:none; }
  .hex.float .hex__inner{ animation: none; }
}


@media (max-width: 1100px){
  body{
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior: contain;
  }

  .app{ height:auto; min-height:100svh; }

  .stage{
    height:auto;
    min-height:100svh;
    place-items:start center;
    padding-top:84px;
    padding-bottom:100px;
    transform:none;
  }

  .signature{
    position:static;
    transform:none;
    margin-top:22px;
    text-align:center;
  }

  .hex{
    display:block;            
    position:relative;        
    left:auto; top:auto;     
    margin:12px auto;

    width:220px;
    height:192px;

    opacity:1;
    transform:none;
    filter:none;
  }

  .hex--logo{
    width:270px;
    height:232px;
  }
}


.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}


.network-lines{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  pointer-events:none;
  z-index: 9999;
}

.network-lines line{
  stroke: #d32029;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
}

@keyframes drawLine {
  from { stroke-dashoffset: var(--len); opacity: 1; }
  to   { stroke-dashoffset: 0;         opacity: 1; }
}
@keyframes fadeOutLine {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
  .network-lines line{
    animation: none !important;
    opacity: 0 !important;
  }
}

@media (max-width: 1100px){

  .hex{
    display:block;
    position:relative;
    left:auto; top:auto;
    margin:12px auto;

    --base-t: translateZ(0);
    transform:none !important;
    animation:none !important;

    opacity:1;
    filter:none;
  }

  .hex.is-visible{ animation:none !important; }

  .hex--logo{
    left:auto;
    top:auto;
  }
}