@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&family=Roboto+Mono:wght@400;700&display=swap');

:root {
  --primary-color: #07070f;
  --accent-color1: #ff00ff;
  --accent-color2: #00ffff;
  --border-color: rgba(255, 255, 255, 0.2);
  --bg-color: rgba(255, 255, 255, 0.07);
  --hover-bg-color: rgba(255, 255, 255, 0.15);
  --text-color: #ffffff;
  --button-shadow: 0px 0px 10px rgba(255, 0, 255, 0.6);
  --font-family-main: 'Montserrat', sans-serif;
  --font-family-code: 'Roboto Mono', monospace;
  --input-focus-color: #ff00ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-family: var(--font-family-main);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  text-align: center;
  cursor: default;
}

body {
  overflow-anchor: auto;
  position: relative;
  background: transparent;
}

html {
  background: var(--primary-color);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 0, 255, 0.18), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(0, 255, 255, 0.18), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
  filter: blur(0);
  animation: auroraFlow 18s ease-in-out infinite alternate;
  will-change: transform, filter;
}

body::after {
  content: '';
  position: fixed;
  inset: -40%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 55%) 0 0 / 320px 320px repeat,
    radial-gradient(circle at 70% 60%, rgba(0, 255, 255, 0.18), transparent 60%) 0 0 / 420px 420px repeat,
    radial-gradient(circle at 30% 80%, rgba(255, 0, 255, 0.12), transparent 65%) 0 0 / 500px 500px repeat;
  opacity: 0.4;
  mix-blend-mode: screen;
  animation: stardustDrift 45s linear infinite;
  will-change: transform;
}

.container {
  max-width: 600px;
  padding: 5px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1.5s ease-out forwards;
  margin: 0 auto;
  will-change: transform, opacity;
  backface-visibility: hidden;
  position: relative;
  z-index: 1;
}

.title {
  font-size: 36px;
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-family-code);
  background: linear-gradient(90deg, var(--accent-color1) 0%, var(--accent-color2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  padding: 10px;
  font-size: 18px;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards 0.5s;
  margin-bottom: 16px;
  will-change: opacity;
}

.features-section {
  margin: 10px;
}

.features-section h2,
.magic-lab h2,
.ritual-section h2,
.tech-section h2 {
  font-family: var(--font-family-code);
  font-size: 24px;
  margin-bottom: 12px;
  word-spacing: -7px;
}

.features {
  margin-top: 20px;
}

.feature {
  font-size: 16px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  backdrop-filter: blur(5px);
  background: var(--bg-color);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition:
    transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.55s ease-out,
    filter 0.75s ease-out;
  cursor: default;
}

.feature.is-spawning {
  opacity: 0;
  transform: translateY(42px);
  filter: blur(18px);
  pointer-events: none;
}

.feature.is-revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .feature {
    transition: none;
  }
  .feature.is-spawning {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
    pointer-events: auto;
  }
}

.magic-lab {
  margin: 60px auto;
  padding: 30px 20px 40px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.12), rgba(0, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(255, 0, 255, 0.14);
}

.magic-lab p {
  max-width: 520px;
  margin: 0 auto 30px;
  font-size: 16px;
  line-height: 1.6;
}

.magic-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.magic-card {
  position: relative;
  padding: 24px 20px;
  border-radius: 16px;
  background: rgba(7, 7, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.magic-card::before {
  content: '';
  position: absolute;
  inset: -120px;
  background: radial-gradient(circle at top left, rgba(255, 0, 255, 0.18), transparent 60%);
  transform: rotate(12deg);
  z-index: 0;
}

.magic-card h3 {
  position: relative;
  z-index: 1;
  font-size: 20px;
  margin-bottom: 12px;
}

.magic-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.6;
}

.magic-card ul {
  position: relative;
  z-index: 1;
  padding-left: 18px;
  margin: 0;
  text-align: left;
}

.magic-card li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.magic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(255, 0, 255, 0.18);
}

.ritual-section {
  margin: 70px auto;
}

.ritual-steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ritual-step {
  position: relative;
  padding: 22px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.1);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  text-align: left;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.7), rgba(0, 255, 255, 0.7));
  font-weight: 700;
  font-family: var(--font-family-code);
  margin-bottom: 12px;
}

