:root {
  --bg: #0f0f10;
  --panel: #151515;
  --accent1: #7b3fa1;
  --accent2: #3973d6;
  --text: #ffffff;
  --muted: #cfcfcf;
  --max-width: 1100px;
}

/* Keyframe animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 400px;
    opacity: 1;
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 0;
}

/* HEADER */
.site-header {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.02)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 2px;
}

.logo .sub {
  font-weight: 300;
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* MOBILE NAVIGATION (base styles) */
#nav-toggle {
  display: block;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 150ms ease;
}

#nav-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.nav-list {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 80vw;
  max-width: 320px;
  background: var(--panel);
  flex-direction: column;
  gap: 2rem;
  padding: 5rem 2rem;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  z-index: 9000;
  list-style: none;
  margin: 0;
}

.nav-list.open {
  display: flex;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
}

.nav-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  transition:
    background 150ms ease,
    color 150ms ease;
  display: block;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
}

.nav-list a.active {
  font-weight: 700;
  color: var(--accent1);
}

.nav-list a:hover,
.nav-list a:focus {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.nav-list a:focus-visible {
  box-shadow: 0 0 0 3px rgba(57, 115, 214, 0.12);
}

/* DESKTOP NAV */
@media (min-width: 801px) {
  #nav-toggle {
    display: none;
  }

  .nav-list {
    display: flex;
    position: static;
    height: auto;
    width: auto;
    background: none;
    flex-direction: row;
    gap: 1rem;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list a {
    padding: 0;
    border-radius: 0;
  }

  .nav-list a:hover,
  .nav-list a:focus {
    background: rgba(255, 255, 255, 0.04);
  }
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
  animation: fadeIn 600ms ease-out;
}

.hero-inner {
  z-index: 2;
}

.hero-inner h1 {
  font-size: 2rem;
  margin: 0 0 1rem 0;
}

.hero-inner p {
  font-size: 1.1rem;
  margin: 0 0 1.5rem 0;
}

.hero-decor {
  position: absolute;
  right: -10%;
  top: 0;
  bottom: 0;
  width: 55%;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  opacity: 0.12;
  transform: skewX(-18deg);
  animation: fadeIn 800ms ease-out 200ms backwards;
}

/* HEADINGS */
h1 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

.lead {
  color: var(--muted);
  max-width: 60ch;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
  border: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(123, 63, 161, 0.3);
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(57, 115, 214, 0.12);
}

.btn-cta {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

/* SECTIONS */
.services,
.about,
.testimonials,
.cta,
.site-map {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.services h2,
.about h2,
.testimonials h2,
.cta h2,
.site-map h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

.services ul {
  list-style: disc;
  margin-left: 1.4rem;
  color: var(--muted);
}

.testimonials blockquote {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--accent1);
  border-radius: 4px;
}

.testimonials cite {
  display: block;
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--muted);
}

.site-map ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-map li {
  margin-bottom: 0.5rem;
}

.site-map a {
  color: var(--accent2);
  text-decoration: none;
}

.site-map a:hover,
.site-map a:focus {
  text-decoration: underline;
}

/* GALLERY */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  background: linear-gradient(
    135deg,
    rgba(123, 63, 161, 0.2),
    rgba(57, 115, 214, 0.2)
  );
  object-fit: cover;
  border-radius: 8px;
  transition:
    transform 300ms ease,
    box-shadow 300ms ease;
}

.gallery-grid img:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.gallery-grid figure {
  margin: 0;
  animation: fadeIn 500ms ease-out;
}

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 600px;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  transition:
    border-color 200ms ease,
    background 200ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(57, 115, 214, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

/* FOOTER */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1rem 0;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

/* RESPONSIVE HERO */
@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1fr 420px;
    padding: 3.5rem 0;
  }
  h1 {
    font-size: 2.4rem;
  }
}

/* RESPONSIVE ENHANCEMENTS */
@media (min-width: 601px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }

  .hero-inner h1 {
    font-size: 2.5rem;
  }

  .hero-inner p {
    font-size: 1.2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (min-width: 801px) {
  .container {
    padding: 2rem 0;
  }

  .hero {
    padding: 4rem 0;
  }

  .services,
  .about,
  .testimonials,
  .cta {
    padding: 3rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* FOCUS MANAGEMENT */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent1);
  color: var(--text);
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}
