/* ===========================================================================
   Iris Aerial — character layer
   Loads after motion.css. This is the pass that stops the site reading like a
   template: a signature topographic motif, an instrument-panel voice for small
   type, and interactions that reward poking at them.
   =========================================================================== */

:root {
  --contours: url("assets/texture/contours.svg");
  --tick: #9fc4d8;
}

/* ---------------------------------------------------------------------------
   1. The contour motif
   The texture is a real height field run through marching squares, not a
   decorative squiggle — it is the thing the company actually sells. It is
   applied as a mask so every section can paint it in its own colour.
   --------------------------------------------------------------------------- */

.has-contours {
  position: relative;
  isolation: isolate;
}
.has-contours > .contour-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--contour-ink, currentColor);
  -webkit-mask: var(--contours) center / cover no-repeat;
  mask: var(--contours) center / cover no-repeat;
  opacity: var(--contour-opacity, 0.16);
}
/* Slow drift, so the ground under the page is never quite static. */
.contour-layer.drift {
  animation: contour-drift 62s ease-in-out infinite alternate;
}
@keyframes contour-drift {
  to {
    transform: scale(1.1) translate3d(-2%, 1.5%, 0);
  }
}

/* Paper grain. Barely there, but it kills the flat-vector look. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter>\
<rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* ---------------------------------------------------------------------------
   2. Instrument-panel voice for small type
   Technical eyebrows with a survey tick, used to break up the run of
   identical section headings.
   --------------------------------------------------------------------------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font: 600 12px/1 var(--font-technical);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.kicker::before {
  content: "";
  flex-shrink: 0;
  width: 34px;
  height: 10px;
  background-image: linear-gradient(90deg, currentColor 2px, transparent 2px);
  background-size: 8px 100%;
  opacity: 0.8;
}
.kicker.on-dark {
  color: var(--accent);
}

/* A marker-pen sweep under the phrase a heading actually turns on. */
.hl {
  position: relative;
  background: none;
  color: inherit;
}
@media (min-width: 761px) {
  .hl {
    white-space: nowrap;
  }
}
.hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.04em;
  height: 0.34em;
  z-index: -1;
  border-radius: 2px;
  background: var(--hl-ink, #bfe4f5);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}
.in-view .hl::after,
.hl.lit::after {
  transform: scaleX(1);
}
.hl {
  isolation: isolate;
}

/* ---------------------------------------------------------------------------
   3. Scroll progress, drawn as a survey chain
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   4. Hero — the drone's own point of view
   --------------------------------------------------------------------------- */

/* Each word rises out of its own mask, so the headline assembles itself. */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.word-wrap > span {
  display: inline-block;
  transform: translateY(110%);
  animation: word-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--word-delay, 0ms);
}
@keyframes word-rise {
  to {
    transform: translateY(0);
  }
}

.hero-parallax {
  will-change: transform;
}

