/**
 * GlobalAlpha design system
 * Matches visual language of globalalpha.co.uk (Fabric + Elementor)
 */

:root {
  --ga-bg-primary: #ffffff;
  --ga-bg-secondary: #fafafa;
  --ga-bg-dark: #1c1f47;
  --ga-text-primary: #1a1a1a;
  --ga-text-secondary: #2c323b;
  --ga-text-muted: #6b6f7a;
  --ga-accent: #ffbc7d;
  --ga-accent-hover: #f0a85f;
  --ga-border: #dfddd3;
  --ga-cream: #f6f5ed;
  --ga-form-bg: #ffffff;
  --ga-form-focus: #1c1f47;
  --ga-error: #c0392b;
  --ga-success: #1e7a46;
  --ga-font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --ga-font-display: span, serif;
  --ga-container: 1320px;
  --ga-header-h: 80px;
  --ga-section-y: clamp(3rem, 8vw, 7.5rem);
  --ga-radius: 4px;
  --ga-transition: 0.25s ease;
  --ga-focus-ring: 0 0 0 3px rgba(28, 31, 71, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Base                                                                       */
/* -------------------------------------------------------------------------- */

.globalalpha-theme {
  font-family: var(--ga-font-body);
  color: var(--ga-text-primary);
  background-color: var(--ga-bg-primary);
  -webkit-font-smoothing: antialiased;
}

.globalalpha-theme h1,
.globalalpha-theme h2,
.globalalpha-theme .sc_title .sc_item_title,
.globalalpha-theme .ga-marquee-text {
  font-family: var(--ga-font-display);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ga-text-primary);
}

.globalalpha-theme h3,
.globalalpha-theme h4,
.globalalpha-theme h5,
.globalalpha-theme h6,
.globalalpha-theme nav,
.globalalpha-theme button,
.globalalpha-theme .sc_button {
  font-family: var(--ga-font-body);
}

.globalalpha-theme p {
  line-height: 1.7;
  /* Do NOT set color here — Elementor sections (hero on dark) set their own.
     Forcing --ga-text-secondary made hero body copy unreadable. */
}

.globalalpha-theme a:focus-visible,
.globalalpha-theme button:focus-visible,
.globalalpha-theme input:focus-visible,
.globalalpha-theme textarea:focus-visible,
.globalalpha-theme select:focus-visible {
  outline: none;
  box-shadow: var(--ga-focus-ring);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* -------------------------------------------------------------------------- */
/* Header / nav                                                               */
/* -------------------------------------------------------------------------- */

.globalalpha-theme .header_wrap,
.globalalpha-theme .sc_layouts_row {
  min-height: var(--ga-header-h);
}

.globalalpha-theme .menu-item > a {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--ga-transition);
}

.globalalpha-theme .menu-item > a:hover,
.globalalpha-theme .menu-item.current-menu-item > a {
  color: var(--ga-bg-dark);
}

.globalalpha-theme .sub-menu {
  border-radius: var(--ga-radius);
  box-shadow: 0 12px 32px rgba(28, 31, 71, 0.12);
  border: 1px solid var(--ga-border);
}

/* GlobalAlpha overlay nav (mobile-first polish) */
.ga-primary-nav {
  position: relative;
  z-index: 10050;
}

.ga-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10060;
  width: 48px;
  height: 48px;
  padding: 12px;
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  background: var(--ga-bg-primary);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.ga-nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ga-bg-dark);
  transition: transform var(--ga-transition), opacity var(--ga-transition);
}

.ga-nav-toggle[aria-expanded="true"] .ga-nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.ga-nav-toggle[aria-expanded="true"] .ga-nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.ga-nav-toggle[aria-expanded="true"] .ga-nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.ga-mobile-panel {
  display: none;
}

