* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #060912;
  --bg-panel-a: #0b1120;
  --bg-panel-b: #070b16;
  --text: #e8e8f0;
  --text-dim: #8898b8;
  --text-soft: #c4cee2;
  --brand: #3880ff;
  --brand-2: #6892e0;
  --brand-3: #9db6e8;
  --metal-light: #c8d6ee;
  --glow: rgba(56, 128, 255, 0.30);
  --hairline: rgba(56, 128, 255, 0.16);
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(ellipse 1100px 800px at 30% 25%, rgba(56, 128, 255, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 1100px 1100px at 78% 80%, rgba(56, 128, 255, 0.08) 0%, transparent 80%),
    var(--bg);
  background-attachment: fixed;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: clip;
}

a { color: var(--brand); }
a:hover { color: #ffffff; }

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 2vh, 1.5rem);
  padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 4vw, 2rem) clamp(1rem, 3vh, 2rem);
}

.hero-brand {
  text-align: center;
  animation: fadeUp 1s ease-out;
}

.hero-brand h1 {
  font-family: 'Space Mono', monospace;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  background: linear-gradient(180deg, #ffffff 0%, #e0eaf8 45%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(56, 128, 255, 0.35));
}

.hero-brand h1 span {
  -webkit-text-fill-color: var(--brand);
  color: var(--brand);
  font-size: 1.1em;
  filter: drop-shadow(0 0 14px rgba(56, 128, 255, 0.75));
}

.brand-bar {
  width: clamp(60px, 8vw, 100px);
  height: 2px;
  margin: 0.7rem auto 0;
  background: linear-gradient(90deg, transparent, var(--brand) 50%, transparent);
  box-shadow: 0 0 8px rgba(56, 128, 255, 0.6);
}

.hero-tagline {
  max-width: 560px;
  text-align: center;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-dim);
  font-weight: 300;
  animation: fadeUp 1s ease-out 0.3s both;
}

.gyro-layout {
  display: grid;
  grid-template-columns: 300px minmax(280px, 420px);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(0.5rem, 2vh, 1.5rem);
  animation: fadeUp 1.2s ease-out 0.6s both;
}

.gyro-stage {
  position: relative;
  width: 300px;
  height: 300px;
  perspective: 1000px;
  overflow: clip;
  overflow-clip-margin: 40px;
  contain: layout paint;
  isolation: isolate;
  justify-self: center;
}

.gyro-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: systemTumble 34s linear infinite;
}

.gyro-orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.gyro-orbit-1 { transform: rotateY(0deg) rotateX(60deg); }
.gyro-orbit-2 { transform: rotateY(60deg) rotateX(60deg); }
.gyro-orbit-3 { transform: rotateY(120deg) rotateX(60deg); }
.gyro-orbit-4 { inset: 14%; transform: rotateX(80deg); }

.gyro-ring {
  position: absolute;
  width: 100%;
  height: 60%;
  top: 20%;
  border-radius: 50%;
  border-style: solid;
  animation: ringSpin 11s linear infinite;
  will-change: transform;
}

.gyro-ring-1 {
  border-width: 4px;
  border-color: var(--brand);
  filter: drop-shadow(0 0 18px rgba(56, 128, 255, 0.7));
}

.gyro-ring-2 {
  border-width: 3px;
  border-color: var(--brand-2);
  filter: drop-shadow(0 0 14px rgba(104, 146, 224, 0.6));
  animation-delay: -4s;
}

.gyro-ring-3 {
  border-width: 3px;
  border-color: var(--brand-3);
  filter: drop-shadow(0 0 12px rgba(157, 182, 232, 0.5));
  animation-delay: -7s;
}

.gyro-ring-4 {
  width: 100%;
  height: 100%;
  top: 0;
  border-width: 2px;
  border-color: rgba(200, 214, 238, 0.4);
  animation-duration: 16s;
  animation-direction: reverse;
}

.gyro-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d4e4ff, var(--brand) 60%, #12305e);
  box-shadow: 0 0 26px rgba(56, 128, 255, 0.9);
  animation: coreBreathe 4s ease-in-out infinite;
  z-index: 2;
}

.service-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
}

.legend-item:hover { background: rgba(56, 128, 255, 0.07); }
.legend-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.legend-item.is-active {
  background: rgba(56, 128, 255, 0.12);
  border-color: rgba(56, 128, 255, 0.45);
}

