/**
 * Syxflow Layout & Base Structure
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--syx-font-family);
  background-color: var(--syx-bg-subtle);
  color: var(--syx-text-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  padding-top: var(--syx-header-height);
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--syx-text-headline);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw + 0.5rem, 2.85rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h3 {
  font-size: clamp(1.25rem, 2vw + 0.25rem, 1.65rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--syx-duration-fast) var(--syx-ease-out);
}

img, svg, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Containers */
.syx-container {
  width: 100%;
  max-width: var(--syx-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.syx-container-wide {
  width: 100%;
  max-width: var(--syx-container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.syx-container-narrow {
  width: 100%;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Section Wrapper */
.syx-section {
  padding: 100px 0;
  position: relative;
}

.syx-section-alt {
  background-color: var(--syx-white);
  border-top: 1px solid var(--syx-border-subtle);
  border-bottom: 1px solid var(--syx-border-subtle);
}

.syx-section-dark {
  background: radial-gradient(circle at 50% 0%, #03234d 0%, #01142f 100%);
  color: var(--syx-slate-300);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.syx-section-dark h2,
.syx-section-dark h3,
.syx-section-dark h4 {
  color: var(--syx-white);
}

/* Section Headers */
.syx-section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 60px auto;
}

.syx-section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.syx-section-title {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.syx-section-description {
  font-size: 1.15rem;
  color: var(--syx-text-muted);
  line-height: 1.65;
  font-weight: 400;
}

.syx-section-dark .syx-section-description {
  color: var(--syx-slate-300);
}

/* Persistent Navigation Header (Always fixed as user scrolls down and explores) */
.syx-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--syx-header-height);
  z-index: 9999;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px -2px rgba(1, 32, 72, 0.06);
  transition: background-color var(--syx-duration-base) var(--syx-ease-out),
              box-shadow var(--syx-duration-base) var(--syx-ease-out),
              top var(--syx-duration-fast) ease;
}

/* WordPress Admin Bar Integration */
body.admin-bar .syx-site-header {
  top: 32px;
}
body.admin-bar .syx-mobile-drawer {
  top: calc(var(--syx-header-height) + 32px);
  height: calc(100vh - var(--syx-header-height) - 32px);
}
@media screen and (max-width: 782px) {
  body.admin-bar .syx-site-header {
    top: 46px;
  }
  body.admin-bar .syx-mobile-drawer {
    top: calc(var(--syx-header-height) + 46px);
    height: calc(100vh - var(--syx-header-height) - 46px);
  }
}

.syx-site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 24px -2px rgba(1, 32, 72, 0.1);
}

.syx-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--syx-header-height);
  flex-wrap: nowrap !important;
  gap: 1.25rem;
}

/* Brand Logo */
.syx-brand-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.syx-brand,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.syx-brand-logo-img,
.custom-logo {
  height: 48px;
  max-height: 52px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
  transition: transform var(--syx-duration-fast) var(--syx-ease-out);
}

.syx-brand:hover .syx-brand-logo-img,
.custom-logo-link:hover .custom-logo {
  transform: translateY(-1px);
}

.syx-footer-logo-img {
  height: 48px;
  max-height: 52px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Desktop Navigation Menu */
.syx-nav-desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.syx-nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap !important;
  gap: clamp(0.75rem, 1.4vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap !important;
}

.syx-nav-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.syx-nav-link,
.syx-nav-menu li a {
  display: inline-block;
  font-size: 0.915rem;
  font-weight: 500;
  color: var(--syx-slate-700);
  padding: 0.45rem 0.4rem;
  position: relative;
  white-space: nowrap !important;
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color var(--syx-duration-fast) var(--syx-ease-out);
}

.syx-nav-link:hover,
.syx-nav-menu li a:hover,
.syx-nav-link.active,
.syx-nav-menu li.current-menu-item > a {
  color: var(--syx-navy-900);
  font-weight: 600;
}

.syx-nav-link::after,
.syx-nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.4rem;
  right: 0.4rem;
  width: auto;
  height: 2px;
  background: linear-gradient(90deg, var(--syx-blue-600), var(--syx-cyan-400));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--syx-duration-base) var(--syx-ease-out);
}

.syx-nav-link:hover::after,
.syx-nav-menu li a:hover::after,
.syx-nav-link.active::after,
.syx-nav-menu li.current-menu-item > a::after {
  transform: scaleX(1);
}

.syx-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.syx-btn-platform-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--syx-navy-900);
  padding: 0.55rem 0.9rem;
  border-radius: var(--syx-radius-sm);
  border: 1px solid var(--syx-border-subtle);
  background-color: var(--syx-white);
  white-space: nowrap;
  transition: all var(--syx-duration-fast) var(--syx-ease-out);
}

