/* ===================================================
   SES Constructions — Custom Styles
   Layered on top of Tailwind utility classes
   =================================================== */

:root {
  /* SES trademark teal-green family — anchored on #006b59 */
  --brand-900: #002a22;
  --brand-800: #004135;
  --brand-700: #005648;
  --brand-600: #006b59;  /* trademark green */
  --brand-500: #1a8472;
  --brand-400: #339a85;
  --brand-300: #5cb19e;
  --brand-200: #8fc8bb;
  --brand-100: #c2e0d9;
  --brand-50:  #e6f3f0;
  --ink-900:   #1f2430;  /* trademark dark */
}

html {
  scroll-behavior: smooth;
  overflow-x: clip; /* contain AOS fade-left/right offsets — no horizontal scroll */
}

body {
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ============== SES LOGO (HTML/CSS) ==============
   Exact trademark specs from ses.lk:
   - Wordmark font: MuseoModerno 800
   - Letter-spacing: -2px, gap between letters: 6px
   - Dark letters: #1f2430
   - Green E:      #006b59  (teal-green)
   - Sub "CONSTRUCTIONS": Poppins 700, 12.4px, letter-spacing 1px
   ================================================== */
.ses-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  line-height: 1;
  text-decoration: none;
  background: transparent;
  user-select: none;
  transition: transform .35s ease;
}
.ses-logo:hover { transform: translateY(-1px); }

.ses-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'MuseoModerno', sans-serif;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
}

.ses-letter {
  display: inline-block;
  font-size: 60px;
  transition: color .25s ease, transform .35s ease;
}

/* Trademark colors */
.ses-dark  { color: #1f2430; }   /* dark slate "S" letters */
.ses-light { color: #ffffff; }   /* inverse for dark backgrounds */
.ses-green { color: #006b59; }   /* exact trademark teal-green "E" */

/* Sub "CONSTRUCTIONS" — centered between the two outer S's.
   text-indent compensates for the trailing letter-spacing so the visual
   center matches the optical center of the wordmark. */
.ses-tagline {
  margin-top: -5px;
  font-family: 'Poppins', sans-serif;
  font-size: 12.4px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1f2430;
  text-align: center;
  width: 100%;
  text-indent: 1px;
}
.ses-tagline--light { color: #ffffff; }

.ses-logo:hover .ses-green { transform: translateY(-2px) rotate(-2deg); }

/* Navbar logo — keep exact trademark proportions but scale to fit 80px nav.
   Using transform: scale keeps the SES↔CONSTRUCTIONS ratio identical to the footer. */
#navbar .ses-logo {
  transform: scale(0.74);
  transform-origin: left center;
  margin-right: -32px; /* offset the empty space left by scaling */
}

/* Footer logo */
footer .ses-letter { font-size: 56px; }
footer .ses-tagline { font-size: 12px; text-indent: 1px; }

@media (max-width: 640px) {
  #navbar .ses-logo { transform: scale(0.62); margin-right: -44px; }
  footer .ses-letter { font-size: 44px; }
}

/* ============== NAVBAR ==============
   Always-on translucent white header (80% opacity) with backdrop blur.
   ===================================== */
/* Prominent glassmorphism navbar — visible frosted glass with strong highlights */
#navbar {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(255, 255, 255, 0.58) 100%
  );
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 107, 89, 0.10),
    0 14px 40px -10px rgba(31, 36, 48, 0.25),
    0 4px 12px -4px rgba(31, 36, 48, 0.10);
}
#navbar.scrolled {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.72) 100%
  );
  backdrop-filter: blur(36px) saturate(220%);
  -webkit-backdrop-filter: blur(36px) saturate(220%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(0, 107, 89, 0.15),
    0 16px 44px -12px rgba(31, 36, 48, 0.30),
    0 6px 16px -4px rgba(31, 36, 48, 0.12);
}

.nav-link {
  position: relative;
  color: #1f2430;
  padding: 0.25rem 0;
  transition: color .25s;
}
.nav-link:hover { color: #006b59; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #006b59;
  transition: width .3s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: #006b59; }
.nav-link.active::after { width: 100%; }

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  color: #13231b;
  transition: background .2s;
}
.mobile-link:hover { background: #eaf4ee; color: var(--brand-700); }

/* logo mark hover */
.logo-mark { transition: transform .4s ease; display: inline-flex; }
a:hover .logo-mark { transform: rotate(-6deg) scale(1.05); }

/* ============== BUTTONS ============== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-600);
  color: white;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all .3s ease;
  box-shadow: 0 12px 32px -12px rgba(0, 107, 89, 0.55);
}
.btn-primary:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -12px rgba(0, 107, 89, 0.7);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  transition: all .3s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }

/* ============== HERO ============== */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
}

