/* Design Sinful — 100% IBM Plex Typography Sitewide & Clean Light-Theme Glassmorphism */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg-main: #f9f9f8;
  --bg-surface: #ffffff;
  --text-main: #141416;
  --text-muted: #66666e;
  --border-subtle: rgba(20, 20, 22, 0.08);
}

/* Enforce IBM Plex Sitewide */
*, *::before, *::after {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Lenis Momentum Smooth Scrolling */
html.lenis, html.lenis body {
  height: auto;
}

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

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f9f9f8;
  color: #141416;
  font-family: 'IBM Plex Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'IBM Plex Sans', sans-serif;
  letter-spacing: -0.02em;
}

.font-mono,
code,
kbd,
samp {
  font-family: 'IBM Plex Mono', monospace !important;
  font-variant-numeric: tabular-nums;
}

/* Floating Centered Glass Navigation Box */
.glass-nav-box {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(20, 20, 22, 0.1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.glass-nav {
  background: rgba(249, 249, 248, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(20, 20, 22, 0.07);
}

.glass-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.glass-card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.glass-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -12px rgba(20, 20, 22, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
  border-color: rgba(20, 20, 22, 0.16);
}

.hairline-divider {
  width: 100%;
  height: 1px;
  background-color: rgba(20, 20, 22, 0.08);
}

.glass-panel-warm {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 244, 240, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px -15px rgba(0, 0, 0, 0.05);
}

.glass-input {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(20, 20, 22, 0.12);
  color: #141416;
  font-family: 'IBM Plex Sans', sans-serif;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-input:focus {
  background: #ffffff;
  border-color: #141416;
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 20, 22, 0.06);
}

/* Background Cross-Fade Cycler */
.cycle-media-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.02);
  pointer-events: none;
}

.cycle-media-item.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* Auto-Moving Square Images Marquee with No Gaps */
@keyframes squareMarquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.square-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  background: #141416;
  margin: 0;
  padding: 0;
}

.square-marquee-track {
  display: flex;
  width: max-content;
  animation: squareMarquee 32s linear infinite;
  gap: 0;
  margin: 0;
  padding: 0;
}

.square-marquee-track:hover {
  animation-play-state: paused;
}

.square-service-card {
  width: 25vw;
  min-width: 260px;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
}

/* Full-Bleed Seamless Vertical Service Columns (Mobile: 2x2 Squares, Desktop: Tall Verticals) */
.vertical-service-column {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

@media (min-width: 768px) {
  .vertical-service-column {
    aspect-ratio: auto;
    min-height: 520px;
  }
}

@media (min-width: 1024px) {
  .vertical-service-column {
    min-height: 82vh;
  }
}

/* Precise Text Gridding and Vertical Baseline Alignment */
.vertical-service-title {
  min-height: 2.5rem; /* Exactly 2 lines at mobile text-sm leading-tight to keep all 4 square titles aligned */
  display: flex;
  align-items: flex-end;
}

@media (min-width: 640px) {
  .vertical-service-title {
    min-height: 3.5rem; /* Aligns 2 lines at sm:text-xl */
  }
}

@media (min-width: 768px) {
  .vertical-service-title {
    min-height: 4rem; /* Aligns 2 lines at md:text-2xl */
  }
}

@media (min-width: 1024px) {
  .vertical-service-title {
    min-height: 4.75rem; /* Aligns 2 lines at lg:text-3xl across all 4 vertical desktop columns */
  }
}

.vertical-service-desc {
  min-height: 4.5rem;
}

@media (min-width: 1024px) {
  .vertical-service-desc {
    min-height: 5.25rem;
  }
}

.vertical-service-list {
  min-height: 5.5rem;
}

/* Full-Bleed Seamless Landscape Blocks (Mobile: Vertical Portrait, Desktop: Wide Landscape) */
.landscape-bleed-block {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 520px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

@media (min-width: 640px) {
  .landscape-bleed-block {
    aspect-ratio: 4 / 5;
    min-height: 580px;
  }
}

@media (min-width: 768px) {
  .landscape-bleed-block {
    aspect-ratio: auto;
    min-height: 75vh;
  }
}

@media (min-width: 1024px) {
  .landscape-bleed-block {
    min-height: 88vh;
  }
}

/* Lightbox Modal */
.lightbox-modal {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f9f9f8;
}
::-webkit-scrollbar-thumb {
  background: rgba(20, 20, 22, 0.16);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 20, 22, 0.28);
}

.text-balance {
  text-wrap: balance;
}

/* =========================================================
   Universal Responsive, Portability & High-DPI Display Enhancements
   ========================================================= */

/* Ensure smooth image scaling and aspect ratios across all screens */
img, svg, video {
  max-width: 100%;
  height: auto;
}

/* Fluid responsive type dampeners for mobile to ultra-wide 4K */
@media (max-width: 640px) {
  .glass-nav-box {
    width: 95% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Lightbox modal responsive safety */
#lightbox-modal img {
  max-height: 85vh;
  object-fit: contain;
}

/* Mobile tap target usability */
button, a, input, select, textarea {
  touch-action: manipulation;
}

/* Print styling optimization for PDF export */
@media print {
  #global-floating-nav, #mobile-nav-drawer, footer, #lightbox-modal {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
