/* ==========================================================================
   AASEIR — Industrial Kinetic design system
   Shared stylesheet for all pages
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f9f9ff;
  color: #101c2f;
}

h1, h2, h3, h4, .font-headline {
  font-family: "Space Grotesk", sans-serif;
}

/* -------------------------------------------------------------------- */
/* Blueprint schematic texture — used on dark hero / CTA sections        */
/* -------------------------------------------------------------------- */
.blueprint {
  background-color: #0c172a;
  background-image:
    linear-gradient(rgba(111, 196, 253, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 196, 253, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}

.blueprint-light {
  background-image:
    linear-gradient(rgba(12, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* -------------------------------------------------------------------- */
/* Glassmorphism panels on dark backgrounds                              */
/* -------------------------------------------------------------------- */
.glass {
  background: rgba(249, 249, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* -------------------------------------------------------------------- */
/* Nav link underline-grow (no default blue links)                       */
/* -------------------------------------------------------------------- */
.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #cca72f;
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* -------------------------------------------------------------------- */
/* Buttons — sharp corners, precision-built                              */
/* -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0.125rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: #cca72f;
  color: #241a00;
}
.btn-primary:hover {
  background: #e0bb3c;
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}
.btn-dark {
  background: #0c172a;
  color: #ffffff;
}
.btn-dark:hover {
  background: #212c40;
}
.btn-outline-dark {
  border: 1px solid #0c172a;
  color: #0c172a;
}
.btn-outline-dark:hover {
  background: #0c172a;
  color: #ffffff;
}

/* -------------------------------------------------------------------- */
/* Eyebrow / meta labels                                                 */
/* -------------------------------------------------------------------- */
.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------- */
/* Grayscale-to-color image treatment                                    */
/* -------------------------------------------------------------------- */
.img-industrial {
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.5s ease;
}
.img-industrial:hover {
  filter: grayscale(0%) contrast(1.05);
}

/* -------------------------------------------------------------------- */
/* Live status pulse dot                                                 */
/* -------------------------------------------------------------------- */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6fc4fd;
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid #6fc4fd;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* -------------------------------------------------------------------- */
/* Thin progress / telemetry bars                                        */
/* -------------------------------------------------------------------- */
.telemetry-bar {
  height: 4px;
  background: rgba(16, 28, 42, 0.08);
  overflow: hidden;
  border-radius: 2px;
}
.telemetry-bar > span {
  display: block;
  height: 100%;
  background: #006491;
  border-radius: 2px;
}

/* -------------------------------------------------------------------- */
/* Card lift (no shadows, tonal layering)                                */
/* -------------------------------------------------------------------- */
.card-lift {
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(12, 23, 42, 0.25);
}

/* -------------------------------------------------------------------- */
/* Marquee for partner logos                                             */
/* -------------------------------------------------------------------- */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* -------------------------------------------------------------------- */
/* Reveal-on-scroll                                                      */
/* -------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------- */
/* Mobile nav                                                            */
/* -------------------------------------------------------------------- */
#mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobile-nav.open {
  max-height: 480px;
}

/* -------------------------------------------------------------------- */
/* Reduced motion                                                        */
/* -------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------- */
/* Hero slider (Dipietro-style full-bleed crossfade + Ken Burns)         */
/* -------------------------------------------------------------------- */
.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-slide.active {
  opacity: 1;
  z-index: 1;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%) brightness(0.88) contrast(1.05);
  transform: scale(1);
  transform-origin: center center;
  will-change: transform;
}
.hero-dots {
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 28px;
  height: 3px;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
  padding: 0;
}
.hero-dot.active {
  background: #cca72f;
}

/* Hero headline staggered reveal */
.hero-anim > * {
  opacity: 0;
  transform: translateY(28px);
  animation: hero-rise 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}
.hero-anim > *:nth-child(1) { animation-delay: 0.15s; }
.hero-anim > *:nth-child(2) { animation-delay: 0.32s; }
.hero-anim > *:nth-child(3) { animation-delay: 0.5s; }
.hero-anim > *:nth-child(4) { animation-delay: 0.68s; }
.hero-anim > *:nth-child(5) { animation-delay: 0.85s; }
@keyframes hero-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------- */
/* Animated stat counters                                                */
/* -------------------------------------------------------------------- */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------- */
/* Feature row (What sets us apart / Dipietro style)                     */
/* -------------------------------------------------------------------- */
.feature-row {
  border-top: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s ease;
}
.feature-row:hover {
  background: rgba(255,255,255,0.03);
}
.feature-row:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* -------------------------------------------------------------------- */
/* Process timeline                                                      */
/* -------------------------------------------------------------------- */
.timeline-line {
  background: linear-gradient(90deg, rgba(204,167,47,0.6), rgba(0,100,145,0.2));
}

/* -------------------------------------------------------------------- */
/* Footer watermark logo                                                 */
/* -------------------------------------------------------------------- */
.footer-watermark {
  position: absolute;
  right: -4%;
  bottom: -12%;
  width: 46%;
  max-width: 620px;
  opacity: 0.05;
  pointer-events: none;
  filter: brightness(0) invert(1);
}

/* -------------------------------------------------------------------- */
/* Solutions / discipline cards with image zoom (Dipietro card style)    */
/* -------------------------------------------------------------------- */
.solution-card { position: relative; overflow: hidden; display: block; }
.solution-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.7s ease;
  filter: grayscale(55%) brightness(0.7);
}
.solution-card:hover img {
  transform: scale(1.08);
  filter: grayscale(0%) brightness(0.62);
}
.solution-card .solution-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,23,42,0.95) 10%, rgba(12,23,42,0.25) 55%, rgba(12,23,42,0.1) 100%);
}
.solution-card .solution-index {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 0.8rem; color: rgba(255,255,255,0.5);
  letter-spacing: 0.15em;
}
.solution-card .solution-arrow {
  transition: transform 0.35s ease;
}
.solution-card:hover .solution-arrow {
  transform: translateX(6px);
}

/* -------------------------------------------------------------------- */
/* Scroll cue bounce                                                     */
/* -------------------------------------------------------------------- */
@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.scroll-cue {
  animation: bounce-soft 2.2s ease-in-out infinite;
}

/* -------------------------------------------------------------------- */
/* Figure + caption cards (Technical Disciplines / Sectors — Home only)  */
/* -------------------------------------------------------------------- */
.figure-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(16,28,42,0.08);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.figure-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px -28px rgba(12,23,42,0.28);
  border-color: rgba(204,167,47,0.35);
}
.figure-figure {
  position: relative;
  overflow: hidden;
  background: #0c172a;
}
.figure-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(55%) brightness(0.86) contrast(1.05);
  transition: filter 0.5s ease;
  transform: scale(1.12);
  will-change: transform;
}
.figure-card:hover .figure-figure img {
  filter: grayscale(0%) brightness(1) contrast(1.05);
}
.figure-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: rgba(12,23,42,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e0be5a;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
}
.figure-caption {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.65rem;
  border-top: 3px solid #0c172a;
}
.figure-card:hover .figure-caption {
  border-top-color: #cca72f;
}
.figure-caption-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.figure-arrow {
  transition: transform 0.35s ease;
}
.figure-card:hover .figure-arrow {
  transform: translateX(5px);
}

