/* ============================================
   GLEXIS SYSTEMS — Premium Design System v2
   ============================================ */

/* --- Design Tokens --- */
:root {
  --g-primary: #0b7658;
  --g-primary-hover: #07563f;
  --g-primary-dark: #071e24;
  --g-primary-50: #eaf6f1;
  --g-primary-100: #d6eee4;
  --g-primary-200: #b2ddca;
  --g-primary-300: #7ec5a6;
  --g-primary-600: #0b7658;
  --g-primary-700: #07563f;
  --g-primary-800: #064632;
  --g-primary-900: #043526;

  --g-white: #ffffff;
  --g-gray-50: #f8fafc;
  --g-gray-100: #f1f5f9;
  --g-gray-200: #e2e8f0;
  --g-gray-300: #cbd5e1;
  --g-gray-400: #94a3b8;
  --g-gray-500: #64748b;
  --g-gray-600: #475569;
  --g-gray-700: #334155;
  --g-gray-800: #1e293b;
  --g-gray-900: #0f172a;
  --g-ink: #10252b;
  --g-muted: #53666b;
  --g-bg: #f3f6f4;
  --g-surface: #ffffff;

  --g-line: #e2e8f0;
  --g-shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --g-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --g-shadow: 0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.04);
  --g-shadow-md: 0 10px 30px -8px rgba(0,0,0,.08), 0 4px 12px -4px rgba(0,0,0,.04);
  --g-shadow-lg: 0 20px 50px -12px rgba(79,70,229,.12);
  --g-radius-sm: 8px;
  --g-radius: 12px;
  --g-radius-lg: 16px;
  --g-radius-xl: 24px;
  --g-radius-2xl: 32px;

  --g-font: 'Inter', 'Manrope', system-ui, -apple-system, sans-serif;
  --g-font-display: 'Inter', system-ui, sans-serif;

  --g-ease: cubic-bezier(.4, 0, .2, 1);
  --g-ease-out: cubic-bezier(0, 0, .2, 1);
  --g-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --g-duration: 300ms;
  --g-duration-fast: 180ms;
  --g-duration-slow: 500ms;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--g-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--g-ink);
  background: var(--g-bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: anywhere;
}
img, svg { display: block; max-width: 100%; }
main, section, .container, .g-navbar__inner { min-width: 0; }
img, video, iframe { width: 100%; max-width: 100%; height: auto; }
img { object-fit: contain; }
h1, h2, h3, h4, h5, h6, p, a, button, input, textarea, select { overflow-wrap: anywhere; word-break: break-word; }
.g-btn { white-space: normal; }
a { color: inherit; text-decoration: none; transition: color var(--g-duration-fast) var(--g-ease); }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }

/* --- Shared enterprise container --- */
.container,
.g-container,
.site-container {
  width: min(100% - 128px, 1440px);
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 0;
  box-sizing: border-box;
}
.container.narrow { max-width: 740px; }
@media (max-width: 1199px) {
  .container,
  .g-container,
  .site-container {
    width: min(100% - 64px, 1100px);
  }
}
@media (max-width: 767px) {
  .container,
  .g-container,
  .site-container {
    width: calc(100% - 32px);
    max-width: none;
  }
}

.g-page-hero.public-page-hero {
  position: relative;
  z-index: 1;
  padding-top: clamp(120px, 10vw, 156px);
}
/* Keep every public page hero clear of the fixed navigation bar. */
.g-page-hero {
  padding-top: max(150px, calc(var(--g-navbar-height, 68px) + 76px));
}
@media (max-width: 991px) {
  .g-page-hero.public-page-hero,
  .g-page-hero { padding-top: max(132px, calc(var(--g-navbar-height, 68px) + 64px)); }
}
@media (max-width: 767px) {
  .g-page-hero.public-page-hero,
  .g-page-hero { padding-top: calc(var(--g-navbar-height, 69px) + 44px); }
}

/* --- Sections --- */
.section { padding: 88px 0; }
.section--white { background: var(--g-white); }
.section--bg { background: var(--g-bg); }
.section--dark { background: var(--g-primary-dark); color: var(--g-white); }
@media (max-width: 1199px) { .section { padding: 64px 0; } }
@media (max-width: 767px) { .section { padding: 48px 0 36px; } }