.hero-hud {
  position: absolute;
  z-index: 2;
  left: max(var(--gutter), calc((100vw - var(--content)) / 2));
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border: 1px solid rgba(143, 216, 245, 0.3);
  border-radius: 4px;
  background: rgba(6, 22, 38, 0.52);
  backdrop-filter: blur(6px);
  font: 600 11.5px/1 var(--font-technical);
  letter-spacing: 0.12em;
  color: #bfe4f5;
  animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
.hero-hud span {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.hero-hud span + span {
  padding-left: 18px;
  border-left: 1px solid rgba(143, 216, 245, 0.22);
}
.hero-hud b {
  font-weight: 700;
  color: rgba(143, 216, 245, 0.55);
}
.hud-rec::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff6b5e;
  box-shadow: 0 0 8px #ff6b5e;
  animation: live-pulse 1.8s ease-out infinite;
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  font: 600 10.5px/1 var(--font-technical);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(216, 236, 250, 0.7);
  animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}
.scroll-cue i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(
    180deg,
    rgba(216, 236, 250, 0.1),
    rgba(216, 236, 250, 0.85)
  );
  mask-image: linear-gradient(180deg, #000 0 40%, transparent 40%);
  -webkit-mask-image: linear-gradient(180deg, #000 0 40%, transparent 40%);
  animation: cue-fall 1.9s ease-in-out infinite;
}
@keyframes cue-fall {
  0% {
    -webkit-mask-position: 0 -34px;
    mask-position: 0 -34px;
  }
  100% {
    -webkit-mask-position: 0 34px;
    mask-position: 0 34px;
  }
}

/* ---------------------------------------------------------------------------
   5. Counters — real numbers, counted off the page itself
   --------------------------------------------------------------------------- */

.tally {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--sky-line);
}
.tally div {
  position: relative;
  padding-left: 18px;
}
.tally div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--sky-bright);
}
.tally b {
  display: block;
  font: 700 clamp(46px, 5vw, 72px) / 0.92 var(--font-display);
  letter-spacing: -0.045em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.tally span {
  display: block;
  margin-top: 8px;
  font: 600 12.5px/1.4 var(--font-technical);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   6. Things that react to being poked
   --------------------------------------------------------------------------- */

/* Buttons lean toward the pointer. Offsets come from script. */
.magnetic {
  transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.magnetic.pulled {
  transition: translate 0.08s linear;
}

/* Images wipe in from the bottom rather than fading like everything else. */
.wipe {
  /* A 300%-tall mask slid from bottom to top. The top third is opaque and the
     bottom third transparent, so moving the window uncovers the image. */
  --wipe-mask: linear-gradient(
    180deg,
    #000 0 33.4%,
    rgba(0, 0, 0, 0) 66.6% 100%
  );
  -webkit-mask-image: var(--wipe-mask);
  mask-image: var(--wipe-mask);
  -webkit-mask-size: 100% 300%;
  mask-size: 100% 300%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 100%;
  mask-position: 0 100%;
  transition:
    -webkit-mask-position 1.1s cubic-bezier(0.22, 1, 0.36, 1),
    mask-position 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.wipe.in-view {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

/* The drone drops a benchmark where you click. */
.survey-mark {
  position: fixed;
  z-index: 9996;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  pointer-events: none;
  color: var(--cyan);
  animation: mark-drop 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.survey-mark svg {
  width: 100%;
  height: 100%;
}
@keyframes mark-drop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-25deg);
  }
  22% {
    opacity: 1;
    transform: scale(1.1) rotate(0deg);
  }
  45% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.35) rotate(0deg);
  }
}

/* ---------------------------------------------------------------------------
   7. Oversized numerals
   The quickest way out of "another grid of equal cards" is to let one element
   per item be much bigger than the layout expects.
   --------------------------------------------------------------------------- */

.ghost-num {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  font: 700 var(--ghost-size, 150px) / 0.8 var(--font-display);
  letter-spacing: -0.06em;
  color: var(--ghost-ink, var(--sky-line));
  opacity: var(--ghost-opacity, 0.5);
  user-select: none;
}

/* Solutions: each sector carries its own index, set off the image edge. */
.solution-family {
  position: relative;
}
/* Cropped by the card's own overflow, which reads as deliberate rather than
   as a number that happened to land on the heading. */
.solution-family .ghost-num {
  --ghost-size: 132px;
  --ghost-opacity: 0.55;
  left: 30px;
  top: -40px;
}
.solution-family:nth-child(even) .ghost-num {
  left: auto;
  right: 30px;
}
#solutions .solution-portfolio {
  --contour-ink: #0a7ab0;
  --contour-opacity: 0.12;
}

/* ---------------------------------------------------------------------------
   8. Section rhythm
   Survey-tick rules instead of another 1px hairline.
   --------------------------------------------------------------------------- */

.tick-rule {
  height: 12px;
  background-image: linear-gradient(90deg, var(--tick) 1px, transparent 1px);
  background-size: 14px 100%;
  background-position: 0 bottom;
  background-repeat: repeat-x;
  opacity: 0.55;
}

