/* =======================================================
   SERWEBS CORE DESIGN SYSTEM — ABSOLUTE MINIMALISM
   ======================================================= */

:root {
  --bg-void: #000000;          
  --bg-card: #09090B;          
  --bg-card-hover: #121214;    
  --text-pure: #FFFFFF;        
  --text-muted: #8E8E93;       
  --accent-light: #F2F2F7;     
  
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-active: rgba(255, 255, 255, 0.15);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Manrope", sans-serif;
  
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.4s var(--ease-premium);
}

/* =======================================================
   BASE ENGINE & RESETS
   ======================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  background: var(--bg-void);
  color: var(--text-pure);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  background: var(--bg-void);
}

body.is-loading {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

p {
  line-height: 1.62;
  color: var(--text-muted);
  font-size: 0.95rem;
}

h1, h2, h3, .brand-anchor, .filter-btn, .button, .step-num, .philo-icon-num {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 600;
}

/* =======================================================
   RETAINED SYSTEM TRANSITIONS (SCROLL REVEALS)
   ======================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: transform 0.8s var(--ease-premium), opacity 0.8s var(--ease-premium);
  will-change: transform, opacity;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =======================================================
   RETAINED INTRO LOADER SEQUENCE
   ======================================================= */
.intro-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease-premium), visibility 0.5s var(--ease-premium);
}

.intro-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 180px;
}

.loader-mark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-pure);
  letter-spacing: -0.5px;
}

.loader-line-container {
  width: 100%;
  height: 1px; 
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.loader-line {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--text-pure);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

/* =======================================================
   NAVIGATION DOCK
   ======================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 32px 24px 0 24px; 
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s var(--ease-premium), opacity 0.4s var(--ease-premium);
}

.site-header.nav-visible {
  transform: translateY(0);
  opacity: 1;
}

.nav-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px; 
  border-radius: 100px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s ease, background 0.3s ease;
  touch-action: pan-x pan-y; /* Fast responsiveness for flick gestures */
}

.site-header.is-scrolled .nav-dock {
  border-color: var(--border-active);
  background: rgba(5, 5, 6, 0.9);
}

.brand-anchor {
  color: var(--text-pure);
  text-decoration: none;
  font-size: 1.05rem; 
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: -0.03em;
  transition: opacity 0.3s ease;
}
.brand-anchor:hover { opacity: 0.75; }

.main-nav {
  display: flex;
  gap: 6px; 
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem; 
  font-weight: 500;
  padding: 10px 22px; 
  border-radius: 100px;
  transition: var(--transition-smooth);
}

.main-nav a:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.is-active {
  color: var(--bg-void);
  background: var(--text-pure);
  font-weight: 600;
}

/* =======================================================
   HERO INTERFACE
   ======================================================= */
.hero-section {
  padding-top: 140px;
  padding-bottom: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 75vh;
}

.hero-wrap {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-wrap h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.15;
  color: var(--text-pure);
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}

.hero-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.85rem;
  border-radius: 4px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.button-primary {
  background: var(--text-pure);
  color: var(--bg-void);
  font-weight: 600;
  border: 1px solid var(--text-pure);
}
.button-primary:hover {
  background: transparent;
  color: var(--text-pure);
}

.button-secondary {
  background: transparent;
  color: var(--text-pure);
  border: 1px solid var(--border-subtle);
}
.button-secondary:hover {
  border-color: var(--text-pure);
}

/* =======================================================
   PRODUCTION SHOWROOM ARCHITECTURE
   ======================================================= */
.work-section {
  padding: 100px 0;
  background: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  gap: 24px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 2rem;
  letter-spacing: -0.5px;
}

.showroom-filter-dock {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.filter-btn:hover, .filter-btn.is-active {
  color: var(--text-pure);
}

.filter-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text-pure);
}

.showroom-grid {
  display: flex;
  flex-direction: column;
  gap: 64px; 
}

.showroom-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.4s var(--ease-premium), opacity 0.4s var(--ease-premium), transform 0.4s var(--ease-premium);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.showroom-card:hover {
  border-color: var(--border-active);
}

.showroom-card.is-filtered-out {
  opacity: 0;
  transform: scale(0.98) translateY(10px);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.showroom-window-header {
  background: #0D0D0F;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.window-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.window-controls span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.window-title-url {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-pop-link {
  font-size: 0.75rem;
  color: var(--text-pure);
  text-decoration: none;
  font-weight: 500;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}
.window-pop-link:hover { opacity: 0.7; }

.showroom-viewport-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  background: #050506;
  overflow: hidden;
  cursor: pointer;
}

.showroom-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 125%;
  height: 125%;
  border: none;
  transform: scale(0.8);
  transform-origin: 0 0;
  pointer-events: none !important;
  transition: filter 0.5s var(--ease-premium), transform 0.5s var(--ease-premium);
  will-change: filter, transform;
}

.viewport-hover-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: opacity 0.4s var(--ease-premium), backdrop-filter 0.4s var(--ease-premium);
}

.overlay-content {
  text-align: center;
  padding: 0 24px;
  transform: translateY(10px);
  transition: transform 0.4s var(--ease-premium);
}

.overlay-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  background: var(--text-pure);
  color: var(--bg-void);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 26px;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.overlay-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

.showroom-card-meta {
  padding: 24px 32px;
}
.showroom-card-meta h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.vault-gateway-wrapper {
  margin-top: 56px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 56px;
}
.vault-gateway-wrapper p { margin-bottom: 20px; }

