/* ==========================================================================
   FOLISTECH theme — base styles
   ========================================================================== */

:root {
  --c-navy: #1a2a4f;
  --c-navy-2: #14224a;
  --c-navy-deep: #0d1a36;
  --c-ink: #0c182b;
  --c-body: #4a586f;
  --c-muted: #697893;
  --c-line: #e5e9f0;
  --c-soft: #f4f6fa;
  --c-soft-2: #eef2f8;
  --c-blue: #2f6bff;
  --c-blue-soft: #eaf1ff;
  --c-white: #ffffff;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --shadow-sm: 0 4px 16px rgba(13, 26, 54, 0.06);
  --shadow: 0 18px 48px rgba(13, 26, 54, 0.1);
  --shadow-lg: 0 30px 80px rgba(13, 26, 54, 0.14);
  --container: 1280px;
  --header-h: 88px;
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-body);
  background: var(--c-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--c-blue); }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  color: var(--c-ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

html { scroll-padding-top: 110px; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Inline (sidebar / FAQ) inquiry form: stack the field row */
.quote-card .inquiry__row { grid-template-columns: 1fr; gap: 0; }
.quote-card .field { margin-bottom: 14px; }
.quote-card .inquiry__foot { flex-direction: column; align-items: stretch; gap: 12px; }
.quote-card .field--file { max-width: none; }
.quote-card .btn { width: 100%; }

.avatar-initial {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a2a4f, #2f6bff);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.avatar-initial--lg { width: 84px; height: 84px; font-size: 24px; margin: 0 auto 14px; }

.screen-reader-text {  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}
.container--narrow { max-width: 980px; }

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */
.kicker {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.section-title {
  font-size: clamp(32px, 3.3vw, 46px);
  line-height: 1.12;
  margin-bottom: 18px;
}
.section-title--sm { font-size: clamp(28px, 2.6vw, 38px); }
.section-lead {
  max-width: 720px;
  font-size: 16px;
  color: var(--c-body);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 44px;
}
.section-head--stack { display: block; }

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--soft { background: var(--c-soft); }
.section--navy { background: var(--c-navy); color: #fff; }
.section--navy .section-title,
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--c-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover {
  background: var(--c-navy-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(13, 26, 54, 0.22);
}
.btn .btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn--light { background: #fff; color: var(--c-ink); }
.btn--light:hover { background: #fff; color: var(--c-navy); }
.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.btn--outline {
  background: transparent;
  border-color: var(--c-line);
  color: var(--c-ink);
}
.btn--outline:hover { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.btn--sm { padding: 12px 22px; font-size: 14px; }
.btn--lg { padding: 18px 34px; font-size: 16px; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
}
.link-arrow svg { transition: transform 0.25s var(--ease); }
.link-arrow:hover { color: var(--c-blue); }
.link-arrow:hover svg { transform: translate(3px, -3px); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
  border-bottom: 1px solid rgba(13, 26, 54, 0.07);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 10px 30px rgba(13, 26, 54, 0.08); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { width: auto; height: 52px; }
.brand .brand-logo { height: 54px; width: auto; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-size: 22px; letter-spacing: 0.06em; color: var(--c-ink); }
.brand__text span { font-size: 12px; letter-spacing: 0.18em; color: var(--c-muted); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink);
  border-radius: 999px;
}
.main-nav a:hover { color: var(--c-blue); }
.main-nav li.current-menu-item > a,
.main-nav li.current_page_item > a { color: var(--c-blue); }

.has-mega { position: relative; }
.has-mega > a .chev { transition: transform 0.25s var(--ease); }
.has-mega:hover > a .chev { transform: rotate(180deg); }

.mega {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  width: min(1080px, 86vw);
  transform: translate(-50%, 12px);
  padding: 34px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 0.9fr;
  gap: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  z-index: 20;
}
/* Invisible bridge across the gap between the nav item and the panel,
   so moving the cursor down into the menu never drops the hover state. */
.mega::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
}
.has-mega:hover .mega,
.has-mega.is-hover .mega,
.has-mega:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.mega__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 12px;
}
.mega ul li a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-body);
  border-radius: 0;
}
.mega ul li a:hover { color: var(--c-blue); padding-left: 4px; }
.mega ul li a::before { content: none; }

.header-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--c-ink);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { background: var(--c-soft); color: var(--c-blue); }
.header-cta { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: #fff;
  padding: 0 12px;
}
.nav-toggle span { height: 2px; background: var(--c-ink); border-radius: 2px; transition: 0.3s var(--ease); }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  background: rgba(9, 18, 38, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-overlay__box {
  width: min(760px, 90vw);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px;
  transform: translateY(-16px);
  transition: transform 0.3s var(--ease);
}
.search-overlay.is-open .search-overlay__box { transform: none; }
.search-overlay h3 { font-size: 22px; margin-bottom: 16px; }
.search-overlay form { display: flex; gap: 10px; }
.search-overlay input[type="search"] {
  flex: 1;
  height: 56px;
  padding: 0 20px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-soft);
  color: var(--c-ink);
  outline: none;
}
.search-overlay input[type="search"]:focus { border-color: var(--c-navy); background: #fff; }

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  background: var(--c-navy);
  color: #fff;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  opacity: 0.55;
}
.page-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 26, 54, 0.92) 0%, rgba(13, 26, 54, 0.66) 52%, rgba(13, 26, 54, 0.28) 100%);
}
.page-hero__inner { position: relative; z-index: 2; max-width: 820px; }
.page-hero h1 { font-size: clamp(34px, 4vw, 58px); color: #fff; margin-bottom: 20px; }
.page-hero p { max-width: 640px; font-size: 17px; color: rgba(255, 255, 255, 0.82); margin-bottom: 12px; }
.page-hero .btn { margin-top: 26px; }
.page-hero--light { background: #eef1f7; color: var(--c-ink); }
.page-hero--light .page-hero__bg::after { background: linear-gradient(90deg, rgba(238, 241, 247, 1) 0%, rgba(238, 241, 247, 0.97) 42%, rgba(238, 241, 247, 0.55) 62%, rgba(238, 241, 247, 0) 82%); }
.page-hero--light .page-hero__inner { max-width: 680px; }
.page-hero--light h1 { color: var(--c-ink); }
.page-hero--light p { color: var(--c-body); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.6); margin-bottom: 20px; }
.breadcrumb a:hover { color: #fff; }
.page-hero--light .breadcrumb { color: var(--c-muted); }
.page-hero--light .breadcrumb a:hover { color: var(--c-ink); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: #000; color: #96a0b3; padding: 72px 0 0; font-size: 14px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer-brand img { height: 60px; width: auto; margin-bottom: 22px; }
.footer-brand .brand-logo { height: 62px; width: auto; display: block; margin-bottom: 22px; }
.footer-brand p { color: #8d97a9; font-size: 13.5px; line-height: 1.8; max-width: 340px; }
.footer-col h4 {
  margin: 6px 0 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: #9aa4b6; font-size: 13.5px; }
.footer-col a:hover { color: #fff; }
.footer-contact { display: grid; gap: 14px; }
.footer-contact li { display: flex; gap: 12px; color: #9aa4b6; font-size: 13.5px; line-height: 1.6; }
.footer-contact svg { flex-shrink: 0; margin-top: 3px; color: #6d7a92; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 12.5px;
  color: #7b869b;
}
.footer-bottom a { color: #7b869b; }
.footer-bottom a:hover { color: #fff; }

.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-navy);
  color: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.3s var(--ease);
}
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* floating contact rail */
.float-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 80;
  display: grid;
  gap: 2px;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform: translateY(-50%);
}
.float-rail a, .float-rail button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5d6b85;
}
.float-rail a:hover, .float-rail button:hover { background: var(--c-soft); color: var(--c-navy); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field > span {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  color: var(--c-ink);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: #9aa5b8; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--c-navy); box-shadow: 0 0 0 4px rgba(26, 42, 79, 0.07); }
.field textarea { min-height: 132px; resize: vertical; }
.field--file { position: relative; }
.field--file input[type="file"] { padding: 12px 14px; font-size: 13px; }
.form-note { font-size: 12.5px; color: var(--c-muted); margin-top: 12px; }
.form-alert {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  background: #e8f7ef;
  color: #16653f;
  border: 1px solid #bfe8d2;
}
.form-alert--error { background: #fdecec; color: #8b1d1d; border-color: #f6c6c6; }

/* --------------------------------------------------------------------------
   Cards / utilities
   -------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .container { padding: 0 28px; }
  .main-nav a { padding: 10px 12px; }
}

@media (max-width: 1024px) {
  :root { --header-h: 76px; }
  .section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 95;
    display: block;
    padding: 24px;
    background: #fff;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
  }
  .nav-open .main-nav { transform: none; }
  .main-nav > ul { display: block; }
  .main-nav > ul > li { border-bottom: 1px solid var(--c-line); }
  .main-nav > ul > li > a { display: flex; justify-content: space-between; padding: 16px 4px; font-size: 15px; }
  .mega {
    position: static;
    width: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    box-shadow: none;
    padding: 4px 0 16px;
    grid-template-columns: 1fr;
    gap: 18px;
    border-radius: 0;
  }
  .has-mega.is-open .mega { display: grid; }
  .header-tools .header-cta { display: none; }
  .float-rail { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .container { padding: 0 20px; }
  .section { padding: 56px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 20px; }
  .page-hero { padding: 64px 0 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .brand img { height: 44px; }
  .brand .brand-logo { height: 44px; }
}
