:root {
  --bg: #050b0a;
  --emerald: #0ea57a;
  --emerald-light: #0ea57a0d;
  --border: rgba(14, 165, 122, 0.12);
  --text-primary: #f0ede8;
  --text-secondary: #a8a39b;
  --line: rgba(240, 237, 232, 0.08);
}

html { font-size: 18px; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing:antialiased;
}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

h1 { font-size: clamp(4.2rem, 9.6vw, 9.6rem); line-height: 1.02; font-family: Georgia, serif; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.8rem); line-height: 1.15; font-family: Georgia, serif; margin-bottom: 1rem; }

.max-w-5xl, .max-w-7xl, .max-w-3xl { margin-left: clamp(1rem, 5vw, 4rem); margin-right: auto; }
.hero-banner { text-align: left; }
h3, h4 { font-family: Georgia, serif; }

#canvas-container {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, rgba(5,11,10,0.73) 0%, rgba(5,11,10,0.68) 100%), url('back.png') center/cover no-repeat;
  background-attachment: scroll;
}

.philosophy-section {
  background: linear-gradient(180deg, rgba(5,11,10,0.75), rgba(5,11,10,0.75)), url('phy.png') center/cover no-repeat;
  background-attachment: scroll;
}

.bms-section {
  background: linear-gradient(180deg, rgba(5,11,10,0.75), rgba(5,11,10,0.75)), url('bms.jpg') center/cover no-repeat;
  background-attachment: scroll;
}

.hero-title {
  display: inline-block;
  border-right: 3px solid var(--emerald);
  white-space: normal;
  overflow: visible;
  animation: blink 1s infinite;
  margin-bottom: 2rem !important;
  font-size: clamp(4.2rem, 9.6vw, 9.6rem);
  line-height: 1.02;
  font-family: Georgia, serif;
  font-weight: 800;
}
@media (max-width: 1024px) {
  .hero-title { font-size: clamp(2.88rem, 10.2vw, 4.8rem); }
}
@media (max-width: 768px) {
  .hero-title { font-size: clamp(2.4rem, 9vw, 3.8rem); line-height: 1.04; }
}

.hero-banner {
  background: linear-gradient(180deg, rgba(14,165,122,0.04), rgba(14,165,122,0.02));
  border: 1px solid rgba(14,165,122,0.08);
  padding: clamp(1rem, 3.5vw, 2.5rem);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  display: block;
}

@keyframes blink { 50% { border-color: transparent; } }

.btn-arch {
  padding: 0.9rem 2rem;
  color: var(--emerald);
  border: 1px solid var(--emerald);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.12rem;
  transition: 0.32s;
  display: inline-block;
  background: transparent;
  position: relative;
  z-index: 1;
}
.btn-arch:hover { color: #000; }
.btn-arch::after {
  content: ''; position: absolute; top:0; left:0; width:0; height:100%;
  background: var(--emerald); z-index: -1; transition: 0.32s;
}
.btn-arch:hover::after { width: 100%; }

.glass-box {
  background: rgba(14, 165, 122, 0.04);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: 0.3s;
}
.glass-box:hover { border-color: var(--emerald); transform: translateY(-5px); }

.reveal { opacity: 0; transform: translateY(30px); transition: 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.group.touch-active img,
.group.touch-active .aspect-square img { filter: none !important; opacity: 1 !important; transform: scale(1.05) !important; }
.group.touch-active .absolute,
.group.touch-active .absolute.inset-0 { opacity: 1 !important; }
.glass-box.touch-active { transform: translateY(-5px); border-color: var(--emerald); }

.section-padding { padding: clamp(2.4rem, 8vh, 6rem) clamp(1rem, 5vw, 6rem); }

.text-xs, .text-[10px], .text-[11px], .text-sm { font-size: 0.95rem !important; }
.text-[12px] { font-size: 1rem !important; }

nav a, #mobile-menu a { font-size: 0.98rem !important; letter-spacing: 0.12em !important; }
nav a img { height: auto; }

.tracking-widest, [class*="tracking-widest"] { letter-spacing: 0.12em !important; }

input[type="number"], iframe { font-size: 1rem; }

@media (max-width: 1024px) {
  h1 { font-size: clamp(2.88rem, 10.2vw, 4.8rem); }
  nav a, #mobile-menu a { font-size: 1rem !important; }
  .hero-title { border-right: none; }
  #canvas-container { height: 100vh; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  .max-w-5xl, .max-w-7xl, .max-w-3xl { margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
  .section-padding { padding: clamp(1.2rem, 6vh, 3rem) clamp(0.75rem, 5vw, 1.5rem); }

  .hero-banner { padding: 1rem; border-radius: 8px; }
  h1 { font-size: clamp(2.4rem, 9vw, 3.8rem); line-height: 1.04; }
  .hero-title { border-right: none; }

  .btn-arch { font-size: 0.95rem; padding: 0.6rem 1.2rem; letter-spacing: 0.08rem; }

  nav { padding: 0.6rem 1rem; }
  nav a, #mobile-menu a { font-size: 1rem !important; }

  .wa-float { right: 16px; bottom: 16px; }
  .wa-float .wa-btn { width: 44px; height: 44px; }

  iframe { height: 420px; }

  #services-grid, #portfolio-grid, #team-grid { gap: 0.75rem; }
}

.modal { display: none; position: fixed; z-index: 9999; left:0; top:0; width:100%; height:100%; background: rgba(0,0,0,0.95); padding: 20px; }
.modal-content { max-width: 95%; max-height: 80vh; margin: auto; display: block; object-fit: contain; }

.wa-float { position: fixed; bottom: 40px; right: 40px; z-index: 1000; }
.wa-float .wa-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.wa-float .wa-btn::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 100%; height: 100%; border-radius: 50%;
  background: rgba(14,165,122,0.08);
  z-index: 0;
  animation: wa-ripple 2s infinite;
}
.wa-float .wa-btn > img { position: relative; z-index: 1; }
.wa-float .wa-btn:hover { transform: translateY(-4px) scale(1.03); transition: transform 0.25s ease; }
@keyframes wa-ripple {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  70% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
  100% { opacity: 0; }
}

.hero-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-slide.active { opacity: 1; }

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background-color: #000;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--emerald);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: color 0.3s ease;
}