.people-section {
  --contour-ink: var(--cyan);
  --contour-opacity: 0.07;
}
.client-band {
  --contour-ink: var(--cyan);
  --contour-opacity: 0.05;
}
.trust-strip {
  --contour-ink: #ffffff;
  --contour-opacity: 0.1;
}
.ak-hero,
.ak-infra,
.ak-defence {
  --contour-ink: var(--ak-lime);
  --contour-opacity: 0.09;
}
.ak-infra {
  --contour-ink: #579044;
  --contour-opacity: 0.12;
}
#careers .page-hero {
  --contour-ink: #8fd8f5;
  --contour-opacity: 0.1;
}
.solutions-hero,
#technology .page-hero {
  --contour-ink: var(--cyan);
  --contour-opacity: 0.09;
}
.team-stage {
  --contour-ink: #ff7a4d;
  --contour-opacity: 0.08;
}

/* ---------------------------------------------------------------------------
   9. Akshaa — the hero gets a sweep, because that is what the product does
   --------------------------------------------------------------------------- */

.ak-lens {
  position: relative;
  isolation: isolate;
}
.ak-radar {
  position: absolute;
  z-index: -1;
  inset: -22%;
  pointer-events: none;
  opacity: 0.85;
}
.ak-radar::before,
.ak-radar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(160, 230, 109, 0.16);
}
.ak-radar::after {
  inset: 22%;
  border-color: rgba(160, 230, 109, 0.22);
}
.ak-radar i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(160, 230, 109, 0.26),
    rgba(160, 230, 109, 0.06) 42deg,
    transparent 95deg
  );
  -webkit-mask: radial-gradient(circle, #000 42%, transparent 72%);
  mask: radial-gradient(circle, #000 42%, transparent 72%);
  animation: rotor-spin 7.5s linear infinite;
}

/* ---------------------------------------------------------------------------
   10. Technology — the flattest page on the site, given alternation and depth
   --------------------------------------------------------------------------- */

.tech-method {
  position: relative;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.tech-method:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 54px rgba(10, 61, 88, 0.12);
}
.tech-method .ghost-num {
  --ghost-size: 112px;
  --ghost-opacity: 0.45;
  right: 22px;
  top: -4px;
}

/* ---------------------------------------------------------------------------
   11. Team — a little more mischief
   --------------------------------------------------------------------------- */

.team-moment .image-open {
  cursor: zoom-in;
}
.person-row .person-portrait {
  position: relative;
  overflow: hidden;
}
/* A survey crosshair sweeps the portrait on hover: the people get the same
   treatment as the imagery, which is the joke. */
.person-row .person-portrait::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.75);
  opacity: 0;
  transform: scale(1.12);
  transition:
    opacity 0.4s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.person-row:hover .person-portrait::after {
  opacity: 1;
  transform: scale(1);
}

/* ---------------------------------------------------------------------------
   12. Restraint
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .contour-layer.drift,
  .ak-radar i,
  .scroll-cue i,
  .hud-rec::before {
    animation: none !important;
  }
  .word-wrap > span {
    transform: none !important;
    animation: none !important;
  }
  .hl::after {
    transform: scaleX(1) !important;
  }
  .wipe {
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .survey-mark,
  .scroll-cue {
    display: none !important;
  }
  .magnetic {
    translate: none !important;
    transform: none !important;
  }
}

@media (max-width: 1100px) {
  .tally {
    gap: 20px;
  }
  .hero-hud {
    gap: 12px;
    padding: 8px 12px;
    font-size: 10.5px;
  }
  .hero-hud span + span {
    padding-left: 12px;
  }
  .ak-radar {
    inset: -14%;
    opacity: 0.6;
  }
}
@media (max-width: 760px) {
  .tally {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
  }
  .tally div {
    padding-left: 12px;
  }
  .tally b {
    font-size: 34px;
  }
  .tally span {
    font-size: 10.5px;
    letter-spacing: 0.08em;
  }
  /* There is nowhere for the readout to sit at phone widths without landing
     on the headline, and the hero carries itself there anyway. */
  .hero-hud {
    display: none;
  }
  .scroll-cue {
    display: none;
  }
  .trust-points li .ghost-num,
  .solution-family .ghost-num,
  .tech-method .ghost-num {
    display: none;
  }
}
@media (forced-colors: active) {
  .contour-layer,
  .ak-radar,
  body::after,
  .survey-mark {
    display: none;
  }
  .hl::after {
    display: none;
  }
}