@media (max-width: 1023px) {
  .ga-nav-toggle {
    display: flex;
  }

  .ga-mobile-panel:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10055;
    background: rgba(28, 31, 71, 0.96);
    padding: 5rem 1.5rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ga-mobile-panel .ga-nav-menu,
  .ga-mobile-panel .ga-nav-menu a {
    color: #fff;
  }

  .ga-mobile-panel .ga-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .ga-mobile-panel .ga-nav-menu > .menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .ga-mobile-panel .ga-nav-menu a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
  }

  .ga-mobile-panel .sub-menu {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0 0 0 1rem;
    box-shadow: none;
    border: 0;
    background: transparent;
  }

  .ga-mobile-panel .sub-menu a {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.9;
    padding: 0.5rem 0;
  }

  body.ga-nav-open {
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  .ga-primary-nav .ga-nav-toggle,
  .ga-primary-nav .ga-mobile-panel {
    display: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.globalalpha-theme .sc_button,
.globalalpha-theme .wp-block-button__link,
.ga-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  font-family: var(--ga-font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--ga-radius);
  border: 1px solid transparent;
  background: var(--ga-bg-dark);
  color: #fff !important;
  transition: background var(--ga-transition), transform var(--ga-transition), box-shadow var(--ga-transition);
  cursor: pointer;
}

.globalalpha-theme .sc_button:hover,
.ga-btn:hover {
  background: #151833;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(28, 31, 71, 0.2);
}

.globalalpha-theme .sc_button:active,
.ga-btn:active {
  transform: translateY(0);
}

.ga-btn--accent {
  background: var(--ga-accent);
  color: var(--ga-bg-dark) !important;
}

.ga-btn--accent:hover {
  background: var(--ga-accent-hover);
}

.ga-btn:disabled,
.ga-btn.is-loading {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Hero / sections                                                            */
/* -------------------------------------------------------------------------- */

.globalalpha-theme .elementor-section {
  --ga-section-pad: var(--ga-section-y);
}

.globalalpha-theme .elementor-widget-heading .elementor-heading-title {
  font-family: span, serif;
  font-weight: 300;
}

.globalalpha-theme .sc_skills_counter .sc_skills_total,
.globalalpha-theme .sc_skills_counter .sc_skills_item_title,
.globalalpha-theme .sc_skills_counter_modern .sc_skills_total,
.globalalpha-theme .sc_skills_counter_modern .sc_skills_item_title {
  font-family: span, serif;
}

.globalalpha-theme .sc_skills_counter .sc_skills_total,
.globalalpha-theme .sc_skills_counter_modern .sc_skills_total {
  color: #dfddd3;
  font-weight: 400;
}

/* Principles cards — do NOT transform Key Sectors / Blog slider items
   (Fabric uses absolute fill + :before aspect spacer; translateY breaks them). */
.globalalpha-theme .sc_services_default .sc_services_item,
.globalalpha-theme .elementor-widget-icon-box {
  transition: transform var(--ga-transition), box-shadow var(--ga-transition);
}

.globalalpha-theme .sc_services_default .sc_services_item:hover,
.globalalpha-theme .elementor-widget-icon-box:hover {
  transform: translateY(-4px);
}

/* Sector grid */
.globalalpha-theme .sc_services_default .sc_services_item_title a {
  color: var(--ga-text-primary);
  text-decoration: none;
  transition: color var(--ga-transition);
}

.globalalpha-theme .sc_services_default .sc_services_item_title a:hover {
  color: var(--ga-bg-dark);
}

/* Marquee (existing markup / injected) */
.ga-marquee-wrap {
  overflow: hidden !important;
  width: 100%;
  max-width: 100vw;
  background: var(--ga-bg-primary);
  position: relative;
}

.ga-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ga-scroll 22s linear infinite;
}

.ga-marquee-track:hover {
  animation-play-state: paused;
}

.ga-marquee-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.ga-marquee-text {
  font-family: var(--ga-font-display) !important;
  font-size: clamp(1.875rem, 4vw, 3rem) !important;
  font-weight: 300 !important;
  color: var(--ga-text-primary) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
}

.ga-marquee-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2.25rem;
  width: 22px;
  height: 22px;
}

.ga-marquee-star svg {
  width: 22px;
  height: 22px;
  fill: var(--ga-text-primary);
}

@keyframes ga-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -------------------------------------------------------------------------- */
/* Blog cards                                                                 */
/* -------------------------------------------------------------------------- */

.globalalpha-theme .post_item,
.globalalpha-theme .sc_blogger_item {
  transition: box-shadow var(--ga-transition), transform var(--ga-transition);
}

.globalalpha-theme .post_item:hover,
.globalalpha-theme .sc_blogger_item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(28, 31, 71, 0.08);
}

.globalalpha-theme .post_item img,
.globalalpha-theme .sc_blogger_item img {
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* -------------------------------------------------------------------------- */
/* Contact Form 7                                                             */
/* -------------------------------------------------------------------------- */

.ga-contact-anchor {
  position: relative;
  height: 0;
  scroll-margin-top: calc(var(--ga-header-h) + 1rem);
}

.globalalpha-theme .wpcf7,
.globalalpha-theme .ga-contact-form {
  max-width: 640px;
}

.globalalpha-theme .wpcf7 form,
.globalalpha-theme .ga-contact-form {
  display: grid;
  gap: 1rem;
}

.globalalpha-theme .wpcf7 label,
.globalalpha-theme .ga-contact-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ga-text-secondary);
  margin-bottom: 0.35rem;
}

