/* ==========================================================================
   ConstructionOS — Smart Construction Management Platform
   Glassmorphism Design System — "Warm Stone" palette (finalized)
   Light, elegant, professional palette derived from user-supplied swatch:
     - #E5E2E2  bg-base     (warm off-white background)
     - #D8C7BC  bg-surface  (dusty tan — secondary surface / blobs)
     - #A88B73  accent      (camel — primary CTA / accent color)
     - #45352A  text-dark   (deep brown — headlines / dark emphasis)
   ========================================================================== */

:root {
  --bg-base: #eeece9;
  --bg-warm: #E5E2E2;
  --bg-surface: #D8C7BC;
  --accent: #A88B73;
  --accent-light: #c4ae9c;
  --accent-dark: #45352A;
  --accent-deep: #2e2118;
  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-bg-strong: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(69, 53, 42, 0.14);
  --text-primary: #3c2c21;
  --text-muted: #7c695b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  margin: 0;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

/* ---------------------------------------------------------------------- */
/* Ambient background: gradient mesh + animated blobs                     */
/* ---------------------------------------------------------------------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 75% 55% at 12% 0%, rgba(168, 139, 115, 0.22), transparent 60%),
    radial-gradient(ellipse 65% 55% at 100% 15%, rgba(216, 199, 188, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 65% at 50% 100%, rgba(69, 53, 42, 0.08), transparent 55%),
    linear-gradient(180deg, #f2f0ed 0%, #e9e5e1 40%, #eeece9 100%);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.65;
  animation: float 18s ease-in-out infinite;
}
.blob-cyan { width: 480px; height: 480px; background: radial-gradient(circle, rgba(216,199,188,0.65), transparent 70%); top: -100px; left: -120px; }
.blob-violet { width: 520px; height: 520px; background: radial-gradient(circle, rgba(168,139,115,0.35), transparent 70%); top: 300px; right: -160px; animation-delay: -6s; }
.blob-amber { width: 420px; height: 420px; background: radial-gradient(circle, rgba(69,53,42,0.14), transparent 70%); bottom: -140px; left: 30%; animation-delay: -11s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.08); }
  66% { transform: translate(-25px, 25px) scale(0.95); }
}

/* ---------------------------------------------------------------------- */
/* Glassmorphism core — light frosted glass on warm-neutral background     */
/* ---------------------------------------------------------------------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(69, 53, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.5);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(69,53,42,0.16);
  box-shadow: 0 8px 40px rgba(69,53,42,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(69, 53, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.45), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(168,139,115,0.5);
  background: var(--glass-bg-strong);
  box-shadow: 0 20px 50px rgba(69,53,42,0.16), inset 0 1px 0 rgba(255,255,255,0.6);
}
.glass-card:hover::before { opacity: 1; }

/* Navbar */
.navbar-glass {
  background: rgba(238, 236, 233, 0.72);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(69,53,42,0.10);
}

/* ---------------------------------------------------------------------- */
/* Buttons — camel-to-brown primary CTA is the conversion focal point      */
/* ---------------------------------------------------------------------- */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent) 55%, var(--accent-dark));
  color: #f8f5f2;
  font-weight: 700;
  border-radius: 14px;
  padding: 0.85rem 1.9rem;
  box-shadow: 0 8px 25px rgba(69, 53, 42, 0.30);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(69, 53, 42, 0.45); filter: brightness(1.06); }

/* Extra-attention pulsing ring for the hero / final CTA buttons */
.btn-primary.btn-pulse { animation: btn-pulse-anim 2.6s ease-in-out infinite; }
@keyframes btn-pulse-anim {
  0%, 100% { box-shadow: 0 8px 25px rgba(69, 53, 42, 0.30), 0 0 0 0 rgba(168, 139, 115, 0.55); }
  50% { box-shadow: 0 8px 25px rgba(69, 53, 42, 0.30), 0 0 0 10px rgba(168, 139, 115, 0); }
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-weight: 500;
  border-radius: 14px;
  padding: 0.85rem 1.9rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-glass:hover { background: var(--glass-bg-strong); transform: translateY(-3px); border-color: rgba(168,139,115,0.5); color: var(--accent-dark); }

/* Module icon badge */
.icon-badge {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(168,139,115,0.20), rgba(69,53,42,0.08));
  border: 1px solid rgba(69,53,42,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 0.35s ease;
}
.glass-card:hover .icon-badge { transform: scale(1.1) rotate(-4deg); border-color: rgba(168,139,115,0.5); }

/* Gradient text — camel-to-brown hero accent */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--accent) 55%, var(--accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Secondary gradient text — deep brown (for variety on non-CTA headings) */
.gradient-text-blue {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-deep) 60%, #1c130d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Dot pill badge (Smart Construction Platform style) */
.pill-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(69, 53, 42, 0.14);
}
.pill-dot .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(168, 139, 115, 0.9);
  flex-shrink: 0;
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(168, 139, 115, 0.7); }
  50% { box-shadow: 0 0 16px rgba(168, 139, 115, 1); }
}

/* Section label pill (icon-based, used mid-page) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  color: var(--accent-dark);
}

/* Stat number */
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(69,53,42,0.22); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168,139,115,0.55); }

/* Marquee */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Nav link underline */
.nav-link { position: relative; color: var(--text-muted); transition: color 0.25s ease; }
.nav-link:hover { color: var(--text-primary); }
.nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent-dark));
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Mobile menu */
#mobile-menu { transition: max-height 0.4s ease, opacity 0.3s ease; }

/* Hero image frame */
.hero-visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
}
.hero-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(238,236,233,0) 40%, rgba(238,236,233,0.90) 100%);
}

/* Floating chip on hero image */
.float-chip {
  position: absolute;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Divider glow line */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,139,115,0.55), rgba(69,53,42,0.35), transparent);
}

/* Progress bar for feature */
.mini-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(69,53,42,0.10);
  overflow: hidden;
}
.mini-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent-dark));
}

/* Testimonial quote mark */
.quote-mark {
  font-family: 'Space Grotesk', serif;
  font-size: 4rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.6;
}

/* Pricing highlight card */
.pricing-highlight {
  border-color: rgba(168,139,115,0.6) !important;
  box-shadow: 0 0 0 1px rgba(168,139,115,0.3), 0 20px 60px rgba(168,139,115,0.20) !important;
}

/* Fade-up utility fallback (in case AOS delayed) */
[data-aos] { will-change: transform, opacity; }

/* Footer background accent */
.footer-glow {
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(168,139,115,0.14), transparent 70%);
}

/* Utility: section top spacing accounting for fixed nav */
.section-pad { padding-top: 6rem; padding-bottom: 6rem; }

@media (max-width: 768px) {
  .section-pad { padding-top: 4rem; padding-bottom: 4rem; }
}
