/* ==========================================================================
   ================== AIWENS Header Styles (refactored) ==================
   ========================================================================== */
:root {
  --bg: #ffffff;
  --surface: rgba(255,255,255,0.8);
  --text: #111827;             /* gray-900 */
  --muted: #6b7280;            /* gray-500 */
  --border: #e5e7eb;           /* gray-200 */
  --accent: #2563eb;           /* brand blue */
  --accent-contrast: #ffffff;
  --highlight: #f97316;        /* orange (alt CTA) */
  --highlight-contrast: #ffffff;
  --shadow: 0 10px 30px rgba(17,24,39,0.08);
}

/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: ui-sans-serif, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* Logo */
.header-logo { height: 32px; width: auto; display: block; }

/* Container */
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ================== HEADER BAR ================== */
:root {
  --header-h: 64px; /* single source of truth */
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  backdrop-filter: saturate(180%) blur(10px);
  background: var(--surface);
  border-bottom: 1px solid rgba(229,231,235,0.6);
}

.header-row { height: var(--header-h); }
body { padding-top: var(--header-h); }

.site-header.scrolled { box-shadow: var(--shadow); }

.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | nav | cta/menu */
  align-items: center;
  height: 64px;
  gap: 12px;
}

/* Logo link */
.logo { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }

/* ================== NAVIGATION ================== */
.primary-nav { display: none; } /* default hidden; shown via media below */

.nav-list {
  display: flex; justify-content: center;
  gap: clamp(12px, 3vw, 28px);
  list-style: none; padding: 0; margin: 0;
}
.nav-link {
  padding: 10px 8px;
  border-radius: 8px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
/* Default hover (pill) */
.nav-list .nav-link:hover {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}
/* Active = thin underline when idle */
.nav-list .nav-link[aria-current="page"],
.nav-list .nav-link.active {
  border-bottom: 0 !important;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 2px;
  border-radius: 8px !important; /* so hover can still be pill */
}
/* Active on hover = same pill as others */
.nav-list .nav-link[aria-current="page"]:hover,
.nav-list .nav-link.active:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 8px !important;
  background-image: none !important;
}

/* ===== Desktop Dropdown (Services) ===== */
.has-submenu { position: relative; }
.submenu {
  /* hidden by default; shown via hover/focus (media below) */
  display: none;
  position: absolute; top: 100%; left: 0;
  transform: translateY(8px);      /* visual offset, no hover gap */
  z-index: 9999;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  list-style: none; margin: 0; padding: 6px 0;
}
.submenu-link {
  display: block; padding: 10px 14px;
  font-weight: 500; color: #374151;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.submenu-link:hover { background: var(--accent); color: #fff; }

/* Prevent clipping */
.site-header, .header-row, .container { overflow: visible; }

/* Show submenu on hover & focus (desktop only) + bridge hover gap */
@media (min-width: 1025px) {
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu { display: block; }
  .has-submenu::after { content:""; position:absolute; left:0; right:0; top:100%; height:12px; }
}

/* Hide button/chevron artifacts (desktop no longer uses them) */
.submenu-toggle, .chevron { display: none !important; }

/* ================== CTA BUTTONS ================== */
.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbf9f9;
  font-weight: 600;
  line-height: 1;
  min-height: 44px;
  cursor: pointer;
}