.globalalpha-theme .wpcf7 input[type="text"],
.globalalpha-theme .wpcf7 input[type="email"],
.globalalpha-theme .wpcf7 input[type="tel"],
.globalalpha-theme .wpcf7 input[type="url"],
.globalalpha-theme .wpcf7 textarea,
.globalalpha-theme .wpcf7 select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: var(--ga-font-body);
  font-size: 1rem;
  color: var(--ga-text-primary);
  background: var(--ga-form-bg);
  border: 1px solid var(--ga-border);
  border-radius: var(--ga-radius);
  transition: border-color var(--ga-transition), box-shadow var(--ga-transition);
}

.globalalpha-theme .wpcf7 textarea {
  min-height: 140px;
  resize: vertical;
}

.globalalpha-theme .wpcf7 input:focus,
.globalalpha-theme .wpcf7 textarea:focus,
.globalalpha-theme .wpcf7 select:focus {
  border-color: var(--ga-form-focus);
  outline: none;
  box-shadow: var(--ga-focus-ring);
}

.globalalpha-theme .wpcf7 .wpcf7-not-valid {
  border-color: var(--ga-error) !important;
}

.globalalpha-theme .wpcf7 .wpcf7-not-valid-tip {
  color: var(--ga-error);
  font-size: 0.8125rem;
  margin-top: 0.35rem;
}

.globalalpha-theme .wpcf7 .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--ga-radius);
  font-size: 0.9375rem;
  border-width: 1px;
}

.globalalpha-theme .wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--ga-success);
  background: #eef8f1;
  color: var(--ga-success);
}

.globalalpha-theme .wpcf7 form.invalid .wpcf7-response-output,
.globalalpha-theme .wpcf7 form.failed .wpcf7-response-output,
.globalalpha-theme .wpcf7 form.aborted .wpcf7-response-output {
  border-color: var(--ga-error);
  background: #fdf0ef;
  color: var(--ga-error);
}

.globalalpha-theme .wpcf7 form.submitting input[type="submit"],
.globalalpha-theme .wpcf7 form.submitting .wpcf7-submit {
  opacity: 0.65;
  cursor: wait;
  pointer-events: none;
}

.globalalpha-theme .wpcf7 input[type="submit"],
.globalalpha-theme .wpcf7 .wpcf7-submit {
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  font-family: var(--ga-font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ga-bg-dark);
  color: #fff;
  border: 0;
  border-radius: var(--ga-radius);
  cursor: pointer;
  transition: background var(--ga-transition);
}

.globalalpha-theme .wpcf7 input[type="submit"]:hover {
  background: #151833;
}

.globalalpha-theme .wpcf7 .wpcf7-acceptance {
  font-size: 0.875rem;
}

.globalalpha-theme .wpcf7 .wpcf7-list-item {
  margin: 0;
}

.ga-form-status[aria-live] {
  min-height: 1.25rem;
  font-size: 0.875rem;
}

/* -------------------------------------------------------------------------- */
/* Scroll reveal                                                              */
/* -------------------------------------------------------------------------- */

.ga-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ga-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ga-marquee-track {
    animation: none !important;
  }

  .ga-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .globalalpha-theme *,
  .globalalpha-theme *::before,
  .globalalpha-theme *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.globalalpha-theme .footer_wrap,
.globalalpha-theme .sc_layouts_footer {
  background: var(--ga-bg-dark);
  color: var(--ga-cream);
}

.globalalpha-theme .footer_wrap a {
  color: var(--ga-cream);
  transition: opacity var(--ga-transition);
}

.globalalpha-theme .footer_wrap a:hover {
  opacity: 0.8;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --ga-header-h: 64px;
  }

  .ga-marquee-star {
    margin: 0 1.25rem;
    width: 10px;
    height: 10px;
  }

  .ga-marquee-star svg {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .globalalpha-theme .sc_button,
  .ga-btn {
    width: 100%;
  }
}

/* Prevent horizontal overflow */
.globalalpha-theme,
.globalalpha-theme body {
  overflow-x: hidden;
}

.globalalpha-theme img,
.globalalpha-theme video {
  max-width: 100%;
  height: auto;
}
