/* ── Skip to Main Content (Accessibility) ── */
.skip-to-main:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

/* ── Font Face Declarations ── */
@font-face {
  font-family: 'Clash Display';
  src: url('fonts/ClashDisplay-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Display';
  src: url('fonts/ClashDisplay-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Display';
  src: url('fonts/ClashDisplay-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Display';
  src: url('fonts/ClashDisplay-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope-ExtraLight.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

html {
  scroll-padding-top: 76px;
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #191B1F;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Browser Compatibility & Fallbacks ── */
@supports not (backdrop-filter: blur(4px)) {
  #main-nav {
    background: rgba(255,255,255,0.95) !important;
  }
  #main-nav.scrolled {
    background: rgba(0,0,0,0.95) !important;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Clash Display', 'Manrope', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Focus Styles for Keyboard Navigation ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #186F64;
  outline-offset: 4px;
}

.btn-arrow:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

footer a {
  color: #5F6368;
}

/* ── Contact email CTA hover ── */
.email-cta {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.email-cta:hover {
  background-color: #186F64 !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* ── Sliding underline for text links ── */
.nav-link,
.nav-mobile-link,
footer a {
  position: relative;
  display: inline-block;
}

.nav-link::after,
.nav-mobile-link::after,
footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.nav-link:hover::after,
.nav-mobile-link:hover::after,
footer a:hover::after {
  transform: scaleX(1);
}

/* ── Nav scroll behaviour ── */
#main-nav {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

#main-nav.at-top .nav-link {
  color: #fff;
}

#main-nav.at-top .nav-signin {
  color: rgba(255, 255, 255, 0.75);
}

#main-nav.at-top .nav-join {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

#main-nav.scrolled .nav-link {
  color: #BFC7C9;
}

#main-nav.scrolled .nav-signin {
  color: #BFC7C9;
}

#main-nav.scrolled .nav-join {
  border-color: #5F6368;
  color: #fff;
}

.nav-link,
.nav-signin,
.nav-join {
  transition: color 0.3s, border-color 0.3s;
}

/* ── Animated arrow button ── */
.btn-arrow {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  /* hard-clips anything inside — button box never shifts */
  min-width: max-content;
  /* locked to widest natural size, never shrinks */
  will-change: transform;
  /* own compositing layer, prevents reflow bleed */
}

.btn-arrow .arrow-before {
  display: inline-block;
  width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 8px;
  transition: width 0.5s ease, opacity 0.45s ease;
}

.btn-arrow .arrow-after {
  display: inline-block;
  width: 1.2em;
  opacity: 1;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
  transition: width 0.5s ease, opacity 0.45s ease;
}

.btn-arrow:hover .arrow-before {
  width: 1.2em;
  opacity: 1;
}

.btn-arrow:hover .arrow-after {
  width: 0;
  opacity: 0;
}

/* ── Scroll arrow bob animation ── */
@keyframes arrowBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(7px);
  }
}

.scroll-arrow {
  display: inline-block;
  animation: arrowBob 2s ease-in-out infinite;
}

/* ── Hero mesh-gradient CSS fallback ── */
@keyframes meshMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

#hero {
  background: linear-gradient(135deg,
      #082d1e 0%, #186F64 22%, #0a1f18 45%,
      #186F64 68%, #05140f 85%, #082d1e 100%);
  background-size: 500% 500%;
  animation: meshMove 14s ease infinite;
}

/* ── Process step counter ── */
.step-num {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: #E6EBEC;
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* ── Nine-dot menu button ── */
#nav-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  position: relative;
  grid-template-columns: repeat(3, 4px);
  gap: 4px;
  align-content: center;
  justify-content: center;
}

#nav-hamburger span {
  display: block;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Open state: dots fade out, X fades in via pseudo-elements */
#nav-hamburger.open span {
  opacity: 0;
  transform: scale(0);
}

#nav-hamburger::before,
#nav-hamburger::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  top: 50%;
  left: 50%;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#nav-hamburger::before {
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
}

#nav-hamburger::after {
  transform: translate(-50%, -50%) rotate(-45deg) scale(0);
}