.syx-btn-platform-link:hover {
  color: var(--syx-blue-600);
  border-color: var(--syx-blue-400);
  background-color: var(--syx-cyan-100);
  transform: translateY(-1px);
}

.syx-header-actions .syx-btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Mobile Toggle Hamburger */
.syx-mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: var(--syx-slate-100);
  border: 1px solid var(--syx-border-subtle);
  border-radius: var(--syx-radius-sm);
  cursor: pointer;
  padding: 0;
  color: var(--syx-navy-900);
  transition: all var(--syx-duration-fast) var(--syx-ease-out);
}

.syx-mobile-toggle:hover {
  background: var(--syx-slate-200);
  border-color: var(--syx-slate-300);
}

.syx-hamburger-box {
  width: 20px;
  height: 14px;
  position: relative;
  display: block;
}

.syx-hamburger-inner,
.syx-hamburger-inner::before,
.syx-hamburger-inner::after {
  width: 20px;
  height: 2px;
  background-color: var(--syx-navy-900);
  border-radius: 2px;
  position: absolute;
  transition: all var(--syx-duration-base) var(--syx-ease-out);
}

.syx-hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}

.syx-hamburger-inner::before {
  content: '';
  top: -6px;
  left: 0;
}

.syx-hamburger-inner::after {
  content: '';
  top: 6px;
  left: 0;
}

.syx-mobile-toggle.is-active .syx-hamburger-inner {
  background-color: transparent;
}

.syx-mobile-toggle.is-active .syx-hamburger-inner::before {
  transform: translateY(6px) rotate(45deg);
}

.syx-mobile-toggle.is-active .syx-hamburger-inner::after {
  transform: translateY(-6px) rotate(-45deg);
}

.syx-hamburger-icon {
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.syx-hamburger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--syx-navy-900);
  border-radius: 2px;
  transition: all var(--syx-duration-base) var(--syx-ease-out);
}

/* Mobile Nav Drawer */
.syx-mobile-drawer {
  position: fixed;
  top: var(--syx-header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--syx-header-height));
  background-color: var(--syx-white);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all var(--syx-duration-base) var(--syx-ease-out);
  z-index: 9998;
  overflow-y: auto;
}

.syx-mobile-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.syx-mobile-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.syx-mobile-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--syx-navy-900);
  display: block;
  padding: 0.5rem 0;
}

/* Footer Layout */
.syx-site-footer {
  background-color: var(--syx-navy-950);
  color: var(--syx-slate-400);
  padding: 80px 0 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.syx-footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3.5rem;
  margin-bottom: 60px;
}

.syx-footer-brand-col {
  max-width: 360px;
}

.syx-footer-logo {
  margin-bottom: 1.25rem;
}

.syx-footer-tagline {
  color: var(--syx-slate-300);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.syx-footer-subtext {
  font-size: 0.9rem;
  color: var(--syx-slate-400);
  line-height: 1.5;
}

.syx-footer-heading {
  color: var(--syx-white);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.syx-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.syx-footer-links a {
  font-size: 0.9rem;
  color: var(--syx-slate-400);
}

.syx-footer-links a:hover {
  color: var(--syx-cyan-400);
}

.syx-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Contact Email Badge & Footer Link */
.syx-direct-email-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  font-size: 0.95rem;
  color: var(--syx-slate-600);
}

.syx-direct-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--syx-blue-600);
  background: rgba(0, 82, 204, 0.06);
  border: 1px solid rgba(0, 82, 204, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: var(--syx-radius-full);
  transition: all var(--syx-duration-fast) var(--syx-ease-out);
}

.syx-direct-email-link:hover {
  background: rgba(0, 82, 204, 0.12);
  color: var(--syx-navy-900);
  transform: translateY(-1px);
}

.syx-footer-email-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.syx-footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--syx-cyan-400);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--syx-duration-fast) var(--syx-ease-out);
}

.syx-footer-email-link:hover {
  color: var(--syx-white);
  transform: translateX(2px);
}
