/* ==========================================================================
   FOTAS page — scoped additions only.
   Loaded ONLY on the FOTAS page (via {% block head_extra %}). The page reuses
   the shared pillar / section / split / cta-band system from styles.css; this
   file adds only the few elements unique to FOTAS (capability tag chips, the
   numbered benefit grid and a small tweak to the illustrative media panel).
   Everything is scoped to body[data-page="fotas"] so it cannot leak elsewhere.
   ========================================================================== */

/* ---- capability tag chips (in the intro split) ---- */
body[data-page="fotas"] .fotas-tags {
  display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem;
}
body[data-page="fotas"] .fotas-tag {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--slate-deep, #4f6675);
  background: rgba(107,130,146,.10);
  border: 1px solid rgba(107,130,146,.28);
  padding: .42rem .85rem; border-radius: 999px;
}
body[data-page="fotas"] .fotas-tag:last-child {
  color: var(--orange, #f1910b);
  background: rgba(241,145,11,.10);
  border-color: rgba(241,145,11,.32);
}

/* ---- illustrative media panel (SVG, not a photo) ---- */
body[data-page="fotas"] .media-panel .viz { z-index: 1; }
body[data-page="fotas"] .media-panel .media-panel__tag { z-index: 3; }

/* ---- numbered benefits grid ---- */
body[data-page="fotas"] .fotas-benefits { margin-top: .6rem; }
body[data-page="fotas"] .fotas-benefit {
  position: relative;
  padding: 1.6rem 1.5rem 1.7rem;
  border-radius: var(--radius-lg, 16px);
  background: var(--surface, #fff);
  border: 1px solid rgba(107,130,146,.16);
  box-shadow: 0 8px 26px rgba(20,24,28,.06);
}
body[data-page="fotas"] .fotas-benefit__n {
  display: inline-block;
  font-size: .9rem; font-weight: 700; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: transparent;
  background: linear-gradient(135deg, var(--orange, #f1910b), var(--red, #ff0000));
  -webkit-background-clip: text; background-clip: text;
}
body[data-page="fotas"] .fotas-benefit h3 {
  margin: .55rem 0 .5rem; font-size: 1.08rem; line-height: 1.25;
}
body[data-page="fotas"] .fotas-benefit p {
  margin: 0; font-size: .92rem; line-height: 1.55; color: var(--text-soft, #5a6470);
}

@media (max-width: 600px) {
  body[data-page="fotas"] .fotas-benefit { padding: 1.25rem 1.2rem 1.35rem; }
}

/* ==========================================================================
   "Inside FOTAS" bento grid — a data-viz capability showcase.
   Vanilla adaptation of a shadcn/Tailwind bento ("features-8"): asymmetric
   6-column grid (3×span-2 row, then 2×span-3 row), brand-recoloured line-art
   SVGs, the shared card surface from above. Replaces the plain capability grid.
   ========================================================================== */
body[data-page="fotas"] .fbento__grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: clamp(.8rem, 1.6vw, 1.05rem); margin-top: .4rem;
}
body[data-page="fotas"] .fcard {
  grid-column: 1 / -1;                 /* mobile: each card full width */
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg, 16px);
  background: var(--surface, #fff);
  border: 1px solid rgba(107,130,146,.16);
  box-shadow: 0 8px 26px rgba(20,24,28,.06);
  transition: transform .28s var(--ease, cubic-bezier(.4,0,.2,1)), box-shadow .28s;
}
body[data-page="fotas"] .fcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -18px rgba(20,24,28,.22);
}
/* brand accent line on the top edge, revealed on hover */
body[data-page="fotas"] .fcard::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--slate,#6b8292), var(--orange,#f1910b), var(--red,#d10812));
  opacity: 0; transition: opacity .28s;
}
body[data-page="fotas"] .fcard:hover::before { opacity: .95; }

@media (min-width: 640px) { body[data-page="fotas"] .fcard--half { grid-column: span 3; } }
@media (min-width: 980px) {
  body[data-page="fotas"] .fcard--w2 { grid-column: span 2; }
  body[data-page="fotas"] .fcard--w3 { grid-column: span 3; }
}

body[data-page="fotas"] .fcard__body { padding: 1.5rem 1.5rem 1.6rem; }
body[data-page="fotas"] .fcard__body h3 { margin: 0 0 .45rem; font-size: 1.08rem; line-height: 1.25; }
body[data-page="fotas"] .fcard__body p { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--text-soft, #5a6470); }

/* card 1 — big scale stat with a hand-drawn arc behind the number */
body[data-page="fotas"] .fcard--stat .fcard__body { text-align: center; }
body[data-page="fotas"] .fstat { position: relative; display: grid; place-items: center; height: 116px; }
body[data-page="fotas"] .fstat__arc {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%,-50%);
  width: 80%; height: auto; color: rgba(107,130,146,.18);
}
body[data-page="fotas"] .fstat__num {
  position: relative; font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.02em;
  color: transparent; background: linear-gradient(120deg, var(--slate-deep,#4f6675), var(--orange,#f1910b));
  -webkit-background-clip: text; background-clip: text;
}

/* card 2 — EMI/light circular motif */
body[data-page="fotas"] .fcirc { display: grid; place-items: center; padding: 1.2rem 0 .4rem; }
body[data-page="fotas"] .fcirc svg { width: 116px; height: 116px; }

/* cards 3 & 4 — line/area charts (DAS waveform, DTS temperature profile) */
body[data-page="fotas"] .fchart { padding: 1.3rem 1.3rem 0; }
body[data-page="fotas"] .fchart svg { display: block; width: 100%; height: auto; }
body[data-page="fotas"] .fchart--inset { padding: 0; }

/* split cards (w3): text column + visual column */
body[data-page="fotas"] .fcard--split .fcard__body { display: grid; gap: 1.3rem; align-items: center; }
@media (min-width: 640px) {
  body[data-page="fotas"] .fcard--split .fcard__body { grid-template-columns: 1fr 1fr; }
}
body[data-page="fotas"] .ficon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: .9rem;
  color: var(--orange, #f1910b);
  background: linear-gradient(135deg, rgba(241,145,11,.16), rgba(209,8,18,.10));
  border: 1px solid rgba(241,145,11,.22);
}
body[data-page="fotas"] .ficon svg { width: 24px; height: 24px; }

/* card 5 — AI located-alerts feed */
body[data-page="fotas"] .falerts { display: flex; flex-direction: column; gap: .55rem; }
body[data-page="fotas"] .falert {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .75rem; border-radius: 10px;
  border: 1px solid rgba(107,130,146,.18); background: rgba(107,130,146,.05);
  font-size: .86rem;
}
body[data-page="fotas"] .falert__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
body[data-page="fotas"] .falert__type { font-weight: 600; color: var(--slate-deep, #4f6675); }
body[data-page="fotas"] .falert__loc { margin-left: auto; color: var(--text-soft, #5a6470); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  body[data-page="fotas"] .fcard { transition: none; }
  body[data-page="fotas"] .fcard:hover { transform: none; }
}
@media (max-width: 600px) {
  body[data-page="fotas"] .fcard__body { padding: 1.25rem 1.2rem 1.35rem; }
}

/* ==========================================================================
   Geodata overlay — the FOTAS "live map" feature on a mock dashboard panel.
   A real MapLibre map (initFotasMap in main.js, same dark style as the contact
   map) draws the calibrated route + located events; the bar, legend and alarm
   panel are HTML overlays (in the page partial, so they translate per language).
   ========================================================================== */
body[data-page="fotas"] .fotas-geo {
  position: relative; margin-top: .4rem;
  border-radius: var(--radius-lg, 16px); overflow: hidden;
  border: 1px solid rgba(20, 24, 28, .12);
  box-shadow: 0 26px 60px -28px rgba(20, 24, 28, .5);
  background: #0d0e10;
}
body[data-page="fotas"] .fotas-geo__bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: .75rem;
  height: 42px; padding: 0 1rem;
  background: linear-gradient(90deg, #14181d, #0f1216);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
body[data-page="fotas"] .fotas-geo__brand {
  font-weight: 800; letter-spacing: .14em; font-size: .82rem; color: #fff;
}
body[data-page="fotas"] .fotas-geo__live {
  margin-left: auto; display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
body[data-page="fotas"] .fotas-geo__live .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2ecc71;
  animation: fotasLive 2s ease-out infinite;
}
@keyframes fotasLive {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .55); }
  70% { box-shadow: 0 0 0 7px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
/* "Illustrative demo" badge: the map traces a real, public airport outline, so
   this label makes clear it is a demonstration, not a live customer deployment */
body[data-page="fotas"] .fotas-geo__demo {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #f7a83a; background: rgba(241, 145, 11, .13);
  border: 1px solid rgba(241, 145, 11, .34);
  padding: .18rem .55rem; border-radius: 999px;
}
body[data-page="fotas"] .fotas-geo__demo .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #f1910b;
}

body[data-page="fotas"] .fotas-geo__map {
  position: relative; width: 100%; height: clamp(360px, 52vh, 540px);
}

body[data-page="fotas"] .fotas-geo__legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  display: flex; flex-wrap: wrap; gap: .35rem .9rem;
  padding: .5rem .75rem; border-radius: 10px;
  background: rgba(13, 14, 16, .72); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: .74rem; color: rgba(255, 255, 255, .82);
}
body[data-page="fotas"] .fotas-geo__legend span { display: inline-flex; align-items: center; gap: .4rem; }
body[data-page="fotas"] .fotas-geo__legend .ln { width: 16px; height: 3px; border-radius: 2px; background: #f1910b; }
body[data-page="fotas"] .fotas-geo__legend .d { width: 7px; height: 7px; border-radius: 50%; border: 2px solid; }
body[data-page="fotas"] .fotas-geo__legend .d--ev { background: #fff; border-color: #f1910b; }
body[data-page="fotas"] .fotas-geo__legend .d--al { background: #ff453a; border-color: #fff; }

body[data-page="fotas"] .fotas-geo__alarm {
  position: absolute; top: 56px; right: 14px; z-index: 3; width: 212px;
  background: #fff; color: #1a2836; border-radius: 12px;
  border: 1px solid rgba(20, 24, 28, .10);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55);
  padding: .8rem .9rem;
}
body[data-page="fotas"] .fotas-geo__alarm-hd {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .92rem; color: #d10812; margin-bottom: .55rem;
}
body[data-page="fotas"] .fotas-geo__alarm-hd .pulse {
  width: 9px; height: 9px; border-radius: 50%; background: #ff453a; flex: 0 0 auto;
  animation: fotasPulse 1.6s ease-out infinite;
}
@keyframes fotasPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 69, 58, .6); }
  70% { box-shadow: 0 0 0 8px rgba(255, 69, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); }
}
body[data-page="fotas"] .fotas-geo__alarm dl { margin: 0; display: grid; gap: .32rem; }
body[data-page="fotas"] .fotas-geo__alarm dl div { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; }
body[data-page="fotas"] .fotas-geo__alarm dt { color: #6a7682; }
body[data-page="fotas"] .fotas-geo__alarm dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* located-event map pins (created by initFotasMap) */
body[data-page="fotas"] .fotas-pin { position: relative; width: 14px; height: 14px; }
/* event marker: white core + orange ring so it reads as a distinct marker ON
   the orange route (a same-colour dot blends into the line); dark halo keeps it
   legible over light basemap patches too. */
body[data-page="fotas"] .fotas-pin__dot {
  position: absolute; inset: 0; margin: auto; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 3px solid #f1910b; box-shadow: 0 0 0 1.5px rgba(13, 14, 16, .55);
}
body[data-page="fotas"] .fotas-pin__ring { position: absolute; inset: -4px; border-radius: 50%; }
body[data-page="fotas"] .fotas-pin--alarm .fotas-pin__dot { background: #ff453a; border-color: #0d0e10; box-shadow: 0 0 0 1.5px rgba(255, 69, 58, .55); }
body[data-page="fotas"] .fotas-pin--alarm .fotas-pin__ring {
  border: 2px solid rgba(255, 69, 58, .75); animation: fotasPing 1.8s ease-out infinite;
}
@keyframes fotasPing { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(2.3); opacity: 0; } }

/* feature row under the map */
body[data-page="fotas"] .fotas-geo__feats { margin-top: 1.4rem; }
body[data-page="fotas"] .fotas-geo__feat {
  padding: 1.4rem 1.4rem 1.5rem; border-radius: var(--radius-lg, 16px);
  background: var(--surface, #fff); border: 1px solid rgba(107, 130, 146, .16);
  box-shadow: 0 8px 26px rgba(20, 24, 28, .06);
}
body[data-page="fotas"] .fotas-geo__feat h3 { margin: .2rem 0 .4rem; font-size: 1.05rem; line-height: 1.25; }
body[data-page="fotas"] .fotas-geo__feat p { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--text-soft, #5a6470); }

/* brand-tame the MapLibre chrome (mirrors .contact-map) */
body[data-page="fotas"] .fotas-geo .maplibregl-ctrl-group { background: rgba(20, 24, 28, .8); border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow); }
body[data-page="fotas"] .fotas-geo .maplibregl-ctrl-group button + button { border-top-color: rgba(255, 255, 255, .1); }
body[data-page="fotas"] .fotas-geo .maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(1); opacity: .85; }
body[data-page="fotas"] .fotas-geo .maplibregl-ctrl-attrib { background: rgba(13, 14, 16, .55); color: rgba(255, 255, 255, .6); }
body[data-page="fotas"] .fotas-geo .maplibregl-ctrl-attrib a { color: rgba(255, 255, 255, .75); }

@media (max-width: 600px) {
  body[data-page="fotas"] .fotas-geo__map { height: 380px; }
  body[data-page="fotas"] .fotas-geo__alarm { width: 168px; top: 50px; right: 10px; padding: .65rem .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="fotas"] .fotas-geo__live .dot,
  body[data-page="fotas"] .fotas-geo__alarm-hd .pulse,
  body[data-page="fotas"] .fotas-pin--alarm .fotas-pin__ring { animation: none; }
}

/* ---- Technology section: two DAS/DTS deep-dive cards ----
   Click morphs the card into its .appx detail panel (reuses .app-tile--x +
   .app-tile__more + initAppExpand). Two columns on EVERY width (incl. phone),
   so the pair stays compact. Dark cards so the morph into the dark appx hero
   reads as one continuous surface. */
body[data-page="fotas"] .fotas-tech__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.7rem, 2.2vw, 1.5rem);
}
body[data-page="fotas"] .tech-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  --tp: clamp(1rem, 2.6vw, 1.9rem);
  gap: clamp(.55rem, 1.6vw, .95rem);
  padding: var(--tp);
  padding-bottom: clamp(3rem, 7vw, 3.4rem);
  border-radius: var(--radius-lg, 16px); overflow: hidden; isolation: isolate; cursor: pointer;
  color: #fff; text-align: left;
  background: radial-gradient(120% 130% at 22% 12%, #22333f, #12161b 72%);
  box-shadow: 0 12px 34px rgba(20,40,60,.20), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
body[data-page="fotas"] .tech-card::after {
  content: ""; position: absolute; left: -16%; bottom: -32%; width: 68%; height: 72%; z-index: 0;
  background: linear-gradient(var(--angle, -22deg), var(--red, #d10812), var(--orange, #f1910b));
  opacity: .16; transform: rotate(var(--angle, -22deg)); filter: blur(5px); pointer-events: none;
}
body[data-page="fotas"] .tech-card > * { position: relative; z-index: 1; }
body[data-page="fotas"] .tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 54px rgba(20,50,75,.32), inset 0 0 0 1px rgba(255,255,255,.11);
}
body[data-page="fotas"] .tech-card:focus-visible { outline: 2px solid var(--orange, #f1910b); outline-offset: 3px; }
body[data-page="fotas"] .tech-card__viz {
  display: block; position: relative; overflow: hidden; aspect-ratio: 2 / 1;
  /* full-bleed: pull to the card's top + side edges (the card's overflow +
     radius round the top corners); the body text keeps its padding */
  margin: calc(-1 * var(--tp)) calc(-1 * var(--tp)) 0;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.07);
}
body[data-page="fotas"] .tech-card__viz img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* scrim so the brand signal line reads over the photo */
body[data-page="fotas"] .tech-card__viz::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(13,14,16,0) 42%, rgba(13,14,16,.6) 100%);
}
/* the DAS waveform / DTS thermal signal line, overlaid along the bottom edge */
body[data-page="fotas"] .tech-card__sig {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; width: 100%; height: auto;
  animation: techSigPulse 3.6s var(--ease) infinite;
}
body[data-page="fotas"] .tech-card--das .tech-card__sig { filter: drop-shadow(0 0 5px rgba(241,145,11,.85)); }
body[data-page="fotas"] .tech-card--dts .tech-card__sig { filter: drop-shadow(0 0 5px rgba(255,58,68,.85)); }
@keyframes techSigPulse { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
body[data-page="fotas"] .tech-card__tag {
  align-self: flex-start; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange, #f1910b); background: rgba(241,145,11,.12);
  border: 1px solid rgba(241,145,11,.30); padding: .22rem .6rem; border-radius: 999px;
}
body[data-page="fotas"] .tech-card--dts .tech-card__tag {
  color: #ff6a6a; background: rgba(209,8,18,.14); border-color: rgba(209,8,18,.34);
}
body[data-page="fotas"] .tech-card__title {
  margin: 0; font-size: clamp(1.02rem, 2.4vw, 1.32rem); font-weight: 700; line-height: 1.2; color: #fff;
}
body[data-page="fotas"] .tech-card__desc {
  margin: 0; font-size: clamp(.82rem, 1.9vw, .92rem); line-height: 1.55; color: rgba(255,255,255,.72);
}
/* re-assert absolute (the .tech-card > * lift rule sets position:relative) */
body[data-page="fotas"] .tech-card .app-tile__more { position: absolute; z-index: 4; right: 1rem; bottom: 1rem; }
@media (max-width: 560px) {
  body[data-page="fotas"] .tech-card { padding-bottom: 2.9rem; gap: .5rem; }
  body[data-page="fotas"] .tech-card .app-tile__more { width: 30px; height: 30px; right: .7rem; bottom: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="fotas"] .tech-card__sig { animation: none; }
  body[data-page="fotas"] .tech-card__sig .tsig-dot { display: none; }
}
