/* ==========================================================================
   ================== HEAD PART ==================
   AIWENS — Base Design Tokens
   ========================================================================== */
: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 (primary CTA) */
  --accent-contrast: #ffffff;
  --highlight: #f97316;        /* orange (Explore Services) */
  --highlight-contrast: #ffffff;
  --shadow: 0 10px 30px rgba(17,24,39,0.08);

  /* Hero honeycomb sizing */
  --hex-size: 120px;           /* base hex width */
  --hex-gap: 18px;             /* space between hexes */
}

/* Header Logo Image */
.header-logo {
  height: 32px;   /* fits well in navbar */
  width: auto;
  display: block;
}


/* ==========================================================================
   ================== SUB HEAD PARTS ==================
   Reset, Accessibility, Container, Hover
   ========================================================================== */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  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;
  text-rendering: optimizeLegibility;
}

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

/* No global underline; scope hover styles below */
a { color: inherit; text-decoration: none; }

/* Header Hover Setup (nav only) */
.site-header .nav-link {
  border-radius: 6px;
  padding: 6px 10px;
  transition: background 0.2s, color 0.2s;
}
.site-header .nav-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* Footer Hover Setup (animated underline) */
.site-footer a { position: relative; text-decoration: none; }
.site-footer a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.site-footer a:hover::after { width: 100%; }

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

/* Accessibility Helpers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip link (appears on keyboard focus) */
.skip-link {
  position: absolute;
  left: 8px; top: 8px;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 12px;
  border-radius: 8px;
  z-index: 60;
}
.skip-link:focus { transform: translateY(0); }

/* ==========================================================================
   ================== SUB BODY PARTS ==================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-weight: 600;
  line-height: 1;
  min-height: 44px;            /* tap target */
  text-decoration: none;
}
.btn.cta {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}
.btn.cta:hover { filter: brightness(0.95); text-decoration: none; }

.btn.explore {
  background: var(--highlight);
  color: var(--highlight-contrast);
  border: none;
}
.btn.explore:hover { filter: brightness(0.9); text-decoration: none; }

.btn.ghost { background: transparent; }
.btn.block { display: block; text-align: center; }

/* ==========================================================================
   ================== BODY PART 1 ==================
   Header (Sticky Top Bar)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  background: var(--surface);
  border-bottom: 1px solid rgba(229,231,235,0.6);
}
.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;
}

/* Header Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.logo:hover { text-decoration: none; }
.logo .logo-rect { fill: #111827; }
.logo .logo-mark { color: #ffffff; }
.logo.small .logo-rect { fill: #111827; }
.logo-text { font-weight: 800; letter-spacing: 0.5px; }

/* Primary Navigation */
.primary-nav { display: none; } /* hidden by default */

/* Show full nav only on large screens */
@media (min-width: 1025px) {
  .primary-nav { display: block; }
  .menu-btn { display: none; }
}

/* Ensure hamburger visible on tablet & mobile */
@media (max-width: 1024px) {
  .primary-nav { display: none; }
  .menu-btn { display: inline-grid; }
}

.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;
}
.nav-link[aria-current="page"] {
  color: #111827;
  font-weight: 800;
  border-bottom: 2px solid #111827;
}
.header-cta { display: flex; align-items: center; gap: 8px; }

/* Hamburger Icon (mobile & tablet) */
.menu-btn { display: inline-grid; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  content: ""; display: block; width: 20px; height: 2px; background: #111827; border-radius: 2px;
}
.menu-icon::before, .menu-icon::after { position: relative; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }

/* ==========================================================================
   ================== BODY PART 2 ==================
   Mobile Menu
   ========================================================================== */
.mobile-menu[hidden] { display: none; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;

  /* flexbox centers horizontally, sticks to top */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 40px; /* breathing room from top */
}

.scrim {
  position: absolute;
  inset: 0;
  background: rgba(17,24,39,0.5);
  border: 0;
}

/* Panel */
.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;

  /* Start slightly above, hidden */
  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;   /* bigger gaps between links */
  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;       /* subtle gray hover */
  transform: translateX(2px); /* tiny nudge right */
}

.mobile-link[aria-current="page"] {
  background: var(--accent);
  color: #fff;
  outline: none;
}

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

.menu-ctas .btn.cta {
  font-size: 16px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}

/* ==========================================================================
   About Us – Who We Are & What We Do
   ========================================================================== */
.about-section {
  padding: clamp(56px, 8vw, 100px) 0;
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* text gets 60%, image 40% */
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
}