/* -------------------------------------------------------------------- */
/* Hero layering (all pages) — image / overlay / content kept in          */
/* separate layers so the scroll-zoom transform never touches the text.  */
/* -------------------------------------------------------------------- */
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 10;
}

/* -------------------------------------------------------------------- */
/* RTL support (Arabic) — targeted overrides for the most visible          */
/* structural elements. Tailwind utilities are physical (ml-/mr-/text-    */
/* left) rather than logical, so this section flips the handful that      */
/* matter most once [dir="rtl"] is set on <html>.                         */
/* -------------------------------------------------------------------- */
html[dir="rtl"] body {
  font-family: "Tahoma", "Segoe UI", "Inter", sans-serif;
}
html[dir="rtl"] .font-headline {
  font-family: "Tahoma", "Segoe UI", "Space Grotesk", sans-serif;
}
html[dir="rtl"] .eyebrow {
  letter-spacing: 0;
}
html[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}
html[dir="rtl"] .btn .material-symbols-outlined {
  transform: scaleX(-1);
}
html[dir="rtl"] .figure-arrow .material-symbols-outlined,
html[dir="rtl"] .solution-arrow .material-symbols-outlined {
  transform: scaleX(-1);
}
html[dir="rtl"] .scroll-cue {
  transform: none;
}
/* Icons that should never mirror (status, checks, external glyphs) */
html[dir="rtl"] .no-mirror .material-symbols-outlined {
  transform: none;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #cca72f;
  outline-offset: 2px;
}