.ritual-step h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.ritual-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.ritual-step:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 255, 0.35);
  box-shadow: 0 16px 36px rgba(0, 255, 255, 0.18);
}

.tech-section {
  margin: 70px auto 0;
}

.tech-section p {
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 16px;
  line-height: 1.6;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(26, 12, 43, 0.95), rgba(12, 32, 48, 0.95));
  border: none;
  font-size: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.24),
    0 10px 22px rgba(8, 8, 12, 0.45);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.tech-pill:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.75), rgba(0, 255, 255, 0.7));
  box-shadow: 0 14px 28px rgba(8, 8, 12, 0.55);
}

.contact-form {
  margin: 40px auto 0 auto;
  padding: 20px 10px;
  border-radius: 12px;
  background: var(--bg-color);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  opacity: 0;
  animation: fadeIn 2s ease-out forwards 2s;
  will-change: opacity;
}

.contact-form h2 {
  font-family: var(--font-family-code);
  margin-top: 0;
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-color);
  background: linear-gradient(90deg, var(--accent-color1) 0%, var(--accent-color2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-form input,
.contact-form textarea {
  width: 95%;
  max-width: 500px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  font-size: 16px;
  outline: none;
  transition: 0.3s;
  font-family: var(--font-family-main);
  cursor: text;
}

.contact-subtitle {
  margin: -6px auto 24px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--input-focus-color);
  box-shadow: 0 0 8px var(--input-focus-color);
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.contact-form textarea {
  resize: none;
  height: 100px;
}

.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus,
.contact-form textarea:-webkit-autofill,
.contact-form textarea:-webkit-autofill:hover,
.contact-form textarea:-webkit-autofill:focus {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-color) !important;
  -webkit-text-fill-color: var(--text-color) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-family-main);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-color);
  background: linear-gradient(45deg, var(--accent-color1), var(--accent-color2));
  border-radius: 18px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  outline: none;
}

.button:hover {
  transform: scale(1.1);
  box-shadow: var(--button-shadow);
}

.hidden {
  display: none;
}

.fade-in {
  display: block;
}

.button-feature {
  user-select: none;
  touch-action: manipulation;
  font-size: 16px;
  margin: 8px 0 25px 0;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  backdrop-filter: blur(5px);
  background: var(--bg-color);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
  text-align: center;
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}

.button-feature:hover,
.button-feature:active {
  background: var(--hover-bg-color);
  transform: scale(1.05);
  box-shadow: var(--button-shadow);
}

.button-feature:not(.active):hover,
.button-feature:not(.active):active {
  background: var(--bg-color);
  transform: scale(1);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.button-feature.active {
  background: var(--hover-bg-color);
  transform: scale(1.05);
  box-shadow: var(--button-shadow);
}

.button-feature:focus {
  outline: none;
}

.feature .feature-icon {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  margin-right: 6px;
  display: inline-block;
}

@keyframes auroraFlow {
  0% {
    transform: translate3d(-2%, -2%, 0) scale(1);
    filter: hue-rotate(0deg) saturate(1);
    opacity: 0.75;
  }

  50% {
    transform: translate3d(2%, 3%, 0) scale(1.08);
    filter: hue-rotate(24deg) saturate(1.1);
    opacity: 0.85;
  }

  100% {
    transform: translate3d(-3%, 2%, 0) scale(1.02);
    filter: hue-rotate(-20deg) saturate(1.05);
    opacity: 0.78;
  }
}

@keyframes stardustDrift {
  0% {
    transform: rotate(0deg) translate3d(0, 0, 0) scale(1);
  }

  45% {
    transform: rotate(170deg) translate3d(3%, -3%, 0) scale(1.06);
  }

  75% {
    transform: rotate(270deg) translate3d(5%, -5%, 0) scale(1.09);
  }

  100% {
    transform: rotate(360deg) translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@media (min-width: 769px) {
  .container {
    max-width: 900px;
  }

  .title {
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .feature,
  .contact-form,
  .button-feature {
    backdrop-filter: blur(3px);
    box-shadow: none;
  }

  .magic-card,
  .ritual-step {
    text-align: center;
  }

  .magic-card ul {
    padding-left: 0;
    list-style-position: inside;
  }
}
