/* ============================================
   Pureline Services — Custom Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --brand-dark: hsl(220, 12%, 9%);
  --brand-darker: hsl(220, 14%, 6%);
  --brand-border: hsl(220, 10%, 18%);
  --brand-light: #EDEDED;
  --brand-muted: hsl(215, 10%, 45%);
  --brand-silver: hsl(215, 8%, 62%);
}

/* --- Lenis --- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

/* --- Base --- */
::selection {
  background: hsla(215, 8%, 62%, 0.2);
  color: var(--brand-light);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--brand-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-muted);
}

/* --- Grain Overlay --- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.028;
  mix-blend-mode: overlay;
}

/* --- Hero Headline --- */
.hero-headline {
  font-size: clamp(3.2rem, 12vw, 9.5rem);
}

/* --- Navbar --- */
.nav-scrolled {
  background: hsla(220, 12%, 9%, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid hsla(220, 10%, 18%, 0.25);
}

/* --- Mobile Menu --- */
.menu-open .menu-line:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-open .menu-line:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* --- Service Item Expand --- */
.service-item:hover .service-desc,
.service-item.active .service-desc {
  grid-template-rows: 1fr;
}

/* --- Space Card --- */
.space-card img {
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.space-card:hover img {
  transform: scale(1.05);
}

/* --- Process Timeline Line --- */
.process-line {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--brand-border);
}

/* --- Focus States --- */
a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--brand-silver);
  outline-offset: 4px;
}

/* --- Soft Glow Utilities --- */
.glow-top {
  background: radial-gradient(
    ellipse 60% 40% at 50% 0%,
    hsla(210, 30%, 40%, 0.04) 0%,
    transparent 100%
  );
}

.glow-center {
  background: radial-gradient(
    circle at 50% 50%,
    hsla(210, 40%, 50%, 0.03) 0%,
    transparent 70%
  );
}

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

  .space-card img {
    transition: none;
  }

  .space-card:hover img {
    transform: none;
  }
}

/* --- Utility --- */
.text-balance {
  text-wrap: balance;
}
