@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;700&amp;family=Montserrat:wght@500;700;800&amp;display=swap');

:root {
  --color-bg-base: #101018;
  --color-bg-surface: #1b1b21;
  --color-bg-elevated: #25252a;
  --color-border-subtle: #302f36;
  --color-border-focus: #8fb2bb;
  --color-text-main: #f0f0f9;
  --color-text-muted: #c6c6cf;
  --color-text-dim: #ababb3;
  --color-cyan: #8fb2bb;
  --color-blue: #9aadc7;
  --color-emerald: #90ba8a;
}

html {
  scroll-behavior: smooth;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg-base);
  color: var(--color-text-muted);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Distinctive Type Hierarchy with Clear >=1.25x Steps */
h1 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* ~40px - 56px */
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-main);
  text-wrap: balance;
}

h2 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(1.875rem, 3.5vw, 2.375rem); /* ~30px - 38px (1.5x of h3) */
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text-main);
  text-wrap: balance;
}

h3 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.5rem; /* 24px (1.33x of h4) */
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-main);
  text-wrap: balance;
}

h4 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.1875rem; /* 19px (1.25x of body) */
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-text-main);
}

body, p {
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 0.9375rem; /* 15px */
  line-height: 1.6;
}

/* Browser Surfaces Craft Rule */
::selection {
  background-color: #8fb2bb;
  color: #101018;
}

::-moz-selection {
  background-color: #8fb2bb;
  color: #101018;
}

:focus-visible {
  outline: 2px solid #8fb2bb !important;
  outline-offset: 3px !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #101018;
}
::-webkit-scrollbar-thumb {
  background: #302f36;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Tabular figures for data, metrics and pricing */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Body measure rule */
.prose-measure {
  max-width: 68ch;
}

/* Subtle luminous pulse for live availability dot */
@keyframes live-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(144,186,138, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(144,186,138, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(144,186,138, 0);
  }
}

.pulse-indicator {
  animation: live-pulse 2s infinite ease-in-out;
}

/* ==========================================================================
   Apple Design & Motion Systems: Tactile Feedback & Fluid Spring Transitions
   ========================================================================== */

/* Direct Manipulation & Immediate Feedback on Pointer-Down */
button,
a.inline-flex,
.portfolio-filter-btn {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button:active,
a.inline-flex:active,
.portfolio-filter-btn:active {
  transform: scale(0.975);
  transition: transform 90ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Panel hover transitions with deep natural shadows and subtle specular highlight */
.interactive-panel {
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.interactive-panel:hover {
  transform: translateY(-3px);
  border-color: #334155;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7), 
              0 4px 12px -2px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.09);
}

.interactive-panel:active {
  transform: translateY(-1px) scale(0.995);
  transition: transform 90ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   Interactive Spotlight Glow (Linear & Apple Style Card Tracking)
   ========================================================================== */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    550px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(143,178,187, 0.12),
    transparent 45%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Hero Aurora & Motion Backgrounds
   ========================================================================== */
@keyframes aurora-drift-1 {
  0%, 100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-48%, 25px) scale(1.08);
    opacity: 1;
  }
}

@keyframes aurora-drift-2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(35px, -20px) scale(1.12);
    opacity: 0.85;
  }
}

@keyframes aurora-drift-3 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-25px, 30px) scale(1.06);
    opacity: 0.8;
  }
}

.hero-aurora-1 {
  animation: aurora-drift-1 14s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero-aurora-2 {
  animation: aurora-drift-2 18s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero-aurora-3 {
  animation: aurora-drift-3 16s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Subtle glowing accent gradient border on top header */
.header-glass-border {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(143,178,187, 0.35) 30%,
    rgba(144,186,138, 0.35) 70%,
    transparent 100%
  );
}

/* ==========================================================================
   Fluid Accordion System (CSS Grid based - No Abrupt Display Toggling)
   ========================================================================== */
.faq-grid-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.28s ease;
  opacity: 0;
}

.faq-grid-collapse.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-grid-inner {
  overflow: hidden;
}

/* ==========================================================================
   Scroll Reveal Animation System (Progressive, Smooth & Accessible)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Range input styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #302f36;
  border-radius: 9999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8fb2bb;
  cursor: pointer;
  border: 2px solid #101018;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* ==========================================================================
   Floating WhatsApp Dock Pulsing Glow
   ========================================================================== */
.floating-whatsapp-dock {
  box-shadow: 0 10px 25px -5px rgba(144,186,138, 0.4),
              0 0 0 1px rgba(144,186,138, 0.3);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease;
}

.floating-whatsapp-dock:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 32px -4px rgba(144,186,138, 0.5),
              0 0 20px rgba(144,186,138, 0.4);
}

.floating-whatsapp-dock:active {
  transform: translateY(0) scale(0.97);
}

/* Estimator Selected Card Glow */
label:has(input[type="radio"]:checked) {
  border-color: rgba(143,178,187, 0.7) !important;
  box-shadow: 0 0 18px -4px rgba(143,178,187, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-aurora-1,
  .hero-aurora-2,
  .hero-aurora-3 {
    animation: none !important;
  }
}