/* --- Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--g-ease-out), transform .8s var(--g-ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal--delay-1 { transition-delay: .1s; }
.reveal--delay-2 { transition-delay: .2s; }
.reveal--delay-3 { transition-delay: .3s; }
.reveal--delay-4 { transition-delay: .4s; }
.reveal--left {
  opacity: 0; transform: translateX(-30px);
  transition: opacity .8s var(--g-ease-out), transform .8s var(--g-ease-out);
}
.reveal--left.is-visible { opacity: 1; transform: none; }
.reveal--right {
  opacity: 0; transform: translateX(30px);
  transition: opacity .8s var(--g-ease-out), transform .8s var(--g-ease-out);
}
.reveal--right.is-visible { opacity: 1; transform: none; }
.reveal--scale {
  opacity: 0; transform: scale(.94);
  transition: opacity .8s var(--g-ease-out), transform .8s var(--g-ease-out);
}
.reveal--scale.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--right, .reveal--scale {
    opacity: 1 !important; transform: none !important;
    transition: none !important;
  }
}

/* --- Preloader (kept off-screen; full-screen loading interstitial intentionally
     removed so normal browser refreshes load the page directly) --- */
.site-preloader {
  display: none;
}

/* --- Navbar ---
   --g-navbar-height: total rendered height of the fixed nav bar. Every
   hero/section that must clear it uses this single variable instead of a
   guessed constant, so the offset is applied exactly once. */
:root {
  --g-navbar-height: 69px; /* 40px logo + 28px vertical padding + 1px border */
}

.g-navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 0;
  background: #f3f6f4;
  border-bottom: 1px solid var(--g-line);
  box-shadow: var(--g-shadow-sm);
  transition: padding .35s var(--g-ease), box-shadow .35s var(--g-ease);
}
.g-navbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  width: min(100% - 128px, 1440px); max-width: 1440px; margin-inline: auto; padding-inline: 0;
  box-sizing: border-box;
}
.g-navbar__brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.g-navbar__logo {
  height: 40px; width: auto; object-fit: contain;
}
.g-navbar__brand-text {
  font-size: 1.05rem; font-weight: 700; color: var(--g-ink);
  letter-spacing: -.01em;
}
.g-navbar__links {
  display: flex; align-items: center; gap: 36px;
}
.g-navbar__links a {
  font-size: .9rem; font-weight: 500; color: var(--g-gray-600);
  position: relative; padding: 6px 0;
  letter-spacing: -.01em;
}
.g-navbar__links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--g-primary);
  border-radius: 2px; transition: width .25s var(--g-ease);
}
.g-navbar__links a:hover, .g-navbar__links a.is-active { color: var(--g-ink); }
.g-navbar__links a:hover::after, .g-navbar__links a.is-active::after { width: 100%; }
.g-navbar__links a.g-navbar__cta {
  position: relative;
  padding: 8px 20px;
  min-height: 50px;
  box-sizing: border-box;
}
.g-navbar__cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; min-height: 50px; padding: 8px 20px;
  border-radius: 13px; background: #087F5B; color: #fff !important;
  font-size: .875rem; font-weight: 600; white-space: nowrap;
  transition: all .25s var(--g-ease);
  box-shadow: 0 4px 14px rgba(8,127,91,.22);
  letter-spacing: -.01em;
}
/* The CTA is inside .g-navbar__links — suppress its underline so the
   generic link style doesn't draw an extra 2px bar under the button. */
.g-navbar__cta::after { display: none; }
.g-navbar__cta:hover { background: #06674A; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(8,127,91,.3); }
.g-navbar__cta:focus-visible {
  outline: 3px solid rgba(8,127,91,.45);
  outline-offset: 2px;
}
.g-navbar__cta .fa-arrow-right { transition: transform .25s var(--g-ease); }
.g-navbar__cta:hover .fa-arrow-right { transform: translateX(3px); }
.g-navbar__toggler {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; border: none; background: none;
}
.g-navbar__toggler span {
  display: block; width: 22px; height: 2px; background: var(--g-ink);
  border-radius: 2px; transition: transform .3s var(--g-ease), opacity .3s var(--g-ease);
}
.g-navbar__toggler.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.g-navbar__toggler.is-open span:nth-child(2) { opacity: 0; }
.g-navbar__toggler.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991px) {
  .g-navbar__inner { width: min(100% - 64px, 1100px); }
  .g-navbar__links {
    display: none; position: fixed; inset: 0; top: 0;
    background: rgba(243,246,244,.97); backdrop-filter: blur(24px);
    flex-direction: column; justify-content: center; gap: 28px;
    opacity: 0; visibility: hidden;
    transition: opacity .3s var(--g-ease), visibility .3s var(--g-ease);
    padding: 80px 24px;
  }
  .g-navbar__links.is-open { display: flex; opacity: 1; visibility: visible; }
  .g-navbar__links a { font-size: 1.5rem; font-weight: 600; }
  .g-navbar__cta { display: none; }
  .g-navbar__toggler { display: flex; position: relative; z-index: 1001; }
}

