/* ============================================================================
   AR ENGINEERING - MAIN STYLESHEET
   ============================================================================

   FILE NAMING CONVENTION (read this before dropping in new images/videos):

   All media lives in ONE flat folder: /images/ (photos, logos, icons)
                                        /videos/ (video files)

   - Unique single-use assets → descriptive name, e.g. home-hero.webp,
     about-team-photo.jpg, founder-photo.jpg
   - Client/partner logos → logo-[company].png  (e.g. logo-boeing.png)
   - Solution icons → icon-[name].png  (e.g. icon-advisory.png)
   - Brand logo (4 color variants) →
       logo-are-black.png        (black mark, no tagline color)
       logo-are-black-blue.png   (black mark, blue tagline, used on light bg)
       logo-are-white.png        (white mark, no tagline color)
       logo-are-white-blue.png   (white mark, blue tagline, used on dark bg)
   - Numbered content images (future pages) → [page]-image1.jpg,
     [page]-image2.jpg, etc., in order of appearance on that page

   TO REPLACE ANY IMAGE: save your new file over the existing one using the
   EXACT SAME filename. No code editing required, the page will pick it up
   automatically.

   ============================================================================ */

/* ---- Design tokens ---- */
:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-bg-dark: #17181c;
  --color-bg-dark-alt: #1d1f24;
  --color-text: #14151a;
  --color-text-dark-bg: #f5f6f7;
  --color-text-muted: #5c5f6a;
  --color-text-muted-dark-bg: #9a9ca5;
  --color-border: #e6e5e0;
  --color-border-dark: #2c2e35;
  --color-accent: #20a6cf;
  --color-accent-dim: rgba(32, 166, 207, 0.12);

  /* Type */
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --container-max: 1440px;
  --section-pad-y: 80px;
  --section-pad-y-mobile: 52px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.7s;
}

html, body {
  width: 100%;
  min-width: 100%;
}

/* ---- Reset ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Right-click / drag-save deterrents (casual only) ---- */
img, video {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

.protect-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* ---- Layout helpers ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-dark-bg);
}

.eyebrow {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.section-header {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-header.center {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(36px, 4.6vw, 56px);
}

h3 {
  font-size: clamp(22px, 2.4vw, 28px);
}

p {
  color: var(--color-text-muted);
}

.section-dark p {
  color: var(--color-text-muted-dark-bg);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-text);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.section-dark .btn-ghost {
  color: var(--color-text-dark-bg);
  border-color: var(--color-border-dark);
}

.section-dark .btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---- Nav ---- */
.nav-wrap {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  max-width: 1040px;
  padding: 18px 20px 18px 28px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(28px) saturate(220%);
  -webkit-backdrop-filter: blur(28px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 32px rgba(20, 21, 26, 0.08);
}

.nav-logo img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 15.5px;
  font-weight: 500;
}

.nav-links a {
  opacity: 0.75;
  transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--color-accent);
}

.nav-cta {
  padding: 13px 26px;
  font-size: 15px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 96px;
  left: 20px;
  right: 20px;
  z-index: 99;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(28px) saturate(220%);
  -webkit-backdrop-filter: blur(28px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(20, 21, 26, 0.12);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mobile-menu a {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition: background 0.2s;
}

.mobile-menu a:hover {
  background: rgba(20, 21, 26, 0.05);
}

.mobile-menu .mobile-cta {
  margin-top: 6px;
  background: var(--color-text);
  color: #fff;
  text-align: center;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  animation: heroFade 1.4s var(--ease) 0.1s forwards;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.72) 32%, rgba(255,255,255,0.25) 58%, rgba(255,255,255,0.05) 78%);
}

@keyframes heroFade {
  to { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 160px 0 64px;
}

.hero-copy {
  max-width: 620px;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  margin-bottom: 26px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.9s var(--ease) 0.3s forwards;
}

.hero .hero-sub {
  font-size: 19px;
  max-width: 500px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.9s var(--ease) 0.45s forwards;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.9s var(--ease) 0.6s forwards;
}

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .hero-bg::after {
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.88) 55%, rgba(255,255,255,0.98) 100%);
  }
  .hero-content { padding: 140px 0 60px; }
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0;
  animation: heroIn 0.9s var(--ease) 0.9s forwards;
}

.scroll-cue .chevron {
  width: 14px;
  height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: bounce 1.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }

/* ---- Logo wall: continuous right-to-left marquee ---- */
.logo-marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 72px;
  width: max-content;
  animation: marqueeScroll 38s linear infinite;
}

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

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.logo-marquee-item {
  flex: 0 0 auto;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-marquee-item img {
  height: 100%;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

@media (max-width: 860px) {
  .logo-marquee-track { gap: 48px; }
  .logo-marquee-item { height: 56px; }
}

/* ---- About ---- */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.split.reverse {
  grid-template-columns: 1.1fr 0.9fr;
}

.split.reverse .split-media {
  order: 2;
}

.split-media img {
  width: 100%;
  border-radius: var(--radius-lg);
}

@media (max-width: 900px) {
  .split, .split.reverse {
    grid-template-columns: 1fr;
  }
  .split.reverse .split-media {
    order: -1;
  }
}

/* ---- Solutions (accordion list, 2-col on desktop) ---- */
.solutions-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}

.solution-item {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.solution-item:nth-child(1),
.solution-item:nth-child(2) {
  border-top: 1px solid var(--color-border);
}

@media (max-width: 860px) {
  .solutions-list {
    grid-template-columns: 1fr;
  }
  .solution-item:nth-child(2) {
    border-top: none;
  }
}

.solution-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.solution-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.solution-body h3 {
  margin-bottom: 0;
  transition: color 0.2s;
}

.solution-item:hover h3 {
  color: var(--color-accent);
}

.solution-desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), margin-top 0.4s var(--ease);
  margin-top: 0;
}

.solution-item.open .solution-desc {
  max-height: 200px;
  margin-top: 12px;
}

@media (hover: hover) {
  .solution-item:hover .solution-desc {
    max-height: 200px;
    margin-top: 12px;
  }
}

.solution-desc p {
  max-width: 560px;
}

/* ---- Reach all platforms ---- */
.platform-visual img {
  width: 100%;
}

/* ---- Why AR Engineering + Industries (combined) ---- */
.why-top {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.why-headline h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.2;
}

.why-list {
  display: flex;
  flex-direction: column;
}

.why-item {
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
  cursor: pointer;
}

.why-item:first-child {
  border-top: 1px solid var(--color-border);
}

.why-item-head h3 {
  font-size: 18px;
  transition: color 0.2s;
}

.why-item:hover .why-item-head h3,
.why-item.open .why-item-head h3 {
  color: var(--color-accent);
}

.why-item-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), margin-top 0.4s var(--ease);
  margin-top: 0;
}

.why-item.open .why-item-body {
  max-height: 160px;
  margin-top: 10px;
}

@media (hover: hover) {
  .why-item:hover .why-item-body {
    max-height: 160px;
    margin-top: 10px;
  }
}

.why-item-body p {
  font-size: 14.5px;
  max-width: 440px;
}

@media (max-width: 900px) {
  .why-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---- Industries marquee strip ---- */
.industries-strip {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid var(--color-border);
}

.industries-caption {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 36px;
}

.industries-caption .accent {
  color: var(--color-accent);
}

.industries-marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.industries-marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: marqueeScroll 34s linear infinite;
}

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

.industry-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.industry-chip img {
  height: 64px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

@media (max-width: 860px) {
  .industries-marquee-track { gap: 40px; }
  .industry-chip img { height: 48px; }
}

/* ---- Venture backed ---- */
.backers-block {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.backers-block h2 {
  font-size: clamp(26px, 3.2vw, 36px);
}

.backers-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  margin-top: 48px;
  flex-wrap: nowrap;
  width: 100%;
}

.backers-logos img {
  height: 168px;
  width: auto;
  max-width: 40%;
  object-fit: contain;
  flex-shrink: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .backers-logos {
    gap: 24px;
  }
  .backers-logos img {
    height: 64px;
    max-width: 44%;
  }
}

/* ---- Founder ---- */
.signature {
  margin-top: 32px;
  font-size: 20px;
  font-style: italic;
  font-weight: 500;
}

.signature-role {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 2px;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.contact-icons {
  display: flex;
  gap: 20px;
  margin-top: 28px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.contact-icon:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.contact-icon svg {
  width: 20px;
  height: 20px;
}

.proudly-uae {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.contact-map iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

.contact-address {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-top: 20px;
}

.contact-address strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
.footer {
  background: var(--color-bg);
  color: var(--color-text);
  padding-top: 40px;
}

.footer-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 14.5px;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--color-text);
}

.footer-socials a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.footer-socials svg {
  width: 16px;
  height: 16px;
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 13px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-wordmark {
  width: 100%;
  overflow: hidden;
  line-height: 0.8;
  user-select: none;
  pointer-events: none;
}

.footer-wordmark span {
  display: block;
  font-size: clamp(90px, 15vw, 220px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  opacity: 0.06;
  text-align: center;
  white-space: nowrap;
  margin: 0 -2vw;
}

@media (max-width: 860px) {
  .footer-links-row { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 20px 28px; }
}

/* ---- Placeholder blocks (until real assets dropped in) ---- */
.ph {
  background: repeating-linear-gradient(
    45deg,
    rgba(32, 166, 207, 0.06),
    rgba(32, 166, 207, 0.06) 10px,
    rgba(32, 166, 207, 0.02) 10px,
    rgba(32, 166, 207, 0.02) 20px
  );
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-md);
}

.section-dark .ph {
  border-color: var(--color-border-dark);
  color: var(--color-text-muted-dark-bg);
}

/* ---- Responsive base ---- */
@media (max-width: 860px) {
  :root {
    --section-pad-y: var(--section-pad-y-mobile);
  }
  .container { padding: 0 20px; }
}