/* DESKTOP HOVER ENGINE */
@media (hover: hover) {
  .viewport-hover-overlay {
    opacity: 0;
    pointer-events: none;
  }

  .showroom-card:hover .showroom-iframe {
    filter: blur(6px);
    transform: scale(0.81);
  }

  .showroom-card:hover .viewport-hover-overlay {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .showroom-card:hover .overlay-content {
    transform: translateY(0);
  }
  
  .viewport-hover-overlay:hover .overlay-badge {
    transform: scale(1.04);
  }
}

/* TOUCH / MOBILE OVERHAUL RULES */
@media (hover: none), (max-width: 768px) {
  .showroom-viewport-wrapper {
    height: 380px;
  }

  .showroom-iframe {
    width: 100% !important;
    height: 100% !important;
    transform: scale(1) !important;
    filter: none !important;
  }

  .viewport-hover-overlay {
    opacity: 1 !important;
    pointer-events: auto !important;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%) !important;
    align-items: flex-end;
    padding-bottom: 20px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .overlay-content {
    transform: translateY(0) !important;
    padding: 0 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .overlay-badge {
    background: var(--text-pure);
    color: var(--bg-void);
    font-size: 0.8rem;
    padding: 10px 22px;
    margin-bottom: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  }

  .overlay-badge:active {
    transform: scale(0.95);
  }

  .overlay-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
  }

  .window-title-url {
    font-size: 0.65rem;
  }
}

/* =======================================================
   PHILOSOPHY MODULE
   ======================================================= */
.philosophy-section {
  padding: 100px 0;
  background: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
}

.philosophy-header {
  max-width: 640px;
  margin-bottom: 64px;
}
.philosophy-header h2 {
  font-size: 2rem;
  color: var(--text-pure);
  margin: 12px 0 20px 0;
  letter-spacing: -0.5px;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 32px;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}
.philosophy-card:hover {
  border-color: var(--border-active);
}

.philo-icon-num {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}
.philosophy-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

/* =======================================================
   PROCESS PIPELINE
   ======================================================= */
.process-section {
  padding: 100px 0;
  background: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.process-card {
  background: transparent;
  border-top: 1px solid var(--border-subtle);
  padding: 24px 4px;
}

.step-num {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 20px;
}

.process-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.process-card p {
  font-size: 0.85rem;
}

/* =======================================================
   CONTACT GATEWAY
   ======================================================= */
.contact-section {
  padding: 100px 0;
  background: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
}

.contact-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 64px 32px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-inner h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 12px auto 20px auto;
  max-width: 580px;
  line-height: 1.2;
}

.contact-inner p:not(.eyebrow) {
  max-width: 520px;
  margin: 0 auto 32px auto;
}

.contact-form {
  max-width: 680px;
  margin: 48px auto 0 auto;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
  color: var(--text-pure);
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 0;
  transition: border-color 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--text-pure);
}

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

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  gap: 24px;
  flex-wrap: wrap;
}

.form-actions button.button-primary {
  cursor: pointer;
  border-radius: 4px;
}

.direct-email-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.direct-email-link:hover {
  color: var(--text-pure);
}

/* =======================================================
   FOOTER
   ======================================================= */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-void);
  padding: 32px 0;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-wrap p {
  font-size: 0.75rem;
}

/* =======================================================
   UNIFIED RESPONSIVE BREAKPOINTS
   ======================================================= */
@media (max-width: 1024px) {
  .philosophy-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .hero-section { padding-top: 100px; padding-bottom: 64px; }
  .section-header { margin-bottom: 32px; }
  .showroom-card-meta { padding: 20px 24px; }
  .philosophy-grid, .process-grid { grid-template-columns: 1fr; }
  .process-card { padding: 16px 0; }
  .contact-inner { padding: 40px 20px; }
  .footer-wrap { flex-direction: column; text-align: center; }
  
  .site-header { 
    top: 0; 
    bottom: auto; 
    padding: 16px 16px 0 16px; 
  }
  .nav-dock { 
    width: 100%; 
    justify-content: space-between; 
    padding: 8px 10px; 
  }
  .brand-anchor { 
    font-size: 0.95rem; 
    padding: 8px 16px; 
  }
  .main-nav a { 
    font-size: 0.85rem; 
    padding: 8px 14px; 
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .form-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .form-actions button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-anchor { font-size: 0.9rem; padding: 6px 10px; }
  .main-nav a { font-size: 0.8rem; padding: 6px 12px; }
  .main-nav { gap: 2px; }
  .showroom-filter-dock { width: 100%; overflow-x: auto; }
  
  .showroom-viewport-wrapper {
    height: 320px;
  }

  .showroom-card-meta {
    padding: 16px 20px;
  }
  .showroom-card-meta h3 {
    font-size: 1rem;
  }
  .showroom-card-meta p {
    font-size: 0.85rem;
  }
}

/* Modal Backdrop Overlay */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.7); /* Dark overlay matching SerWebs theme */
  backdrop-filter: blur(4px); /* Modern blur effect */
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Modal Box */
.modal-container {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 650px;
  max-height: 80vh; /* Limits height so it fits on small screens */
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

/* Scrollable Text Area */
.modal-body {
  padding: 30px;
  overflow-y: auto; /* Adds smooth scrolling inside modal */
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-body h2 {
  margin-top: 0;
  color: #0f172a;
}

.modal-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #2563eb;
  font-size: 1.1rem;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}

.modal-close:hover {
  color: #0f172a;
}

/* Open State Utility Class */
.modal-overlay.active {
  display: flex;
}

/* Smooth Fade In */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Privacy policy button */
#privacy-toggle {
	text-decoration: none;
	color: grey;
}

#privacy-toggle:hover {
	Color: red;
}