#nav-hamburger.open::before {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

#nav-hamburger.open::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-45deg) scale(1);
}

/* ── Mobile nav menu ── */
#nav-mobile {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  background: rgba(10, 15, 14, 0.97);
  backdrop-filter: blur(12px);
  padding: 8px 24px 28px;
  flex-direction: column;
  z-index: 49;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#nav-mobile.open {
  display: flex;
}

.nav-mobile-link {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: block;
  transition: color 0.2s;
}

.nav-mobile-link:hover {
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* ── Mobile breakpoint (≤767px) ── */
@media (max-width: 767px) {

  /* Nav */
  #nav-links {
    display: none !important;
  }

  #nav-cta {
    display: none !important;
  }

  #nav-hamburger {
    display: grid !important;
  }

  #nav-inner {
    padding: 0 20px !important;
  }

  /* Hero — center-aligned on mobile */
  #hero .section-inner {
    text-align: center;
  }

  .hero-h1 {
    font-size: 38px !important;
    line-height: 1.12 !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #hero .section-inner>p {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-subtitle {
    font-size: 15px !important;
  }

  .hero-buttons {
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
  }

  /* Section inner padding */
  .section-inner {
    padding: 0 20px !important;
  }

  /* Why Us */
  .why-us-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* Services header */
  .services-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-bottom: 40px !important;
  }

  .services-header h2 {
    font-size: 26px !important;
  }

  .services-header>p {
    text-align: left !important;
    max-width: none !important;
    flex-shrink: unset !important;
  }

  /* Services grid */
  .services-grid {
    grid-template-columns: 1fr !important;
  }

  .services-grid>article {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 28px 0 !important;
  }

  .services-grid>article:last-child {
    border-bottom: none !important;
  }

  /* Process */
  .process-h2 {
    font-size: 30px !important;
  }

  .process-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .process-right {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid #E6EBEC !important;
  }

  /* Contact */
  .contact-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 28px !important;
  }

  .contact-flex>div:first-child {
    max-width: none !important;
  }

  .contact-h2 {
    font-size: 32px !important;
  }

  .contact-right {
    text-align: left !important;
    max-width: none !important;
    width: 100% !important;
  }

  .contact-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }

  .contact-buttons>* {
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
  }

  /* Footer */
  .footer-top {
    flex-direction: column !important;
    gap: 36px !important;
    align-items: flex-start !important;
  }

  .footer-links {
    gap: 40px !important;
  }

  /* Scroll indicator — shorten line so it doesn't overlap the CTA */
  .scroll-line-container {
    height: 24px !important;
  }
}

/* ── Tablet breakpoint (768px – 1023px) ── */
@media (min-width: 768px) and (max-width: 1023px) {

  /* Nav */
  #nav-inner {
    padding: 0 24px !important;
  }

  #nav-links {
    gap: 24px !important;
  }

  /* Section inner padding */
  .section-inner {
    padding: 0 32px !important;
  }

  /* Hero */
  .hero-h1 {
    font-size: 48px !important;
  }

  /* Why Us — single column on tablet too */
  .why-us-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }

  /* Services — 2 columns on tablet */
  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Normalize padding for 2-col layout */
  .services-grid>article {
    padding: 28px 20px !important;
  }

  /* All items get bottom border for 2-col row separators */
  .services-grid>article {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  /* Remove right border from even cols (right column in 2-col) */
  .services-grid>article:nth-child(2n) {
    border-right: none !important;
  }

  /* Remove bottom border from last 2 items (final row) */
  .services-grid>article:nth-last-child(-n+2) {
    border-bottom: none !important;
  }

  /* Process */
  .process-grid {
    gap: 32px !important;
  }

  .process-right {
    padding-left: 32px !important;
  }

  /* Contact */
  .contact-flex {
    gap: 32px !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* ── Scroll Indicator Animation ── */
@keyframes scrollLine {
  0% {
    transform: scaleY(1);
    transform-origin: top;
  }
  50% {
    transform: scaleY(0);
    transform-origin: top;
  }
  51% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

.scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
}

.scroll-indicator {
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 0.7;
}