:root {
  --bg: #05060d;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #e9eefc;
  --muted: #b8c3e4;
  --accent: #6b7cff;
  --accent-2: #8f5bff;
  --glow: 0 0 40px rgba(107, 124, 255, 0.35);
  --radius: 1.25rem;
}

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

html,
body {
  min-height: 100%;
  background: radial-gradient(circle at 10% 15%, #0b1530 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 1;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 124, 255, 0.24), transparent 65%);
  filter: blur(6px);
  opacity: 0.6;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.cinematic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cinematic-bg::before,
.cinematic-bg::after {
  content: "";
  position: absolute;
  inset: -40% -20% 0;
  background: radial-gradient(circle at 20% 20%, rgba(107, 124, 255, 0.18), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(143, 91, 255, 0.16), transparent 50%);
  filter: blur(30px);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

.cinematic-bg::after {
  inset: -30% 10% 0;
  opacity: 0.65;
  animation-duration: 24s;
}

.light-streak {
  position: absolute;
  width: 45vw;
  height: 140px;
  background: linear-gradient(90deg, transparent, rgba(107, 124, 255, 0.18), transparent);
  filter: blur(8px);
  opacity: 0.4;
  animation: streakMove 16s linear infinite;
}

.light-streak:nth-child(1) {
  top: 10%;
  left: -30%;
  animation-duration: 18s;
}

.light-streak:nth-child(2) {
  top: 45%;
  left: -40%;
  animation-duration: 22s;
  opacity: 0.3;
}

.light-streak:nth-child(3) {
  top: 75%;
  left: -35%;
  animation-duration: 20s;
  opacity: 0.25;
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.preloader {
  position: fixed;
  inset: 0;
  background: #04050b;
  display: grid;
  place-items: center;
  gap: 1rem;
  z-index: 50;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
  box-shadow: var(--glow);
}

.preloader span {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.7rem;
}

.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0 6rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -40% -20% 0;
  background: radial-gradient(circle at 15% 20%, rgba(107, 124, 255, 0.35), transparent 55%),
    radial-gradient(circle at 70% 20%, rgba(143, 91, 255, 0.25), transparent 55%);
  filter: blur(10px);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.hero-title span {
  display: block;
  overflow: hidden;
  transform: translateY(110%);
  opacity: 0;
}

body.is-loaded .hero-title span {
  animation: titleReveal 1.1s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

body.is-loaded .hero-title span:nth-child(2) {
  animation-delay: 0.18s;
}

.role {
  font-size: 1.05rem;
  color: #ced7f0;
  margin-bottom: 1.5rem;
}

.hero-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #d8e1f9;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  text-decoration: none;
  color: var(--text);
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.hover-react {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hover-react::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.hover-react.is-hovered::after {
  opacity: 1;
}

.hover-react.is-hovered {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), 0 0 35px rgba(107, 124, 255, 0.28);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.btn:hover {
  transform: translateY(-3px);
}

.image-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--surface-strong);
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image .image-frame {
  aspect-ratio: 3 / 4;
}

.services {
  padding: 5rem 0 6rem;
}

.section-divider {
  position: relative;
  height: 1px;
  width: min(1100px, 90%);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(107, 124, 255, 0.35), rgba(143, 91, 255, 0.25), transparent);
  overflow: hidden;
}

.section-divider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: shimmer 6s ease-in-out infinite;
}

.section-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--surface-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

.service-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.service-body {
  padding: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.service-body h3 {
  font-size: 1.25rem;
}

.service-value {
  color: #c7d2f3;
  font-size: 0.92rem;
}

.about {
  padding: 5rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.about-copy h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.about-copy p {
  color: #d1daf2;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.work {
  padding: 5rem 0 6rem;
}

.progress {
  padding: 2rem 0 6rem;
}

.progress-card {
  background: var(--surface);
  border: 1px solid var(--surface-strong);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.progress-card h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin: 0.75rem 0 1.5rem;
}

.progress-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--surface-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-rows: auto 1fr;
}

.work-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.work-body {
  padding: 1.5rem;
}

.work-body h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.work-body p {
  color: #d1daf2;
  margin-bottom: 1rem;
}

.work-body ul {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  color: #c5d1f0;
  font-size: 0.95rem;
}

.work-body li::before {
  content: "• ";
  color: var(--accent);
}

.contact {
  padding: 5rem 0 7rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--surface-strong);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.contact-card h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 1rem 0 0.75rem;
}

.contact-text {
  color: #d1daf2;
  margin-bottom: 1.75rem;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ambientDrift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, 2%, 0) scale(1.05);
  }
}

@keyframes streakMove {
  0% {
    transform: translate3d(0, 0, 0) rotate(1deg);
  }
  100% {
    transform: translate3d(160%, 0, 0) rotate(1deg);
  }
}

@keyframes titleReveal {
  0% {
    transform: translateY(110%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .services-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 4rem 0 4.5rem;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .contact-card {
    padding: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .cinematic-bg {
    display: none;
  }

  .cursor-glow {
    display: none;
  }

  html,
  body {
    scroll-behavior: auto;
  }
}