.scroll-line {
  position: relative;
  overflow: hidden;
}
.scroll-line::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ============== SECTION ============== */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--brand-700);
}

.section-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0b1410;
  margin-top: 0.75rem;
}

/* ============== FEATURE PILLS ============== */
.feature-pill {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid #eaf4ee;
  border-radius: 1rem;
  transition: all .3s;
}
.feature-pill:hover {
  border-color: var(--brand-300);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(10, 79, 38, 0.25);
}

/* ============== VISION / MISSION ============== */
.vm-card {
  position: relative;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all .4s ease;
}
.vm-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(108, 175, 128, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
}
.vm-card:hover { border-color: rgba(108, 175, 128, 0.4); transform: translateY(-4px); }
.vm-card:hover::before { opacity: 1; }

/* ============== SERVICES ============== */
.service-card {
  position: relative;
  padding: 2rem 1.75rem;
  background: white;
  border: 1px solid #eaf4ee;
  border-radius: 1.5rem;
  transition: all .4s ease;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -18px rgba(10, 79, 38, 0.25);
  border-color: transparent;
}
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: #eaf4ee;
  color: var(--brand-700);
  margin-bottom: 1.25rem;
  transition: all .3s;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card:hover .service-icon {
  background: var(--brand-700);
  color: white;
  transform: rotate(-6deg) scale(1.05);
}
.service-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #0b1410;
}
.service-card p {
  margin-top: 0.5rem;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.55;
}
.service-card ul {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #d1e5d8;
  font-size: 0.85rem;
  color: #6b7280;
  list-style: none;
}
.service-card ul li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
}
.service-card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
}

.service-card-feature {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: white;
  border: none;
}
.service-card-feature h3 { color: white; }
.service-card-feature p { color: rgba(255,255,255,0.85); }
.service-card-feature ul { color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.2); }
.service-card-feature ul li::before { background: var(--brand-300); }
.service-card-feature .service-icon { background: rgba(255,255,255,0.15); color: white; }
.service-card-feature:hover .service-icon { background: white; color: var(--brand-700); }

/* M&E items */
.me-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f6fbf7;
  border-radius: 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1b3326;
  border: 1px solid transparent;
  transition: all .25s;
}
.me-item:hover {
  background: white;
  border-color: var(--brand-300);
  transform: translateX(4px);
}
.me-item svg { width: 18px; height: 18px; color: var(--brand-600); }

/* ============== PROCESS ============== */
.process-step {
  position: relative;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 1.25rem;
  border: 1px solid #eaf4ee;
  transition: all .35s;
}
.process-step::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  opacity: 0;
  transition: opacity .4s;
  z-index: 0;
}
.process-step > * { position: relative; z-index: 1; }
.process-step:hover { transform: translateY(-6px); border-color: transparent; }
.process-step:hover::before { opacity: 1; }
.process-step:hover h4,
.process-step:hover p { color: white; }
.process-step:hover .step-num { color: rgba(255,255,255,0.4); }

.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-300);
  line-height: 1;
  letter-spacing: -0.04em;
  transition: color .3s;
}
.process-step h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0b1410;
  margin-top: 0.85rem;
  transition: color .3s;
}
.process-step p {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.55;
  transition: color .3s;
}

/* ============== PROJECTS ============== */
.filter-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all .25s;
}
.filter-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.filter-btn.active {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

.project-card {
  position: relative;
  display: block;
  border-radius: 1.5rem;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #1b3326;
  group: card;
  transition: opacity .4s;
}
.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s ease, filter .4s;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 38, 17, 0.95) 0%, rgba(4, 38, 17, 0.3) 50%, transparent 100%);
  transition: opacity .3s;
}
.project-card:hover img { transform: scale(1.08); }
.project-card.hidden { display: none; }

.project-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  color: white;
  z-index: 1;
  transform: translateY(8px);
  transition: transform .4s ease;
}
.project-card:hover .project-meta { transform: translateY(0); }
.project-meta h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.4rem;
}
.project-meta p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.15rem;
}

.tag {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: all .25s;
}
.tag:hover {
  border-color: var(--brand-300);
  color: white;
}

/* ============== TEAM ============== */
.team-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: white;
  border: 1px solid #eaf4ee;
  transition: all .35s;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -18px rgba(10, 79, 38, 0.2);
  border-color: var(--brand-300);
}
.team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1.25rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s, filter .5s;
  filter: grayscale(20%);
}
.team-card:hover .team-photo img { transform: scale(1.05); filter: grayscale(0%); }
.team-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0b1410;
}
.team-card .role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-700);
  margin-top: 0.25rem;
}
.team-card .bio {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.55;
}

