/* field.css (2 Nov 2026): "Our robots in the field": a map of Jordan with real projects, then a wall of short real clips.
   Only the site's tokens (index.html :root and html[data-theme="light"]); teal stays a thin accent. */
.field { background: var(--black); }
html[data-theme="light"] .field { border-bottom: 1px solid var(--line); }

/* ---------- the map and the cards ---------- */
.fmap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 3.4vw, 48px); align-items: stretch; }
.fmap-map { position: relative; aspect-ratio: 419.1 / 466.2; border-radius: 28px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 24% 42%, rgba(74, 213, 253, .10), transparent 70%), linear-gradient(180deg, var(--deep), var(--black)); }
.fmap-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fgrat path { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; opacity: .7; }
.fgrat text { fill: var(--dim); font-family: "Lato", sans-serif; font-size: 9px; font-style: italic; letter-spacing: .06em; }
.fland { fill: var(--panel); stroke: var(--teal); stroke-opacity: .6; stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.fdotsfill { fill: url(#fdots); pointer-events: none; }
#fdots circle { fill: var(--teal); opacity: .26; }
.fsea { fill: var(--teal); fill-opacity: .16; stroke: var(--teal); stroke-opacity: .45; stroke-width: 1; vector-effect: non-scaling-stroke; }
.flabel { position: absolute; transform: translateY(-50%); font-family: var(--display); font-size: 12px; font-style: italic; color: var(--dim); white-space: nowrap; pointer-events: none; }
.fhint { position: absolute; right: 6%; bottom: 5%; max-width: 46%; text-align: right; font-family: var(--display); font-size: 13px; line-height: 1.5; color: var(--dim); }

/* pins: real buttons; the dot's centre sits on the place */
.fpin { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 0; margin: 0; background: none; border: 0; cursor: pointer;
  color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 13px; line-height: 1; white-space: nowrap; transform: translate(-9px, -50%); }
.fpin::before { content: ""; position: absolute; inset: -8px -6px; }   /* a bigger target */
.fpin.up { flex-direction: column-reverse; gap: 7px; transform: translate(-50%, calc(-100% + 9px)); }
.fpin.down { flex-direction: column; align-items: flex-start; gap: 6px; transform: translate(-9px, -9px); }
.fdot { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); border: 3px solid var(--black);
  box-shadow: 0 0 0 1px rgba(74, 213, 253, .55), 0 0 22px rgba(74, 213, 253, .55); transition: transform .35s var(--ease); }
.fdot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid var(--teal); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .fdot::after { animation: fping 2.8s var(--ease) infinite; }
  .fpin:nth-of-type(2) .fdot::after { animation-delay: .7s; } .fpin:nth-of-type(3) .fdot::after { animation-delay: 1.4s; } .fpin:nth-of-type(4) .fdot::after { animation-delay: 2.1s; }
  @keyframes fping { 0% { transform: scale(.5); opacity: .8; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
}
.fname { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: rgba(0, 19, 31, .72); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .3s var(--ease), color .3s, border-color .3s; }
.fcount { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--teal); color: #00243A;
  font-family: "Lato", sans-serif; font-weight: 900; font-size: 11px; font-style: italic; }
.fcount:empty { display: none; }
.fpin:hover .fname, .fpin[aria-expanded="true"] .fname { border-color: var(--teal); }
.fpin.on .fdot { transform: scale(1.25); }
.fpin.on .fname { background: var(--teal); border-color: var(--teal); color: #00243A; }
.fpin.on .fcount { background: #00243A; color: var(--teal); }
.fpin:focus-visible { outline: none; }
.fpin:focus-visible .fname { outline: 2px solid var(--teal); outline-offset: 3px; }

/* the small list of a place with several projects */
.fpop { position: absolute; z-index: 5; width: min(270px, calc(100% - 16px)); padding: 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45); animation: fpop .25s var(--ease); }
@keyframes fpop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fpop button { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; width: 100%; padding: 6px; border: 0; border-radius: 11px; background: none; color: var(--ink);
  text-align: start; cursor: pointer; font-family: var(--display); }
html[data-lang="ar"] .fpop button { direction: rtl; }
.fpop button:hover, .fpop button:focus-visible { background: rgba(74, 213, 253, .1); outline: none; }
.fpop .fth { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--panel-2); }
.fpop .fth img { width: 100%; height: 100%; object-fit: cover; }
.fpop b { display: block; font-size: 14px; font-weight: 800; line-height: 1.35; }
.fpop small { display: block; font-size: 12.5px; color: var(--teal); line-height: 1.4; }

/* cards: one at a time beside the map, a swipeable row on phones */
.fcards { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 18px; min-width: 0; }
.ftrack { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 26px; }
.ftrack::-webkit-scrollbar { display: none; }
.ftrack:focus-visible { outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) { .ftrack { scroll-behavior: smooth; } }
.fcard { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  min-height: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; }
.fmedia { position: relative; min-height: 220px; background: var(--panel-2); overflow: hidden; }
.fmedia img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.fmedia-type { display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px;
  background: radial-gradient(circle at 50% 46%, rgba(74, 213, 253, .22), transparent 62%), linear-gradient(160deg, var(--panel-2), var(--deep)); }
.fmedia-type b { font-family: var(--display); font-weight: 900; font-size: clamp(54px, 6vw, 92px); line-height: 1; letter-spacing: -.02em;
  background: linear-gradient(180deg, #FFFFFF 0%, #4AD5FD 130%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
html[data-lang="en"] .fmedia-type b { font-family: "Lato", sans-serif; font-style: italic; text-transform: uppercase; }
.fmedia-type i { font-family: "Lato", sans-serif; font-style: normal; font-size: 12.5px; letter-spacing: .18em; color: var(--soft); }
.ftext { display: grid; align-content: center; gap: 14px; padding: clamp(24px, 3vw, 42px); }
.fmeta { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--teal); }
html[data-lang="en"] .fmeta { letter-spacing: .1em; text-transform: uppercase; font-size: 11.5px; }
.ftext h3 { font-weight: 800; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; }
html[data-lang="en"] .ftext h3 { font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1.08; letter-spacing: .005em; }
.ftext p { color: var(--soft); font-size: 16px; line-height: 1.75; }
html[data-lang="en"] .ftext p { line-height: 1.6; }
.ftext .fbig { font-family: "Lato", sans-serif; font-weight: 900; font-style: italic; font-size: clamp(34px, 3.2vw, 50px); line-height: 1; letter-spacing: -.02em; justify-self: start; white-space: nowrap;
  background: linear-gradient(180deg, #FFFFFF 0%, #4AD5FD 130%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-block: 4px; }
.frobots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.frobots a, .frobots > span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1.2; text-decoration: none; }
.frobots a { color: var(--teal); border: 1px solid rgba(74, 213, 253, .45); transition: background .25s, color .25s; }
.frobots a::after { content: "→"; font-family: "Lato", sans-serif; transition: transform .25s var(--ease); }
html[dir="rtl"] .frobots a::after { content: "←"; }
.frobots a:hover { background: var(--teal); color: #00243A; }
.frobots > span { color: var(--soft); border: 1px solid var(--line-2); font-weight: 700; }
.fnav { display: flex; align-items: center; gap: 14px; }
.fnav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--ink);
  font-family: "Lato", sans-serif; font-weight: 900; font-size: 18px; cursor: pointer; transition: border-color .25s, color .25s, background .25s; }
.fnav button:hover { border-color: var(--teal); color: var(--teal); }
.fnav button:disabled { opacity: .35; cursor: default; border-color: var(--line-2); color: var(--ink); }
.fstep { font-family: "Lato", sans-serif; font-weight: 900; font-style: italic; font-size: 15px; letter-spacing: .08em; color: var(--soft); min-width: 64px; text-align: center; }
.fstep b { color: var(--ink); }

.falso { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: clamp(28px, 4vw, 44px); padding-top: 22px; border-top: 1px solid var(--line); }
.falso > b { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--teal); }
html[data-lang="en"] .falso > b { letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.falso ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.falso li { border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; font-family: var(--display); font-weight: 500; font-size: 14.5px; line-height: 1.4; color: var(--soft); }

/* ---------- the wall ---------- */
.fwall-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 30px; margin: clamp(72px, 9vw, 120px) 0 24px; }
.fwall-head h3 { font-weight: 800; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.25; }
html[data-lang="en"] .fwall-head h3 { font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1.05; }
.fwall-head p { color: var(--soft); font-size: 16px; }
.fwall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ftile { position: relative; margin: 0; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--panel-2); isolation: isolate; }
.ftile img, .ftile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 1.2s var(--ease), opacity .6s var(--ease); }
.ftile video { opacity: 0; }
.ftile video.live { opacity: 1; }
.ftile:hover img, .ftile:hover video { transform: scale(1.035); }
.ftile::after { content: ""; position: absolute; inset: 45% 0 0 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(0, 12, 20, .82), rgba(0, 12, 20, 0)); }
.ftile figcaption { position: absolute; z-index: 2; inset: auto 0 0 0; display: grid; gap: 2px; padding: 14px 16px; color: #FFFFFF; }
.ftile .fv { font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.35; }
.ftile .fr { font-family: "Lato", sans-serif; font-weight: 900; font-style: italic; font-size: 13px; letter-spacing: .04em; color: #7FE3FF; justify-self: start; }
html[data-lang="ar"] .ftile .fr > span[lang="ar"] { font-family: var(--display); font-style: normal; }
.fclip { grid-column: span 2; grid-row: span 2; }
.fclip figcaption { padding: 18px 20px; }
.fclip .fv { font-size: 16px; }
/* a quiet "moving" mark on the clips */
.fclip::before { content: ""; position: absolute; z-index: 2; top: 14px; inset-inline-end: 14px; width: 8px; height: 8px; border-radius: 50%; background: #7FE3FF; box-shadow: 0 0 0 4px rgba(127, 227, 255, .2); opacity: 0; transition: opacity .4s; }
.fclip.playing::before { opacity: 1; }
/* a wide clip above the wall: it shows two robots side by side, which a tile would crop */
.ftile.fstage { aspect-ratio: 2 / 1; margin-bottom: 10px; }

/* desktop: two big clips in each band, the photos in pairs between them */
@media (min-width: 1081px) {
  .fwall > :nth-child(1) { grid-area: 1 / 1 / 3 / 3; } .fwall > :nth-child(2) { grid-area: 1 / 3; } .fwall > :nth-child(3) { grid-area: 2 / 3; }
  .fwall > :nth-child(5) { grid-area: 1 / 4 / 3 / 6; } .fwall > :nth-child(4) { grid-area: 1 / 6; } .fwall > :nth-child(6) { grid-area: 2 / 6; }
  .fwall > :nth-child(7) { grid-area: 3 / 2 / 5 / 4; } .fwall > :nth-child(8) { grid-area: 3 / 1; } .fwall > :nth-child(9) { grid-area: 4 / 1; }
  .fwall > :nth-child(11) { grid-area: 3 / 5 / 5 / 7; } .fwall > :nth-child(10) { grid-area: 3 / 4; } .fwall > :nth-child(12) { grid-area: 4 / 4; }
  .fwall > :nth-child(13) { grid-area: 5 / 1 / 7 / 3; } .fwall > :nth-child(14) { grid-area: 5 / 3; } .fwall > :nth-child(15) { grid-area: 6 / 3; }
  .fwall > :nth-child(17) { grid-area: 5 / 4 / 7 / 6; } .fwall > :nth-child(16) { grid-area: 5 / 6; } .fwall > :nth-child(18) { grid-area: 6 / 6; }
}
@media (max-width: 1080px) {
  .fwall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fwall > :nth-child(1) { grid-area: 1 / 1 / 3 / 3; } .fwall > :nth-child(2) { grid-area: 1 / 3; } .fwall > :nth-child(3) { grid-area: 1 / 4; } .fwall > :nth-child(4) { grid-area: 2 / 3; } .fwall > :nth-child(6) { grid-area: 2 / 4; }
  .fwall > :nth-child(5) { grid-area: 3 / 3 / 5 / 5; } .fwall > :nth-child(8) { grid-area: 3 / 1; } .fwall > :nth-child(9) { grid-area: 3 / 2; } .fwall > :nth-child(10) { grid-area: 4 / 1; } .fwall > :nth-child(12) { grid-area: 4 / 2; }
  .fwall > :nth-child(7) { grid-area: 5 / 1 / 7 / 3; } .fwall > :nth-child(11) { grid-area: 5 / 3 / 7 / 5; }
  .fwall > :nth-child(13) { grid-area: 7 / 1 / 9 / 3; } .fwall > :nth-child(17) { grid-area: 7 / 3 / 9 / 5; }
  .fwall > :nth-child(14) { grid-area: 9 / 1; } .fwall > :nth-child(15) { grid-area: 9 / 2; } .fwall > :nth-child(16) { grid-area: 9 / 3; } .fwall > :nth-child(18) { grid-area: 9 / 4; }
}
@media (max-width: 860px) {
  .fmap { grid-template-columns: 1fr; }
  .fmap-map { max-width: 560px; width: 100%; justify-self: center; }
  .fcard { flex-basis: 86%; grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 0; }
  .fmedia { aspect-ratio: 4 / 3; min-height: 0; }
  .ftext { align-content: start; gap: 10px; padding: 20px 20px 24px; }
  .ftext p { font-size: 15.5px; }
  .fnav { justify-content: center; }
}
@media (max-width: 700px) {
  .fpin { font-size: 12px; }
  .fname { padding: 5px 9px; }
  .fgrat text { display: none; }
  .flabel { font-size: 11px; }
  .fhint { font-size: 12px; right: 5%; bottom: 4%; }
  .fwall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ftile { aspect-ratio: 1 / 1; border-radius: 14px; }
  .fwall > :nth-child(n) { grid-area: auto; }
  .fwall > :nth-child(1) { grid-area: 1 / 1 / 3 / 2; } .fwall > :nth-child(2) { grid-area: 1 / 2; } .fwall > :nth-child(3) { grid-area: 2 / 2; }
  .fwall > :nth-child(5) { grid-area: 3 / 2 / 5 / 3; } .fwall > :nth-child(4) { grid-area: 3 / 1; } .fwall > :nth-child(6) { grid-area: 4 / 1; }
  .fwall > :nth-child(7) { grid-area: 5 / 1 / 7 / 2; } .fwall > :nth-child(8) { grid-area: 5 / 2; } .fwall > :nth-child(9) { grid-area: 6 / 2; }
  .fwall > :nth-child(11) { grid-area: 7 / 2 / 9 / 3; } .fwall > :nth-child(10) { grid-area: 7 / 1; } .fwall > :nth-child(12) { grid-area: 8 / 1; }
  .fwall > :nth-child(13) { grid-area: 9 / 1 / 11 / 2; } .fwall > :nth-child(14) { grid-area: 9 / 2; } .fwall > :nth-child(15) { grid-area: 10 / 2; }
  .fwall > :nth-child(17) { grid-area: 11 / 2 / 13 / 3; } .fwall > :nth-child(16) { grid-area: 11 / 1; } .fwall > :nth-child(18) { grid-area: 12 / 1; }
  .fclip { aspect-ratio: auto; }
  .ftile.fstage { aspect-ratio: 16 / 9; margin-bottom: 8px; }
  .ftile figcaption, .fclip figcaption { padding: 10px 12px; }
  .ftile .fv, .fclip .fv { font-size: 12.5px; }
  .ftile .fr { font-size: 12px; }
  .falso li { font-size: 13.5px; }
}

/* ---------- light mode ---------- */
html[data-theme="light"] .fmap-map { background: radial-gradient(ellipse 80% 60% at 24% 42%, rgba(0, 131, 155, .10), transparent 70%), linear-gradient(180deg, #FFFFFF, #EEF4F8); }
html[data-theme="light"] .fland { fill: #E4F0F5; }
html[data-theme="light"] #fdots circle { opacity: .3; }
html[data-theme="light"] .fdot { border-color: #FFFFFF; box-shadow: 0 0 0 1px rgba(0, 131, 155, .5), 0 0 18px rgba(0, 131, 155, .35); }
html[data-theme="light"] .fname { background: rgba(255, 255, 255, .88); }
html[data-theme="light"] .fpin.on .fname, html[data-theme="light"] .fcount { color: #FFFFFF; }
html[data-theme="light"] .fpin.on .fcount { background: #FFFFFF; color: var(--teal); }
html[data-theme="light"] .fpop { box-shadow: 0 24px 50px rgba(0, 36, 58, .18); }
html[data-theme="light"] .fpop button:hover, html[data-theme="light"] .fpop button:focus-visible { background: #E7F4F8; }
html[data-theme="light"] .fcard { box-shadow: 0 20px 50px rgba(0, 36, 58, .08); }
html[data-theme="light"] .fmedia-type { background: radial-gradient(circle at 50% 46%, rgba(0, 131, 155, .16), transparent 62%), linear-gradient(160deg, #E7F0F5, #FFFFFF); }
html[data-theme="light"] .fmedia-type b, html[data-theme="light"] .ftext .fbig { background: linear-gradient(180deg, #00243A 0%, #00839B 120%); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .frobots a { border-color: rgba(0, 131, 155, .45); }
html[data-theme="light"] .frobots a:hover { color: #FFFFFF; }