@media (max-width: 767px) {
  /* Mobile nav bar: 40px logo row + 12px top/bottom padding + 1px border.
     The 44px touch-target toggler is aligned to the logo row via negative
     margins so the bar itself stays at its natural 69px height instead of
     being inflated to 69+10px by an oversized in-flow child.
     --g-navbar-height mirrors this so the hero clears it exactly once. */
  :root { --g-navbar-height: 69px; }
  .g-navbar { padding: 12px 0; }
  .g-navbar__inner { width: calc(100% - 32px); }
  .g-navbar__logo { height: 34px; max-width: min(190px, 62vw); }
  .g-navbar__brand { align-self: center; }
  .g-navbar__links { padding: 88px 20px 32px; overflow-y: auto; }
  .g-navbar__links a { font-size: clamp(1.2rem, 6vw, 1.5rem); }
  .g-navbar__toggler { min-width: 44px; width: 44px; height: 44px; box-sizing: border-box; padding: 8px; justify-content: center; position: relative; top: -5px; }
  .g-btn { min-height: 44px; }
  .g-page-hero { padding-top: 112px !important; }
}
@media (min-width: 576px) and (max-width: 767px) {
  .g-navbar__inner { width: calc(100% - 32px); }
}

/* --- Section Heading --- */
.g-section-heading { max-width: 680px; margin-bottom: 56px; }
.g-section-heading__eyebrow {
  display: inline-block;
  font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--g-primary); background: var(--g-primary-50);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 18px;
}
.g-section-heading h2 {
  font-family: var(--g-font-display);
  font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 700;
  line-height: 1.1; letter-spacing: -.04em; color: var(--g-ink);
  margin-bottom: 18px;
}
.g-section-heading h2 em { color: var(--g-primary); font-style: normal; }
.g-section-heading p { color: var(--g-muted); font-size: 1.05rem; line-height: 1.7; max-width: 560px; }
.g-section-heading--center { text-align: center; margin-inline: auto; }
.g-section-heading--center p { margin-inline: auto; }

/* --- Buttons --- */
.g-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--g-radius);
  font-size: .925rem; font-weight: 600;
  transition: all .25s var(--g-ease);
  cursor: pointer; border: none;
  letter-spacing: -.01em;
}
.g-btn--primary {
  background: var(--g-primary); color: #fff;
  box-shadow: 0 4px 16px rgba(11,118,88,.22);
}
.g-btn--primary:hover { background: var(--g-primary-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(11,118,88,.28); }
.g-btn--outline {
  background: transparent; color: var(--g-primary);
  border: 1.5px solid var(--g-primary);
}
.g-btn--outline:hover { background: var(--g-primary-50); }
.g-btn--lg { padding: 16px 36px; font-size: 1rem; }
.g-btn__arrow { transition: transform .25s var(--g-ease); }
.g-btn:hover .g-btn__arrow { transform: translateX(4px); }

/* --- Cards --- */
.g-card {
  background: var(--g-white); border: 1px solid var(--g-line);
  border-radius: var(--g-radius-lg); padding: 28px;
  box-shadow: var(--g-shadow-xs);
  transition: transform .3s var(--g-ease), box-shadow .3s var(--g-ease), border-color .3s var(--g-ease);
}
.g-card:hover { transform: translateY(-4px); box-shadow: var(--g-shadow-md); border-color: var(--g-primary-200); }
.g-card__icon {
  width: 48px; height: 48px; border-radius: var(--g-radius);
  background: var(--g-primary-50); color: var(--g-primary);
  display: grid; place-items: center; font-size: 1.2rem;
  margin-bottom: 18px;
}
.g-card h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 8px; color: var(--g-ink); }
.g-card p { font-size: .9rem; color: var(--g-muted); line-height: 1.65; }