/* Default (Who We Are) → text left, image right */
.who-we-are .about-text { order: 1; }
.who-we-are .about-image { order: 2; }

/* Reverse (What We Do) → image left, text right */
.what-we-do .about-text { order: 2; }
.what-we-do .about-image { order: 1; }

/* Text styling */
.about-text h1,
.about-text h2 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 800;
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  position: relative;
  display: inline-block; /* needed for underline */
}

/* Underline for headings */
.about-text h1::after,
.about-text h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 10px auto 0; /* centers underline below heading */
}

/* Paragraph text */
.about-text p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

/* List styling for What We Do */
.about-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.about-text ul li {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  box-shadow: var(--shadow);
}
.about-text ul li strong {
  color: var(--accent);
  display: inline-block;
  margin-bottom: 4px;
}

/* Images */
.about-image img {
  width: 100%;
  max-width: 400px; /* 👈 try 400–450px for balance */
  margin: 0 auto;   /* centers image in its grid column */
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .who-we-are .about-text,
  .what-we-do .about-text { order: 2; }
  .who-we-are .about-image,
  .what-we-do .about-image { order: 1; }
}

/* ==========================================================================
   About Us – Our Mission
   ========================================================================== */
.mission-section {
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
  padding: clamp(72px, 10vw, 120px) 20px;
  text-align: center;   /* centers text and children */
}

.mission-inner {
  max-width: 800px;
  margin-inline: auto;  /* centers horizontally */
}

.mission-section h2 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin: 0 0 12px;
  position: relative;
  display: inline-block; /* keeps divider under the text */
}

/* Divider under the heading */
.mission-section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 12px auto 0;
}

.mission-section p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.7;
  margin: 20px auto 0;
  max-width: 65ch;  /* keeps text nicely readable */
}



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

/* Footer grid (mobile-first) */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;       /* stack on mobile */
  gap: 16px;
  padding: 16px 0;
  align-items: start;
}

/* ================== SUB TAIL PARTS ================== */
/* Company block */
.company .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;                       /* override any small variant padding */
}
.footer-logo {
  display: block;
  height: 28px;                     /* tidy size in footer */
  width: auto;
}
.company .mission {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Column headings + 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; }