/* ============== CONTACT ============== */
.contact-row {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  transition: background .25s;
}
a.contact-row:hover { background: #f6fbf7; }
.contact-ico {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 0.85rem;
  background: var(--brand-50, #eaf4ee);
  color: var(--brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-ico svg { width: 20px; height: 20px; }
.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}
.contact-value {
  font-weight: 500;
  color: #1b3326;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: white;
  border: 1px solid #d1e5d8;
  border-radius: 0.85rem;
  font-size: 0.95rem;
  color: #0b1410;
  transition: all .2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(31, 124, 61, 0.12);
}

/* ============== FOOTER ============== */
.footer-h {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand-300);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer-list { list-style: none; padding: 0; }
.footer-list li { padding: 0.35rem 0; color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-list a { transition: color .2s; }
.footer-list a:hover { color: white; }

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  transition: all .25s;
}
.social-btn:hover {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
  transform: translateY(-2px);
}
.social-btn svg { width: 18px; height: 18px; }

/* ============== BACK TO TOP ============== */
#toTop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============== UTILITIES ============== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f6fbf7; }
::-webkit-scrollbar-thumb {
  background: var(--brand-300);
  border-radius: 10px;
  border: 2px solid #f6fbf7;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-500); }

/* Better focus rings */
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Design Projects — masonry gallery (images shown at natural aspect) */
.masonry-gallery {
  column-gap: 1.25rem;
  columns: 1;
}
@media (min-width: 640px)  { .masonry-gallery { columns: 2; } }
@media (min-width: 1024px) { .masonry-gallery { columns: 3; } }

.masonry-gallery figure {
  break-inside: avoid;
  margin: 0 0 1.25rem;
  border-radius: 1.1rem;
  overflow: hidden;
  position: relative;
  background: #1b3326;
  box-shadow: 0 12px 32px -16px rgba(7, 59, 28, 0.35);
}
.masonry-gallery img {
  width: 100%;
  display: block;
  transition: transform .7s ease;
}
.masonry-gallery figure:hover img { transform: scale(1.07); }
.masonry-gallery figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 38, 17, 0.55), transparent 55%);
  opacity: 0;
  transition: opacity .35s;
}
.masonry-gallery figure:hover::after { opacity: 1; }

/* ============== PRELOADER — SES logo animation ============== */
body.loading { overflow: hidden; }

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;   /* fallback */
  height: 100dvh;  /* match the actually-visible viewport on mobile */
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.is-done {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* logo + soft breathing glow behind it */
.preloader-logo {
  position: relative;
  transform: scale(1.15);
}
.preloader-logo::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 230px;
  height: 230px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 107, 89, 0.14), transparent 65%);
  animation: plGlow 1.8s ease-in-out infinite;
  z-index: -1;
}
@keyframes plGlow {
  0%, 100% { opacity: .45; transform: translate(-50%, -50%) scale(.85); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
}

/* S · E · S letters rise and settle, staggered */
.pl-letter {
  opacity: 0;
  animation: plLetterIn .6s cubic-bezier(.22, .85, .25, 1) forwards;
}
.pl-letter:nth-child(1) { animation-delay: .15s; }
.pl-letter:nth-child(2) { animation-delay: .33s; }
.pl-letter:nth-child(3) { animation-delay: .51s; }

@keyframes plLetterIn {
  0%   { opacity: 0; transform: translateY(34px) scale(.7); }
  55%  { opacity: 1; transform: translateY(-7px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* CONSTRUCTIONS fades in after the letters */
.preloader-logo .ses-tagline {
  opacity: 0;
  animation: plFade .55s ease .72s forwards;
}
@keyframes plFade { to { opacity: 1; } }

/* progress bar fills over ~2s */
.preloader-bar {
  position: absolute;
  top: calc(100% + 1.7rem);
  left: 50%;
  transform: translateX(-50%);
  width: 190px;
  height: 3px;
  border-radius: 99px;
  background: var(--brand-50);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-700));
  animation: plBar 1.6s cubic-bezier(.5, 0, .2, 1) .35s forwards;
}
@keyframes plBar { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .pl-letter,
  .preloader-logo .ses-tagline,
  .preloader-bar span,
  .preloader-logo::before {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    opacity: 1 !important;
  }
  .preloader-bar span { width: 100%; }
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .section-title { font-size: 2rem; }
  .vm-card { padding: 1.75rem; }
}