/* --- Technologies --- */
#technologies .container { display: flex; align-items: center; gap: 30px; }
.g-technologies__viewport { width: 100%; min-width: 0; overflow: clip; }
.g-technologies__track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 16px;
  animation: technologies-marquee 32s linear infinite;
  will-change: transform;
}
.g-technologies__viewport:hover .g-technologies__track,
.g-technologies__viewport:focus-within .g-technologies__track { animation-play-state: paused; }
@keyframes technologies-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.g-technologies__intro { width: 240px; flex: 0 0 240px; }
.g-technologies__intro .g-section-heading__eyebrow { display: block; margin-bottom: 10px; }
.g-technologies__intro h2 {
  margin: 0; color: var(--g-ink);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.25; letter-spacing: -.035em;
}
.g-technologies__intro h2 em { color: var(--g-primary); font-style: normal; }
.g-technology-card {
  width: 116px;
  height: 116px;
  min-width: 116px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--g-bg);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  transition: transform .28s var(--g-ease), background .28s var(--g-ease), border-color .28s var(--g-ease), box-shadow .28s var(--g-ease);
}
.g-technology-card:hover,
.g-technology-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--g-primary-200);
  background: var(--g-white);
  box-shadow: var(--g-shadow-sm);
}
.g-technology-card__media {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  padding: 4px;
  aspect-ratio: 1 / 1;
}
.g-technology-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(.15) contrast(1.04);
  opacity: .94;
  transition: filter .28s var(--g-ease), opacity .28s var(--g-ease), transform .28s var(--g-ease);
}
.g-technology-card:hover .g-technology-card__media img,
.g-technology-card:focus-within .g-technology-card__media img { filter: grayscale(0); opacity: 1; transform: scale(1.04); }
.g-technology-card__fallback {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--g-gray-500);
  background: var(--g-gray-100);
  font-size: 1.2rem;
}
.g-technology-card__flutter { width: 52px; height: 52px; display: block; }
@media (max-width: 991px) {
  #technologies .container { flex-direction: column; gap: 28px; text-align: center; }
  .g-technologies__intro { width: 100%; flex-basis: auto; }
  .g-technology-card__fallback,
  .g-technology-card__flutter { width: 46px; height: 46px; }
}
@media (max-width: 575px) {
  #technologies { padding-block: 44px; }
  .g-technology-card { width: 88px; height: 88px; min-width: 88px; }
  .g-technology-card__media { width: 70px; height: 70px; }
  .g-technology-card__fallback,
  .g-technology-card__flutter { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-technologies__track { animation: none; transform: none; }
  .g-technology-card { transition: none; }
}

/* --- Footer --- */
.g-footer { background: #F7FAF8; color: #26332E; padding: 80px 0 0; border-top: 1px solid #DCE6E0; }
.g-footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px;
  padding-bottom: 56px;
}
.g-footer__brand p { color: #66766F; font-size: .9rem; line-height: 1.7; margin-top: 16px; max-width: 300px; }
.g-footer__logo { width: 170px; height: 44px; object-fit: contain; object-position: left center; }
.g-footer__col h4 { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: #52655C; margin-bottom: 20px; }
.g-footer__col a { display: block; color: #34463E; font-size: .9rem; padding: 5px 0; transition: color .2s; }
.g-footer__col a:hover, .g-footer__col a:focus-visible { color: var(--g-primary); }
.g-footer__contact { color: #66766F; font-size: .9rem; line-height: 1.8; }
.g-footer__contact a { display: inline; color: #34463E; }
.g-footer__bottom {
  border-top: 1px solid #DCE6E0; padding: 24px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; color: #687970;
}
.g-footer__bottom a { color: #34463E; }
.g-footer__bottom a:hover, .g-footer__bottom a:focus-visible { color: var(--g-primary); }
.g-footer__social { display: flex; gap: 14px; margin-top: 18px; }
.g-footer__social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: #FFFFFF; color: #34463E; border: 1px solid #D8E3DD;
  display: grid; place-items: center; font-size: .9rem;
  transition: background .2s, border-color .2s, color .2s;
}
.g-footer__social a:hover, .g-footer__social a:focus-visible { background: var(--g-primary); border-color: var(--g-primary); color: #fff; }

@media (max-width: 991px) {
  .g-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 575px) {
  .g-footer__grid { grid-template-columns: 1fr; }
  .g-footer__logo { width: 150px; height: 40px; }
  .g-footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* --- Mobile Overlay --- */
.g-navbar__overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.3); opacity: 0;
  transition: opacity .3s var(--g-ease);
}
.g-navbar__overlay.is-open { display: block; opacity: 1; }