.legend-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #3a4a6a;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.legend-item.is-active .legend-dot {
  background: var(--brand);
  box-shadow: 0 0 10px rgba(56, 128, 255, 0.7);
}

.legend-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.legend-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.legend-item.is-active .legend-label { color: #ffffff; }

.legend-short {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.4;
  margin-top: 3px;
  color: var(--text-dim);
}

.mobile-service-detail {
  display: none;
}

.service-detail {
  width: min(100%, 740px);
  margin-top: clamp(1rem, 2vh, 1.5rem);
  padding: 20px 24px;
  border-radius: 14px;
  background: rgba(56, 128, 255, 0.07);
  border: 1px solid rgba(56, 128, 255, 0.2);
  animation: fadeUp 1s ease-out 0.9s both;
}

.detail-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.detail-body {
  font-size: 0.95rem;
  color: var(--text-soft);
  font-weight: 300;
  line-height: 1.7;
  margin-top: 10px;
  text-wrap: pretty;
}

.contact {
  text-align: center;
  margin-top: clamp(0.5rem, 1.5vh, 1rem);
  animation: fadeUp 1s ease-out 1s both;
}

.contact a {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  letter-spacing: 0.1em;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: inline-block;
  text-shadow: 0 0 12px rgba(56, 128, 255, 0.25);
  transition: color 0.3s, text-shadow 0.3s;
}

.contact a:hover { text-shadow: 0 0 14px rgba(56, 128, 255, 0.75); }

.site-footer {
  width: min(100%, 980px);
  margin-top: auto;
  padding: clamp(0.6rem, 1.8vh, 1rem) clamp(1rem, 4vw, 2rem) 0;
  text-align: center;
  color: rgba(232, 232, 240, 0.54);
  animation: fadeUp 1s ease-out 1.15s both;
}

.site-footer::before {
  content: '';
  display: block;
  width: min(420px, 72vw);
  height: 1px;
  margin: 0 auto clamp(0.55rem, 1.4vh, 0.85rem);
  background: linear-gradient(90deg, transparent, rgba(56, 128, 255, 0.45) 50%, transparent);
}

.footer-company {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.68rem, 1.1vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 232, 240, 0.78);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.7rem;
  margin-top: 0.35rem;
  font-size: clamp(0.68rem, 1.1vw, 0.78rem);
}

.footer-meta span + span::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 0.7rem;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(56, 128, 255, 0.72);
}

.footer-meta a {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.sr-services {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes systemTumble {
  0% { transform: rotateY(0deg) rotateX(16deg); }
  25% { transform: rotateY(90deg) rotateX(0deg) rotateZ(-6deg); }
  50% { transform: rotateY(180deg) rotateX(-16deg); }
  75% { transform: rotateY(270deg) rotateX(0deg) rotateZ(6deg); }
  100% { transform: rotateY(360deg) rotateX(16deg); }
}

@keyframes ringSpin {
  from { transform: rotateZ(0deg); }
  to { transform: rotateZ(360deg); }
}

@keyframes coreBreathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}

@media (max-width: 720px) {
  .hero {
    padding-inline: 0.75rem;
  }

  .gyro-layout {
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 20px;
  }

  .gyro-stage {
    width: 240px;
    height: 240px;
  }

  .service-legend {
    width: min(100%, 380px);
    gap: 0;
  }

  .mobile-service-detail + .legend-item {
    margin-top: 4px;
  }

  .service-legend .legend-item {
    width: 100%;
  }

  .service-legend .legend-item.is-active {
    border-radius: 10px 10px 0 0;
    border-bottom-color: transparent;
  }

  .mobile-service-detail.is-open {
    display: block;
    padding: 0 14px 14px 35px;
    border: 1px solid rgba(56, 128, 255, 0.45);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: rgba(56, 128, 255, 0.12);
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.65;
    text-wrap: pretty;
  }

  .service-detail {
    display: none;
  }

  .footer-meta {
    flex-direction: column;
    gap: 0.12rem;
  }

  .footer-meta span + span::before {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: auto;
    padding-block: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-brand,
  .hero-tagline,
  .gyro-layout,
  .service-detail,
  .contact,
  .site-footer {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 720px) {
  .gyro-scene,
  .gyro-ring,
  .gyro-core {
    animation-play-state: paused;
  }
}