.slider-nav:hover {
  color: var(--emerald-light);
  transform: translateY(-50%) scale(1.1);
}

.slider-nav.left { left: 24px; }
.slider-nav.right { right: 24px; }

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(14, 165, 122, 0.3);
  border: 1px solid rgba(14, 165, 122, 0.4);
  cursor: pointer;
  transition: all 0.4s ease;
}

.dot.active {
  background: var(--emerald);
  width: 28px;
  border-radius: 5px;
  transform: scale(1);
}

.dot:hover { background: rgba(14, 165, 122, 0.6); }

@media (max-width: 768px) {
  .slider-nav { width: 60px; height: 60px; font-size: 1.8rem; }
  .slider-nav.left { left: 8px; }
  .slider-nav.right { right: 8px; }
  .slider-dots { bottom: 16px; }
  .hero-slider-container { aspect-ratio: 16 / 9; }
}

.slider-slide.loading {
  background: linear-gradient(90deg, rgba(14, 165, 122, 0.1) 0%, rgba(14, 165, 122, 0.05) 50%, rgba(14, 165, 122, 0.1) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Subpage hero — for service/blog/faq/contact pages */
.subpage-hero {
  padding-top: 8rem;
  padding-bottom: 2rem;
}

/* Site header / nav */
.site-nav {
  padding: 0.9rem clamp(1rem, 4vw, 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.site-nav .brand img { height: 36px; width: auto; }
.site-nav .brand-text { display: flex; flex-direction: column; line-height: 1; }
.site-nav .brand-text .name {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.site-nav .brand-text .sub {
  font-size: 0.62rem;
  color: var(--emerald);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 2px;
}
.site-nav-links {
  display: none;
  gap: 1.6rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .site-nav-links { display: flex; }
  .site-nav .hamburger { display: none; }
}
.site-nav-links a,
.site-nav-links .dropdown-trigger {
  font-size: 0.7rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0.72;
  transition: opacity 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.site-nav-links a:hover,
.site-nav-links .dropdown-trigger:hover { opacity: 1; color: var(--emerald); }
.site-nav-links a.is-active { opacity: 1; color: var(--emerald); }

/* Services dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-dropdown .dropdown-trigger .caret {
  color: var(--emerald);
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 240px;
  background: rgba(7, 14, 13, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown:hover .dropdown-trigger .caret,
.nav-dropdown:focus-within .dropdown-trigger .caret { transform: rotate(180deg); }
/* Invisible bridge so the dropdown doesn't close when moving cursor down */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 18px;
}
.nav-dropdown .dropdown-menu a {
  display: block;
  padding: 0.65rem 1.2rem;
  font-size: 0.72rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  opacity: 0.85;
  white-space: nowrap;
}
.nav-dropdown .dropdown-menu a:hover {
  opacity: 1;
  color: var(--emerald);
  background: rgba(14,165,122,0.08);
}

.site-nav .hamburger {
  background: transparent;
  border: 0;
  color: var(--emerald);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

/* Mobile menu polish */
#mobile-menu .mobile-group-label {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--emerald);
  opacity: 0.7;
  text-transform: uppercase;
  margin-top: 0.5rem;
}
#mobile-menu a {
  font-size: 1.05rem !important;
  letter-spacing: 0.18em !important;
}

/* Breadcrumb */
.breadcrumb a { color: var(--emerald); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb { opacity: 0.7; }
