:root {
  --bg: #0b0617;
  --bg-muted: #1b1033;
  --brand: #7b5bff;
  --brand-bright: #b09aff;
  --accent: #ffd86f;
  --text: #f2edff;
  --text-muted: #c6bbe6;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.2);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  background: radial-gradient(circle at 10% 20%, #1a0844, #05030f 60%);
  color: var(--text);
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', 'Space Grotesk', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

a {
  color: var(--brand-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--brand-bright);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5vw;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 3, 15, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.mobile-break {
  display: none;
}

.sigil {
  width: 64px;
  height: 64px;
  border-radius: 20% 80% 40% 60% / 50% 30% 70% 50%;
  background: conic-gradient(from 120deg, #b09aff, #5932d6, #251447, #b09aff);
  box-shadow: 0 20px 45px rgba(8, 5, 18, 0.6), inset 0 0 30px rgba(255, 255, 255, 0.25);
  display: inline-flex;
  position: relative;
}

.sigil::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.25);
  mix-blend-mode: screen;
}

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  font-weight: 500;
  color: var(--text-muted);
}

.ai-pill,
button,
.btn {
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.ai-pill {
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border);
}

main {
  padding: 4rem 5vw 5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

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

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0 0 1rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.btn {
  background: var(--brand);
  color: #fff;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease;
  text-align: center;
}

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

.btn.ghost {
  background: transparent;
  border: 1px solid var(--brand-bright);
  color: var(--brand-bright);
}

.hero-stats {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--text-muted);
}

.hero-media figure {
  margin: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
}

.hero-media img {
  width: 100%;
  display: block;
}

.brand-glyph {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  background: radial-gradient(circle at 20% 20%, rgba(176, 154, 255, 0.35), rgba(9, 5, 24, 0.8));
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.brand-glyph span {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--brand-bright);
}

.brand-glyph::before,
.brand-glyph::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(0);
}

.brand-glyph::before {
  width: 220px;
  height: 220px;
  top: -100px;
  right: -80px;
}

.brand-glyph::after {
  width: 140px;
  height: 140px;
  bottom: -70px;
  left: -40px;
  background: rgba(123, 91, 255, 0.3);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

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

.service-grid article,
.projects .slide,
.media-panels article,
.about,
.contact form,
.threads-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
}

.service-grid article h3 {
  margin-top: 0;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.carousel {
  position: relative;
  overflow: hidden;
  padding-top: 3.5rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  border-radius: 1rem;
}

.carousel-control {
  position: absolute;
  top: 1rem;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 6, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(9, 5, 19, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  z-index: 2;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background: var(--accent);
  color: #0b0617;
  transform: translateY(-2px);
}

.carousel-control:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.carousel-control.prev { left: 1rem; }
.carousel-control.next { right: 1rem; }

.insights .media-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.threads-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text);
}

.soundcloud-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.blog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.fact-list {
  padding-left: 1.5rem;
  line-height: 1.8;
}

.fact-list li {
  margin-bottom: 1rem;
}

.blog-hero {
  width: 100%;
  border-radius: 1rem;
  margin: 1.5rem 0;
}

.blog-meta {
  color: var(--text-muted);
}

.references {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.references h2 {
  margin-top: 0;
  font-size: 1rem;
}

.ai-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
  scroll-margin-top: 120px;
}

#services,
#projects {
  scroll-margin-top: 120px;
}

.about-media img {
  width: 100%;
  border-radius: 1.25rem;
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.contact-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-address {
  font-style: normal;
  margin-top: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 5vw;
  text-align: center;
  background: rgba(5, 3, 15, 0.9);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 15, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #140b27;
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--border);
  width: min(95vw, 760px);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.text-link {
  color: var(--brand-bright);
  font-weight: 600;
}

@media (max-width: 768px) {
  nav {
    justify-content: flex-end;
  }

  .hero-stats {
    flex-direction: column;
  }

  .carousel-control {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .logo-wrap strong {
    display: inline-block;
    max-width: 220px;
  }

  .mobile-break {
    display: block;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem 1rem;
  }

  main {
    padding: 2.5rem 1.25rem 3rem;
    gap: 3rem;
  }

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

  .hero-cta {
    flex-direction: column;
  }

  .hero-stats {
    gap: 0.75rem;
  }

  .hero-media figure,
  .hero-media img,
  .about-media img,
  .projects .slide img {
    border-radius: 0.85rem;
  }

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

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

  .media-panels {
    grid-template-columns: 1fr;
  }

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

  .modal-content {
    width: 95vw;
    padding: 1.5rem;
    max-height: 85vh;
  }
}

html.force-mobile body {
  font-size: 15px;
}

html.force-mobile .site-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

html.force-mobile .logo-wrap strong {
  display: inline-block;
  max-width: 220px;
}

html.force-mobile .mobile-break {
  display: block;
}

html.force-mobile nav {
  width: 100%;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem 1rem;
}

html.force-mobile main {
  padding: 2.5rem 1.25rem 3rem;
  gap: 3rem;
}

html.force-mobile .hero {
  grid-template-columns: 1fr;
}

html.force-mobile .hero-cta {
  flex-direction: column;
}

html.force-mobile .hero-stats {
  gap: 0.75rem;
}

html.force-mobile .hero-media figure,
html.force-mobile .hero-media img,
html.force-mobile .about-media img,
html.force-mobile .projects .slide img {
  border-radius: 0.85rem;
}

html.force-mobile .service-grid {
  grid-template-columns: 1fr;
}

html.force-mobile .slide {
  grid-template-columns: 1fr;
}

html.force-mobile .media-panels {
  grid-template-columns: 1fr;
}

html.force-mobile .contact {
  grid-template-columns: 1fr;
}

html.force-mobile .modal-content {
  width: 95vw;
  padding: 1.5rem;
  max-height: 85vh;
}