/* Direct & Social (icons row) */
.direct-social .social-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;                  /* prevents overflow on narrow screens */
  justify-content: center;          /* center on mobile */
}
.direct-social .social-row a {
  display: inline-flex;
  width: 44px; height: 44px;
  justify-content: center; align-items: center;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.direct-social .social-row a:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.direct-social a.email    { background: #6b7280; } /* Email gray */
.direct-social a.upwork   { background: #6fda44; } /* Upwork green */
.direct-social a.linkedin { background: #0a66c2; } /* LinkedIn blue */
.direct-social a.youtube  { background: #ff0000; } /* YouTube red */
.direct-social svg { width: 20px; height: 20px; }
.direct-social .upwork .up-text {
  font-weight: 700; font-size: 14px; font-family: sans-serif; color: #fff;
}

/* Footer bottom line */
.footer-grid > p {
  grid-column: 1 / -1;
  text-align: center;
  padding: 8px 0 12px;
  border-top: 1px solid var(--border);
  color: #6b7280;
  font-size: 14px;
}

/* ==========================================================================
   ================== Responsive (≥ md and below) ==================
   ========================================================================== */
/* ≥768px: 4 columns, align social to the end */
@media (min-width: 768px) {
  .primary-nav { display: block; }
  .menu-btn { display: none; }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr auto; /* company | links | policies | social */
    gap: 20px;
  }
  .direct-social .social-row { justify-content: flex-end; }
  .footer-logo { height: 32px; }
}

/* Existing layout rules kept intact */
@media (max-width: 1024px) {
  :root { --hex-size: 110px; --hex-gap: 16px; }
}
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr; row-gap: 12px;
  }
  .hero .container > .hero-visual {
    grid-column: 1; grid-row: auto; margin-top: 8px; justify-self: center;
  }
  .hero .container .actions {
    grid-column: 1; grid-row: auto; justify-content: center; margin-top: 8px;
  }
}
@media (max-width: 640px) {
  :root { --hex-size: 92px; --hex-gap: 14px; }
  .hero { padding: 44px 0 0; }
  .hero h1 { font-size: clamp(28px, 8vw, 36px); }
}
@media (max-width: 420px) {
  :root { --hex-size: 82px; --hex-gap: 12px; }
}

/* ==========================================================================
   ================== Utilities ==================
   ========================================================================== */
.block { width: 100%; }



/* ==========================================================================
   ================== BODY PART X ==================
   Quote Modal (Get a Free Quote)
   ========================================================================== */

/* You can tweak these 3 numbers to taste */
:root{
  --quote-max-w: 1200px;   /* wider on desktop (≈ +2–3 inches) */
  --quote-vw:    78vw;     /* modal width as % of viewport */
  --quote-max-h: 94vh;     /* a bit taller (~ +1 inch) */
}

/* Container */
.quote-modal[hidden] { display: none; }
.quote-modal{
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;                 /* keeps breathing room at edges */
}

/* Dimmed background */
.quote-scrim{
  position: absolute;
  inset: 0;
  background: rgba(17,24,39,0.55);
  z-index: 1;
  border: 0; padding: 0; margin: 0;
}

/* Panel */
.quote-panel{
  position: relative;
  z-index: 2;
  width: clamp(860px, var(--quote-vw), var(--quote-max-w));
  max-height: var(--quote-max-h);
  min-height: 480px;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px;                 /* roomier interior */
  outline: none;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  opacity: 0;
  transform: translateX(-2%) scale(0.96);   /* ⬅ slight left bias */
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 160ms ease;
}
.quote-modal[data-state="open"] .quote-panel{
  transform: translateX(-2%) scale(1);      /* keep the left bias when open */
  opacity: 1;
}

/* Close button */
.quote-close{
  position: absolute;
  top: 10px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: #111827;
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.quote-close:hover{ filter: brightness(0.98); }

/* Header (sticky) */
.quote-head{
  position: sticky; top: 0; z-index: 1;
  background: var(--bg);
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.quote-head h2{
  margin: 4px 0 6px;
  font: 700 26px/1.2 "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.quote-sub{ margin: 0; color: var(--muted); }

/* Scrollable form area fills remaining height */
#quote-form{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;      /* no layout shift when scrollbar shows */

  padding: 14px 10px 0 0;        /* a little top/right padding for comfort */
  scroll-padding-top: 16px;      /* header clearance for in-form anchors */
}

/* Field grid */
.qgrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
}
.qfield{ display: grid; gap: 6px; }
.qfield span{ font-weight: 600; }
.qfield.qfull{ grid-column: 1 / -1; }

.qfield input,
.qfield select,
.qfield textarea{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 44px;
  font: inherit;
  background: #fff;
}
.qfield textarea{ min-height: 110px; resize: vertical; }

.qfield .help{ color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Nice focus ring */
.qfield input:focus-visible,
.qfield select:focus-visible,
.qfield textarea:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Errors */
.qfield .error{ color: #b91c1c; min-height: 18px; }

/* Honeypot */
.hp{ position: absolute !important; left: -9999px; width: 1px; height: 1px; }

/* Actions (sticky bottom bar) */
.qactions{
  position: sticky; bottom: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--bg) 24%);
  padding-top: 12px; margin-top: 12px;
  border-top: 1px solid var(--border);

  display: flex; gap: 10px; align-items: center; justify-content: flex-start;
}
#quote-submit{ position: relative; }
#quote-submit .spinner{
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.6);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 8px;
  animation: spin .7s linear infinite;
}
#quote-submit.loading .btn-label{ opacity: .6; }
#quote-submit.loading .spinner{ display: inline-block; }
@keyframes spin{ to{ transform: rotate(360deg); } }

.consent{ color: var(--muted); font-size: 14px; margin: 0; }
.qstatus{ margin-top: 10px; font-weight: 600; }
.qstatus.ok{ color:#065f46; }
.qstatus.err{ color:#b91c1c; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .quote-panel{ transition: opacity 150ms linear !important; transform:none !important; }
}

/* Tablets & down */
@media (max-width: 1024px){
  .quote-panel{
    width: min(92vw, 900px);
    max-height: 92vh;
    padding: 24px;
  }
}

/* Phones (popup dialog style) */
@media (max-width: 640px){
  .qgrid{ grid-template-columns: 1fr; }
  .quote-head h2{ font-size: 22px; }

  .quote-panel{
    width: 85vw;        /* narrower, leaves background visible */
    max-height: 70vh;   /* shorter, more "dialog" feel */
    border-radius: 20px;
    padding: 16px;
  }

  #quote-form {
    overflow-y: auto;
    padding-right: 6px;
  }
}
