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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-inter);
  background: var(--color-void-black);
  color: var(--color-snow);
  overflow-x: hidden;
  line-height: var(--leading-body);
}

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

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

input, button {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

.container {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-24);
}

/* ================================================
   NAVIGATION
   ================================================ */

.nav {
  position: fixed;
  top: var(--spacing-16);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - var(--spacing-32));
  max-width: 800px;
  transition: background 0.3s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 8, 10, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg-2);
  padding: var(--spacing-8) var(--spacing-16);
  box-shadow: var(--shadow-xl);
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 24px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: var(--spacing-24);
}

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-slate-200);
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--color-snow);
}

.nav__cta {
  font-size: 13px;
  font-weight: 500;
  background: var(--color-ash-50);
  color: #2f3031;
  padding: 6px 14px;
  border-radius: var(--radius-buttons);
  transition: opacity 0.2s ease;
}

.nav__cta:hover {
  opacity: 0.9;
}

.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
}

.nav__mobile-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-slate-200);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ================================================
   HERO
   ================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  background: var(--gradient-nebula-glow);
  z-index: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: var(--spacing-120) var(--spacing-24) var(--spacing-80);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  background: var(--color-graphite-600);
  border-radius: var(--radius-badges);
  padding: 4px 12px;
  margin-bottom: var(--spacing-32);
  font-family: var(--font-geistmono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-slate-200);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full-3);
  background: var(--color-mint-signal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(36px, 7vw, var(--text-display));
  font-weight: 600;
  line-height: var(--leading-display);
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-24);
}

.hero__title-accent {
  background: linear-gradient(135deg, var(--color-snow) 0%, var(--color-slate-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: var(--text-subheading);
  color: var(--color-slate-200);
  line-height: var(--leading-subheading);
  letter-spacing: var(--tracking-subheading);
  margin-bottom: var(--spacing-40);
}

.hero__actions {
  display: flex;
  gap: var(--spacing-16);
  justify-content: center;
  margin-bottom: var(--spacing-48);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-buttons);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn--primary {
  background: var(--color-ash-50);
  color: #2f3031;
}

.btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-slate-200);
  border: 1px solid var(--color-graphite-400);
}

.btn--ghost:hover {
  color: var(--color-snow);
  border-color: var(--color-slate-300);
}

.hero__terminal-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-geistmono);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-slate-300);
  letter-spacing: 0.02em;
}

.hero__prompt {
  color: var(--color-mint-signal);
}

.hero__typing {
  color: var(--color-slate-200);
}

.hero__cursor {
  color: var(--color-mint-signal);
  animation: blink 1s step-end infinite;
}

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

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--spacing-32);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-8);
  font-family: var(--font-geistmono);
  font-size: 10px;
  font-weight: 300;
  color: var(--color-slate-300);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-slate-300), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ================================================
   SECTIONS
   ================================================ */

.section {
  position: relative;
  padding: var(--spacing-120) 0;
}

.section__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.section__atmosphere--blue {
  background: var(--gradient-nebula-glow);
  opacity: 0.6;
}

.section__atmosphere--violet {
  background: var(--gradient-violet-haze);
  opacity: 0.6;
}

.section__header {
  text-align: center;
  margin-bottom: var(--spacing-64);
  position: relative;
  z-index: 1;
}

.section__label {
  display: block;
  font-family: var(--font-geistmono);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-ember-red);
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-16);
}

.section__title {
  font-size: clamp(28px, 5vw, var(--text-heading));
  font-weight: 600;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin-bottom: var(--spacing-16);
}

.section__desc {
  font-size: var(--text-body);
  color: var(--color-slate-200);
  line-height: var(--leading-body);
  max-width: 500px;
  margin: 0 auto;
}

/* ================================================
   SERVICES GRID
   ================================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--element-gap);
  position: relative;
  z-index: 1;
}

.service-card {
  display: block;
  background: rgba(7, 8, 10, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-2xl);
  padding: var(--card-padding);
  transition: border-color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.service-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-slate-300);
  margin-bottom: var(--spacing-16);
}

.service-card__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing-8);
  letter-spacing: -0.01em;
}

.service-card__desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-slate-300);
  line-height: 1.6;
  margin-bottom: var(--spacing-16);
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-geistmono);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-slate-200);
  background: var(--color-graphite-600);
  border-radius: var(--radius-badges);
  padding: 2px 8px;
  letter-spacing: 0.04em;
}

/* ================================================
   ABOUT
   ================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-64);
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-content .section__label {
  text-align: left;
}

.about-content .section__title {
  text-align: left;
  margin-bottom: var(--spacing-24);
}

.about-text {
  font-size: var(--text-body);
  color: var(--color-slate-200);
  line-height: var(--leading-body);
  margin-bottom: var(--spacing-16);
}

.about-stats {
  display: flex;
  gap: var(--spacing-32);
  margin-top: var(--spacing-32);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat__number {
  font-family: var(--font-geistmono);
  font-size: 24px;
  font-weight: 500;
  color: var(--color-snow);
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 12px;
  color: var(--color-slate-300);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ================================================
   TERMINAL WINDOW
   ================================================ */

.terminal-window {
  background: var(--color-deep-charcoal);
  border-radius: var(--radius-lg-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.terminal-window__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--color-graphite-700);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.terminal-window__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full-3);
}

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

.terminal-window__title {
  flex: 1;
  text-align: center;
  font-family: var(--font-geistmono);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-slate-300);
  letter-spacing: 0.02em;
  margin-right: 30px;
}

.terminal-window__body {
  padding: var(--spacing-16);
  font-family: var(--font-geistmono);
  font-size: 13px;
  line-height: 1.7;
  min-height: 200px;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-all;
}

