/* 
 * BuildCore - Construction & Architecture Core Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Geist+Mono&display=swap');

:root {
  /* Fonts */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Geist Mono', monospace;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 5rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Theme: Light Mode (Default) */
  --bg-primary: #F8F9FB;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F3F5;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-hover: rgba(248, 249, 251, 0.95);
  --border-color: rgba(30, 58, 138, 0.08);
  --border-color-hover: rgba(30, 58, 138, 0.15);
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --accent-1: #1E3A8A; /* Deep Navy */
  --accent-2: #F59E0B; /* Amber Gold */
  --accent-gradient: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --accent-glow: rgba(30, 58, 138, 0.05);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
  --selection-bg: rgba(30, 58, 138, 0.1);
  --selection-color: #111827;
}

[data-theme="dark"] {
  /* Theme: Dark Mode Overrides */
  --bg-primary: #0B0F19;
  --bg-secondary: #121824;
  --bg-tertiary: #1C2333;
  --bg-glass: rgba(18, 24, 36, 0.85);
  --bg-glass-hover: rgba(28, 35, 51, 0.95);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-muted: #9CA3AF;
  --accent-1: #3B82F6;
  --accent-2: #F59E0B;
  --accent-gradient: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --accent-glow: rgba(59, 130, 246, 0.15);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
  --selection-bg: rgba(59, 130, 246, 0.2);
  --selection-color: #FFFFFF;
}

/* Reset & Baseline styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-color);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-1);
}

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-1);
  width: 0%;
  z-index: 1003;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -1px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.5px; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.15rem, 2vw, 1.35rem); }

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Layout tools */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-xxl) 0;
  position: relative;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Glassmorphism panel styling */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.glass-panel:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-color-hover);
}

/* Custom Cursor */
.custom-cursor {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-1);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.25s, height 0.25s, background-color 0.25s, border-color 0.25s;
}

.custom-cursor-dot {
  width: 5px;
  height: 5px;
  background-color: var(--accent-2);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
}

/* Loader Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

.loader-text {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 1.15rem;
  margin-top: var(--space-md);
  text-transform: uppercase;
}

/* Sticky Header Navbar */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  margin-top: var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

header.sticky .navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin-top: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  animation: slideDown 0.4s forwards;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 14px;
  height: 14px;
  background: var(--accent-gradient);
  transform: rotate(45deg);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.theme-toggle:hover {
  transform: rotate(10deg);
}

/* Mobile Hamburger menu icon */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile Menu overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-menu-links a {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  border: none;
  outline: none;
  gap: var(--space-xs);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-1);
  color: #FFFFFF;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  background: #152A65;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-1);
  background: var(--bg-tertiary);
}

.btn-link {
  background: transparent;
  color: var(--text-primary);
  padding: 0;
  border-radius: 0;
  position: relative;
  font-weight: 600;
}

.btn-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-1);
  transition: width var(--transition-fast);
}

.btn-link:hover::after {
  width: 100%;
}

/* Announcement Bar */
.announcement-bar {
  background: var(--accent-1);
  color: #FFFFFF;
  font-size: 0.85rem;
  text-align: center;
  padding: var(--space-xs) 0;
  z-index: 1002;
  position: relative;
  font-weight: 600;
}

.announcement-bar a {
  color: var(--accent-2);
  text-decoration: underline;
}

/* Floating Scroll indicator and Back to Top */
.back-to-top {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: 998;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* Section Common Badges */
.section-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-2);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.18);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-xs);
}

/* Before / After Slider Widget */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 450px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.slider-img.img-before {
  z-index: 1;
}

.slider-img.img-after {
  z-index: 2;
  width: 50%; /* Starting point */
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%; /* Matching starting point */
  width: 4px;
  height: 100%;
  background-color: var(--accent-2);
  z-index: 3;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.slider-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-1);
  color: #FFFFFF;
  border: 2px solid var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}

/* Progress timeline tracking */
.progress-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.progress-timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--border-color);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 15%;
}

.timeline-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.timeline-step.active .timeline-icon {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 15px rgba(30, 58, 138, 0.15);
}

.timeline-title {
  margin-top: var(--space-xs);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: border-color var(--transition-fast);
}

.faq-question {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent-1);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-item.active {
  border-color: var(--accent-1);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: var(--bg-secondary);
  transition: max-height var(--transition-normal) ease-out, padding var(--transition-normal);
  padding: 0 var(--space-md);
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  padding: 0 var(--space-md) var(--space-md);
}

/* Footer structure */
footer {
  background: var(--accent-1);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xxl) 0 var(--space-lg);
  margin-top: var(--space-xxl);
}

footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
  color: #FFFFFF;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-about p {
  margin: var(--space-md) 0;
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: all var(--transition-fast);
}

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

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-column a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-column a:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.footer-newsletter p {
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
}

.newsletter-form {
  display: flex;
  gap: var(--space-xs);
}

.newsletter-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem var(--space-sm);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-family: var(--font-body);
  outline: none;
  font-size: 0.9rem;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
  border-color: var(--accent-2);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-policies {
  display: flex;
  gap: var(--space-md);
}

.footer-policies a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-policies a:hover {
  color: #FFFFFF;
}

/* Animations definition */
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}
