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

::selection {
  background: rgba(255, 255, 255, 0.3);
}

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

body {
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main {
  position: relative;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0a0a0a;
}

.bg-video__container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
}

.bg-video__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transform: scale(1.2);
}

.bg-video__player {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2s ease;
}

.bg-video__player--active {
  opacity: 1;
}

.bg-video__player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transform: scale(1.2);
}

.bg-takeover {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.bg-takeover--active {
  opacity: 0.45;
}

.bg-takeover__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.15s ease;
}

.bg-takeover__img--a {
  opacity: 1;
}

.bg-takeover__img--b {
  opacity: 0;
}

.bg-takeover__flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.06s ease;
}

.bg-video__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.4);
  mix-blend-mode: multiply;
}

.mask-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  -webkit-mask-image: radial-gradient(circle 280px at 50% 50%, transparent 0%, rgba(0,0,0,0.5) 40%, black 100%);
  mask-image: radial-gradient(circle 280px at 50% 50%, transparent 0%, rgba(0,0,0,0.5) 40%, black 100%);
}


.content-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  width: 100%;
  height: 100%;
  padding: 0 24px;
  color: white;
  mix-blend-mode: difference;
}

.logo-wrap {
  position: absolute;
  top: 48px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  opacity: 0;
  transform: translateY(-20px);
}

.logo {
  height: 50px;
  color: white;
  fill: currentColor;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero__title {
  font-family: 'Google Sans Code', monospace;
  line-height: 1.25;
  text-transform: lowercase;
  font-size: 60px;
  text-align: center;
  letter-spacing: -2px;
  max-width: 1100px;
  text-wrap: balance;
  font-weight: 400;
  opacity: 0;
  transform: scale(0.95);
}

.services {
  margin-top: 64px;
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: center;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(20px);
}

.services__dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  opacity: 0.4;
  margin-bottom: 2px;
}

.service-item {
  position: relative;
  display: flex;
  align-items: center;
  cursor: crosshair;
  padding: 8px 0;
}

.service-item__icon {
  display: flex;
  align-items: center;
  color: white;
  margin-right: 8px;
  overflow: hidden;
  opacity: 0;
  width: 0;
  transform: scale(0.5) translateX(-10px);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-item:hover .service-item__icon {
  opacity: 1;
  width: 24px;
  transform: scale(1) translateX(0);
}

.service-item__title {
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.9);
}

.service-item:hover .service-item__title {
  color: white;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.status-bar {
  position: absolute;
  bottom: 48px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  font-family: 'Courier New', Courier, monospace;
}

.status-bar__left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  opacity: 0.5;
}

.status-bar__status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-bar__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-bar__right {
  text-align: right;
  opacity: 0.5;
}

.cta-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.cta-wrap {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: 100%;
  opacity: 0;
}

.cta-button {
  pointer-events: auto;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 24px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.cta-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.cta-button__label {
  background: rgba(255, 255, 255, 0.1);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-right: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.cta-button__label--mobile {
  display: none;
}

.scramble-text {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 10;
}

.terminal-popup {
  position: fixed;
  width: 360px;
  height: 220px;
  background: rgba(13, 17, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.88) translateY(8px);
  transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 35;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
              0 0 1px rgba(255, 255, 255, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.terminal-popup--visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.terminal-popup__header {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
}

.terminal-popup__dots {
  display: flex;
  gap: 6px;
}

.terminal-popup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-popup__dot--red { background: #ff5f57; }
.terminal-popup__dot--yellow { background: #febc2e; }
.terminal-popup__dot--green { background: #28c840; }

.terminal-popup__title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 6px;
  letter-spacing: 0.03em;
}

.terminal-popup__body {
  padding: 12px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  height: calc(100% - 38px);
  overflow: hidden;
  white-space: pre;
}

.terminal-popup__body .t-cmd {
  color: #7ee787;
}

.terminal-popup__body .t-comment {
  color: rgba(255, 255, 255, 0.3);
}

.terminal-popup__body .t-keyword {
  color: #ff7b72;
}

.terminal-popup__body .t-string {
  color: #a5d6ff;
}

.terminal-popup__body .t-func {
  color: #d2a8ff;
}

.terminal-popup__body .t-number {
  color: #79c0ff;
}

.terminal-popup__body .t-dim {
  color: rgba(255, 255, 255, 0.4);
}

.terminal-popup__cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: rgba(255, 255, 255, 0.7);
  animation: blink-cursor 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 1px;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-popup__scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  border-radius: 10px;
}

.cursor-circle {
  position: fixed;
  top: 0;
  left: 0;
  width: 504px;
  height: 504px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  mix-blend-mode: overlay;
  transform: translate(-50%, -50%);
  display: block;
}

@media (max-width: 1023px) {
  .hero__title {
    font-size: 48px;
  }

  .services {
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  .mask-overlay {
    background: rgba(0, 0, 0, 0.6);
  }
  
  .logo-wrap {
    top: 32px;
  }

  .logo {
    height: 32px;
  }

  .hero {
    margin-top: 40px;
  }

  .hero__title {
    font-size: 28px;
    letter-spacing: -1px;
  }

  .services {
    flex-direction: column;
    gap: 8px;
    margin-top: 40px;
    font-size: 12px;
  }

  .services__dot {
    display: none;
  }

  .status-bar {
    bottom: 32px;
    padding: 0 24px;
    font-size: 10px;
  }

  .cta-wrap {
    bottom: 96px;
  }

  .cta-button {
    padding: 8px 8px 8px 8px;
    padding-right: 24px;
  }

  .cta-button__label--desktop {
    display: none;
  }

  .cta-button__label--mobile {
    display: inline;
    background: none;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 12px;
    margin-left: 12px;
    padding: 0;
    color: rgba(255, 255, 255, 0.6);
  }

  .cursor-circle {
    display: none;
  }

  .terminal-popup {
    display: none;
  }
}