.t-prompt {
  color: var(--color-mint-signal);
  margin-right: 8px;
}

.t-cmd {
  color: var(--color-snow);
}

.t-output {
  color: var(--color-slate-300);
}

.t-success {
  color: var(--color-mint-signal);
}

.t-value {
  color: var(--color-slate-200);
}

.t-mint {
  color: var(--color-mint-signal);
}

.t-cursor {
  color: var(--color-mint-signal);
  animation: blink 1s step-end infinite;
}

.t-error {
  color: var(--color-ember-red);
}

.t-info {
  color: var(--color-sky-signal);
}

/* ================================================
   CONTACT TERMINAL
   ================================================ */

.contact-terminal {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.terminal-window--large .terminal-window__body {
  min-height: 350px;
  max-height: 450px;
  overflow-y: auto;
  scrollbar-width: none;
}

.terminal-window--large .terminal-window__body::-webkit-scrollbar {
  display: none;
}

.terminal-window__body--contact .terminal-line {
  margin-bottom: 2px;
}

.terminal-input-line {
  display: flex;
  align-items: center;
}

.terminal-input {
  flex: 1;
  font-family: var(--font-geistmono);
  font-size: 13px;
  color: var(--color-snow);
  background: transparent;
  caret-color: transparent;
  letter-spacing: 0.02em;
  padding: 0;
  margin-right: 0;
}

.terminal-input:focus {
  outline: none;
}

.terminal-choice-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.terminal-choices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.terminal-choice-btn {
  font-family: var(--font-geistmono);
  font-size: 12px;
  color: var(--color-sky-signal);
  background: rgba(86, 194, 255, 0.08);
  border: 1px solid rgba(86, 194, 255, 0.2);
  border-radius: var(--radius-badges);
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.terminal-choice-btn:hover {
  background: rgba(86, 194, 255, 0.15);
  border-color: rgba(86, 194, 255, 0.4);
}

.terminal-choice-btn--game {
  color: var(--color-mint-signal);
  background: rgba(89, 212, 153, 0.08);
  border-color: rgba(89, 212, 153, 0.2);
}

.terminal-choice-btn--game:hover {
  background: rgba(89, 212, 153, 0.15);
  border-color: rgba(89, 212, 153, 0.4);
}

.si-ctrl-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 8, 10, 0.8);
  color: var(--color-snow);
  font-size: 20px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}

.si-ctrl-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

/* ================================================
   PROCESS
   ================================================ */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-24);
  position: relative;
  z-index: 1;
}

.process-step {
  position: relative;
  padding: var(--card-padding);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-2xl);
  background: rgba(7, 8, 10, 0.4);
  transition: border-color 0.3s ease;
}

.process-step:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.process-step__number {
  font-family: var(--font-geistmono);
  font-size: 32px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.08);
  margin-bottom: var(--spacing-16);
}

.process-step__connector {
  position: absolute;
  top: 42px;
  right: -13px;
  width: 24px;
  height: 1px;
  background: var(--color-graphite-500);
}

.process-step:last-child .process-step__connector {
  display: none;
}

.process-step__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-8);
}

.process-step__desc {
  font-size: 13px;
  color: var(--color-slate-300);
  line-height: 1.6;
}

/* ================================================
   FAQ
   ================================================ */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-24) 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-snow);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-family: var(--font-geistmono);
  font-size: 18px;
  color: var(--color-slate-300);
  flex-shrink: 0;
  margin-left: var(--spacing-16);
  transition: transform 0.2s ease;
}

details[open] .faq-question::after {
  content: '−';
}

.faq-question:hover {
  color: var(--color-slate-200);
}

.faq-answer {
  padding: 0 0 var(--spacing-24) 0;
}

.faq-answer p {
  font-size: 15px;
  color: var(--color-slate-200);
  line-height: 1.7;
}

/* ================================================
   FOOTER
   ================================================ */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: var(--spacing-32) 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-16);
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
}

.footer__logo-img {
  height: 20px;
  width: auto;
}

.footer__tagline {
  font-size: 12px;
  color: var(--color-slate-300);
  padding-left: var(--spacing-8);
  border-left: 1px solid var(--color-graphite-500);
}

.footer__links {
  display: flex;
  gap: var(--spacing-24);
}

.footer__links a {
  font-size: 13px;
  color: var(--color-slate-300);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--color-snow);
}

.footer__contact {
  font-size: 12px;
  color: var(--color-slate-300);
  display: flex;
  gap: var(--spacing-16);
}

.footer__contact a {
  color: var(--color-slate-200);
  transition: color 0.2s ease;
}

.footer__contact a:hover {
  color: var(--color-snow);
}

.footer__copy {
  font-size: 12px;
  color: var(--color-slate-300);
}

/* ================================================
   SCROLL REVEAL
   ================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-40);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-step__connector {
    display: none;
  }

  .hero__sub br {
    display: none;
  }
}

@media (max-width: 680px) {
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__mobile-toggle {
    display: flex;
  }

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

  .nav.nav--open .nav__links {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(7, 8, 10, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg-2);
    padding: var(--spacing-16);
    gap: var(--spacing-16);
  }

  .nav.nav--open .nav__cta {
    display: inline-flex;
    position: absolute;
    top: calc(100% + 8px + 180px);
    left: var(--spacing-16);
    right: var(--spacing-16);
    justify-content: center;
  }

  .hero__title {
    font-size: clamp(28px, 8vw, 48px);
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

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

  .footer__inner {
    flex-direction: column;
    gap: var(--spacing-16);
    text-align: center;
  }

  .footer__links {
    gap: var(--spacing-16);
  }

  .about-stats {
    gap: var(--spacing-24);
  }

  .stat__number {
    font-size: 20px;
  }
}
