:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-alt: #101214;
  --surface: #15181b;
  --text: #f4f6f8;
  --muted: #a8b0b7;
  --accent: #ff3b2f;
  --accent-soft: rgba(255, 59, 47, 0.18);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.6);
  --radius: 18px;
  --max: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

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

img {
  max-width: 100%;
  display: block;
  height: auto;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding: 0 1rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1.5rem;
  top: 1.5rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  z-index: 10;
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(15, 15, 15, 0.95) 100%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1.5rem;
  max-width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.logo img {
  height: 60px;
  width: 60px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 16px;
  filter: drop-shadow(0 4px 8px rgba(255, 59, 47, 0.25));
  transition: filter 0.3s ease;
}

.logo img:hover {
  filter: drop-shadow(0 6px 12px rgba(255, 59, 47, 0.4));
}

.logo-text {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #f4f6f8, #ff3b2f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.3s ease;
}

.logo:hover .logo-text {
  opacity: 0.8;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.primary-nav {
  position: relative;
}

.nav-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
}

.nav-menu {
  list-style: none;
  position: absolute;
  right: 0;
  top: 3.25rem;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0.75rem;
  display: none;
  min-width: 12rem;
  box-shadow: var(--shadow);
}

.nav-menu a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--text);
  background: rgba(255, 59, 47, 0.08);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
  width: calc(100% - 1.5rem);
}

.nav-menu.open {
  display: grid;
  gap: 0.25rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem 5rem;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
}

/* Staggered fade-out effect */
.hero-video.is-fading-out {
  animation: fadeOutVideo 0.4s ease-out forwards;
}

/* Staggered fade-in effect with scale */
.hero-video.is-fading-in {
  opacity: 0;
  animation: fadeInVideo 0.5s ease-out forwards;
}

/* Subtle scale animation during fade-in */
.hero-video.is-scaling-in {
  animation: scaleInSubtle 0.5s ease-out forwards;
}

/* Loading indicator during transition */
.hero-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-loading.active {
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.75), rgba(10, 10, 10, 0.6));
}

/* Loading pulse animation */
.hero-loading.active::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #ff3b2f;
  border-radius: 50%;
  animation: pulseLoad 1.2s ease-in-out infinite;
}

@keyframes fadeOutVideo {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.15;
  }
}

@keyframes fadeInVideo {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleInSubtle {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseLoad {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 47, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 59, 47, 0);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.65), rgba(10, 10, 10, 0.5));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 700px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-content .eyebrow {
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-weight: 700;
}

.hero-content .lead {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn.primary {
  background: var(--accent);
  color: #000;
}

.btn.primary:hover {
  background: #ff2817;
  transform: translateY(-2px);
}

.btn.ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hero-stats strong {
  font-size: 1.4rem;
  color: var(--text);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 3rem 1.5rem 6rem;
  scroll-margin-top: 100px;
}

.section.alt {
  background: var(--bg-alt);
}

.section-header {
  margin-bottom: 2rem;
  max-width: 700px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 0.8rem;
  color: var(--text);
  font-weight: 700;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Services */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(4, 1fr);
}

.service-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.service-card h3 {
  margin-bottom: 0.6rem;
  color: var(--text);
  font-size: 1.1rem;
}

.service-card p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.service-card ul {
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.service-card li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.service-card li::before {
  content: "•";
  position: absolute;
  left: 0.3rem;
  color: var(--accent);
  font-weight: 700;
}

/* Builds / Gallery */
.filter-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.tag {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Video Carousel */
.video-carousel {
  position: relative;
  margin-bottom: 4rem;
  background: #000;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.carousel-viewport {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  padding-bottom: 56.25%;
}

.carousel-slides {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.slide-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-slide figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.5));
  color: var(--text);
}

.carousel-slide h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.carousel-slide p {
  color: var(--muted);
  font-size: 0.9rem;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 59, 47, 0.85);
  border: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-prev {
  left: 1.5rem;
}

.carousel-next {
  right: 1.5rem;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.carousel-counter {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(10, 10, 10, 0.8);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
  z-index: 10;
  backdrop-filter: blur(10px);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.gallery-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.gallery-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.gallery-card img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  height: auto;
}

.gallery-card figcaption {
  padding: 1.5rem;
}

.gallery-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.gallery-card p {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Partners */
.partner-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.partner-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
}

.partner-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.partner-logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.partner-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Instagram */
.instagram-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.note {
  color: var(--muted);
  font-size: 0.85rem;
}

.instagram-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
  max-width: 100%;
}

/* Responsive grid: 3 cols on desktop, 2 on tablet, 1 on mobile */
@media (max-width: 1024px) {
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 640px) {
  /* Fix video cropping on mobile - show full frame */
  .hero-video {
    object-fit: contain;
    background: #000;
  }

  /* Optimize hero section spacing */
  .hero {
    padding: 5rem 1.25rem 4rem;
    min-height: 80vh;
  }

  /* Better section spacing on mobile */
  .section {
    padding: 2.5rem 1.25rem 4rem;
  }

  .section-header {
    margin-bottom: 1.75rem;
  }

  /* Improve readability */
  .section-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }

  .eyebrow {
    font-size: 0.8125rem;
  }

  /* Ensure comfortable touch targets */
  .btn {
    min-height: 44px;
    padding: 0.875rem 1.5rem;
  }

  /* Grid layouts */
  .instagram-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Optimize navigation menu spacing on mobile */
  .nav-menu.open {
    padding: 1rem;
  }

  .nav-menu a {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
}

.instagram-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-height: 100%;
}

.instagram-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Instagram embed sizing - force it to respect container */
.instagram-card .instagram-media {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.instagram-card blockquote.instagram-media {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  /* Crop to show approximately 75% of embed - hides like/comment buttons */
  clip-path: inset(0 0 25% 0);
}

/* Force Instagram iframe to fit */
.instagram-card iframe {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/* Instagram embed fade-in animation */
.instagram-card {
  animation: fadeInUp 0.6s ease-out;
}

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

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

.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.contact-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.contact-card p {
  margin-bottom: 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.contact-card a {
  color: var(--accent);
  font-weight: 500;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 59, 47, 0.1);
}

.form-note {
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 0.5rem;
}

.form-status {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  text-align: left;
  min-height: auto;
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  background: rgba(255, 59, 47, 0.08);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  animation: slideInUp 0.3s ease-out;
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.form-status:hover {
  background: rgba(255, 59, 47, 0.15);
  box-shadow: 0 4px 12px rgba(255, 59, 47, 0.15);
}

.form-status a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.form-status a:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.form-status small {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  margin-top: 0.5rem;
  opacity: 0.9;
}

/* Footer */
.site-footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--muted);
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive */
@media (min-width: 720px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    gap: 1.5rem;
    background: transparent;
    border: none;
    padding: 0;
    min-width: auto;
    box-shadow: none;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 3rem 2rem 6rem;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .carousel-prev,
  .carousel-next {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
  }

  .carousel-prev {
    left: 0.75rem;
  }

  .carousel-next {
    right: 0.75rem;
  }

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