/* Canonical CTA: ORANGE everywhere */
.btn.cta {
  background: var(--highlight);
  color: var(--highlight-contrast);
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
  transition: filter .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn.cta:hover { filter: brightness(0.95); }
.btn.cta:active { transform: translateY(1px); }
.btn.block { display: block; text-align: center; width: 100%; }

/* Mobile drawer CTA gets an orange glow */
.menu-ctas .btn.cta {
  font-size: 16px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(249,115,22,0.25); /* orange shadow */
}

.header-cta { display: flex; align-items: center; gap: 8px; }

/* ================== HAMBURGER ICON (mobile) ================== */
/* Pill hamburger (blue, 80% transparency), mobile-only via media rules below */
.menu-btn {
  align-items: center; justify-content: center;
  width: 48px; height: 44px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.8);
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.menu-btn:hover, .menu-btn:active { background: rgba(37,99,235,1); transform: scale(1.05); }
.menu-icon, .menu-icon::before, .menu-icon::after {
  content: ""; display: block;
  width: 22px; height: 2px; background: #fff; border-radius: 2px;
}
.menu-icon::before, .menu-icon::after { position: relative; }
.menu-icon::before { top: -6px; }
.menu-icon::after  { top:  6px; }

/* ================== MOBILE MENU PANEL ================== */
.mobile-menu[hidden] { display: none; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 40px;
}
.scrim { position: absolute; inset: 0; background: rgba(17,24,39,0.5); border: 0; }
.menu-panel {
  position: relative;
  width: min(560px, calc(100% - 32px));
  background: #fff; border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  padding: 24px 20px; display: grid; gap: 14px;
  transform: translateY(-20px); opacity: 0;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), opacity 200ms ease;
}
.mobile-menu[data-state="open"] .menu-panel { transform: translateY(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .menu-panel { transition: opacity 150ms linear !important; transform: none !important; } }

.mobile-nav { display: grid; gap: 10px; margin-top: 8px; }
.mobile-link {
  display: block; padding: 14px 16px; border-radius: 10px;
  background: #f9fafb; font-weight: 600; font-size: 16px; color: #111827;
  transition: background 0.2s, transform 0.15s;
}
.mobile-link:hover { background: #f3f4f6; transform: translateX(2px); }
.mobile-link[aria-current="page"], .mobile-link.active { background: var(--accent); color: #fff; }

.menu-ctas { display: grid; gap: 10px; margin-top: 16px; }

/* ================== MOBILE: Services accordion ================== */
.mobile-accordion { display: grid; gap: 8px; }
.mobile-accordion-row {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  background:#f9fafb; border:1px solid #e5e7eb; border-radius:12px; padding:6px;
}
.mobile-accordion-link {
  flex:1 1 auto; display:block; padding:12px; border-radius:10px;
  font-weight:700; font-size:16px; color:#111827;
}
.mobile-accordion-link:hover { background:#f3f4f6; }
.mobile-accordion-toggle {
  flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border:1px solid #e5e7eb; border-radius:10px;
  background:#fff; cursor:pointer;
  transition:transform .15s ease, background .15s ease;
}
.mobile-accordion-toggle:hover { background:#f9fafb; }
.mobile-accordion-toggle:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.mobile-accordion-toggle .chev {
  width:12px; height:12px; border-right:2px solid currentColor; border-bottom:2px solid currentColor;
  transform:rotate(45deg); transition:transform .18s ease;
}
.mobile-accordion-toggle[aria-expanded="true"] .chev { transform:rotate(-135deg); }

.mobile-submenu {
  list-style:none; margin:8px 0 0; padding:8px;
  border:1px solid #e5e7eb; border-radius:12px; background:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  display:grid; gap:8px; overflow:hidden;
  max-height:0; opacity:0; transition:max-height .25s ease, opacity .18s ease;
}
.mobile-submenu[hidden]    { display:grid; max-height:0; opacity:0; border-color:transparent; box-shadow:none; }
.mobile-submenu.is-open    { max-height:500px; opacity:1; }
.mobile-sublink {
  display:block; padding:12px; border-radius:10px; font-weight:600; color:#374151;
  transition: background .15s ease, transform .12s ease;
}
.mobile-sublink:hover { background:#f9fafb; }
.mobile-sublink:active { transform: scale(0.99); }
.mobile-sublink:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* ================== ACCESSIBILITY FOCUS ================== */
.nav-link:focus-visible,
.submenu-link:focus-visible,
.mobile-link:focus-visible,
.mobile-sublink:focus-visible,
.mobile-accordion-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ================== RESPONSIVE VISIBILITY (single source of truth) ================== */
@media (min-width: 1025px) {       /* desktop & large laptop */
  .primary-nav { display: block !important; }
  .menu-btn    { display: none  !important; }
}
@media (max-width: 1024px) {       /* mobile & tablet */
  .primary-nav { display: none        !important; }
  .menu-btn    { display: inline-flex !important; }
}

/* Mobile accordion: no extra gap when Services is collapsed */
.mobile-accordion { gap: 8px; } /* keep your nice spacing when open */
.mobile-submenu[hidden] {
  display: none !important;   /* eliminate the extra grid track */
  margin-top: 0 !important;   /* no phantom space */
  padding: 0;
  border: 0;
  box-shadow: none;
}
/* When visible, keep the intended spacing above it */
.mobile-submenu { margin-top: 8px; }

/* == Mobile layout: hide header CTA, center logo, keep hamburger right == */
@media (max-width: 1024px) {
  /* 1) Hide the orange CTA in the header (it stays inside the drawer) */
  .header-cta .btn.cta { 
    display: none !important; 
  }

  /* 2) Re-grid: left spacer | centered logo | right actions */
  .header-row {
    grid-template-columns: 1fr auto 1fr;   /* spacer | logo | actions */
    gap: 8px;
  }

  /* 3) Put logo in the middle column and center it */
  .logo {
    grid-column: 2;
    justify-self: center;
  }

  /* 4) Keep the hamburger aligned right */
  .header-cta {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
  }
}
#pricing-submenu-desktop.submenu {
  min-width: 240px; /* ensures enough width for longer labels */
}


/* ============================
header toggle fixes - 3rd oct 
===================================*/

/* Put the mobile dialog directly below the fixed header */
.mobile-menu {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  /* respect header height + iOS safe area */
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  z-index: 999;                 /* below .site-header (1000) so header stays visible */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* no arbitrary 40px; we’re anchoring by top now */
  padding: 12px 0 24px;
}

/* the panel animation remains the same */
.menu-panel { transform: translateY(-12px); }

/* prevent the page behind from scrolling when menu is open */
body.menu-open { overflow: hidden; }

/* optional: subtle divider under header while menu is open */
body.menu-open .site-header { box-shadow: var(--shadow); }

/* ============== HAMBURGER TO X TRANSITION ============== */
.menu-btn.is-open .menu-icon {
  background: transparent; /* middle line disappears */
}
.menu-btn.is-open .menu-icon::before {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-btn.is-open .menu-icon::after {
  transform: rotate(-45deg) translate(5px, -5px);
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  transition: transform 0.25s ease, background 0.25s ease;
}



/* ==========================================================================
   ================== Footer ==================
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-band { background: #f9fafb; }

/* Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px 0;
  align-items: start;
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr; /* company | links | policies | social */
    gap: 32px;
  }
}

/* Company */
.company .logo { display: inline-flex; align-items: center; gap: 10px; }
.footer-logo { display: block; height: 28px; width: auto; }
.company .mission { margin: 8px 0 0; color: var(--muted); }

/* Lists */
.col-title { margin: 0 0 8px; font-size: 16px; color: #111827; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Social row */
.direct-social .social-row {
  display: flex;
  align-items: center;
  justify-content: center;        /* centered on mobile */
  gap: 14px;
  flex-wrap: wrap;                /* allow wrap on small screens */
}
/* Force single line on desktop */
@media (min-width: 1024px) {
  .direct-social .social-row {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
  }
}
/* Icon circles */
.direct-social .social-row a {
  display: inline-flex;
  width: 42px; height: 42px;
  border-radius: 50%;
  justify-content: center; align-items: center;
  color: #fff; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.direct-social .social-row a:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}
/* Brand backgrounds */
.direct-social a.email    { background:#6b7280; }
.direct-social a.upwork   { background:#6fda44; }
.direct-social a.linkedin { background:#0a66c2; }
.direct-social a.youtube  { background:#ff0000; }
/* Font Awesome glyph sizes */
.direct-social .social-row i { font-size: 18px; line-height: 1; }
/* Copyright row spans full width */
.footer-grid > p {
  grid-column: 1 / -1;
  text-align: center;
  padding: 12px 0 14px;
  border-top: 1px solid var(--border);
  color: #6b7280; font-size: 14px; margin-top: 8px;
}

/* ==========================================================
   Footer links — animated underline only
   ========================================================== */
.link-list a {
  position: relative;
  display: inline-block;
  padding-bottom: 2px; /* space for underline */
  transition: color .2s ease;
}

.link-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #2563eb, #22c55e, #2563eb);
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
  opacity: 0.9;
  border-radius: 2px;
}

.link-list a:hover::after,
.link-list a:focus-visible::after {
  transform: scaleX(1);
  animation: footer-underline-move 1.6s linear infinite;
}

@keyframes footer-underline-move {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}


/* ==========================================================
   GLOBAL TYPOGRAPHY SYSTEM
   Goal: Rich, modern type that looks consistent everywhere
   (fonts + sizes + line-heights only, no colors touched)
   ========================================================== */

:root {
  /* Font families */
  --font-heading: "Poppins", "Inter", "Segoe UI", sans-serif;
  --font-body: "Inter", "Roboto", "Segoe UI", sans-serif;

  /* Type scale */
  --font-size-small: 15px;   /* nav, footer, forms */
  --font-size-base: 16px;    /* base text */
  --font-size-body: 17px;    /* paragraphs */
  --font-size-large: 20px;   /* hero / lead */
  --font-size-h1: clamp(34px, 5vw, 52px);
  --font-size-h2: clamp(26px, 3.5vw, 36px);
  --font-size-h3: clamp(22px, 2.8vw, 28px);
}

/* Body baseline */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
}

/* Paragraphs */
p {
  font-size: var(--font-size-body);
  line-height: 1.7;
  margin-bottom: 1.1em;
  font-family: var(--font-body);
}
p:last-child { margin-bottom: 0; }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
}
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

/* Nav + Menus */
nav, .site-nav, .menu, .header-nav {
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase; /* optional for nav richness */
  letter-spacing: 0.5px;     /* gives a premium look */
}

/* Footer */
footer, .site-footer {
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  line-height: 1.5;
}

/* Forms */
form, input, select, textarea, label, button {
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  line-height: 1.5;
  font-weight: 500;
}
