/* ==========================================================================
   Future Factory – design system v4 "Ankommen"
   Clear and calm: white ground with light bands, deep blue type that is easy
   to read, the logo cyan for marks and links. Type: Jost (like the logo) for
   Latin, Noto Sans Arabic for Arabic, both at comfortable sizes and weights.
   One memorable thing: the people (people.js) who gather into a sign on a
   round stage beside each heading. Everything else stays quiet and useful.
   Logical properties throughout, so Arabic (dir="rtl") mirrors for free.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no requests to Google) ---------- */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("../fonts/noto-sans-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  color-scheme: light;

  /* Colour */
  --bg: #ffffff;            /* the page */
  --band: #f1f5f8;          /* every other section: a light blue-grey band */
  --stage: #e9f2f6;         /* the round stage under a sign, on white */
  --stage-on-band: #ffffff; /* the stage on a band */
  --ink: #0f2338;           /* headings, primary buttons, footer */
  --ink-hover: #1d3a59;
  --text: #2a3747;          /* body text, 12:1 on white */
  --muted: #4a5869;         /* secondary text, 7.2:1 on white, 6.6:1 on the band */
  --line: #dbe3ea;          /* borders */
  --line-strong: #b9c6d2;
  --cyan: #14a9cb;          /* the logo: marks, icons, people */
  --cyan-ink: #0a6e8a;      /* cyan for links and focus, 5.6:1 on white */
  --cyan-soft: #e3f3f8;     /* icon chips, hover grounds */
  --on-ink: #d3dbe4;        /* body text on ink, 11:1 */
  --on-ink-muted: #9fb0c2;  /* secondary text on ink, 6.9:1 */
  --line-on-ink: rgb(255 255 255 / .14);
  --danger: #b3261e;

  /* Type */
  --font: "Jost", "Noto Sans Arabic", system-ui, "Segoe UI", sans-serif;
  --fs-small: 1rem;
  --fs-body: 1.125rem;
  --fs-lead: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem);
  --fs-h3: 1.375rem;
  --fs-h2: clamp(2rem, 1.55rem + 1.5vw, 2.75rem);
  --fs-h1: clamp(2.375rem, 1.7rem + 2.4vw, 3.625rem);
  --lh-body: 1.6;
  --lh-head: 1.1;

  /* Space and shape */
  --gutter: clamp(1.25rem, .6rem + 2.6vw, 2.5rem);
  --wrap: 80rem;
  --section: clamp(4.5rem, 2.8rem + 6vw, 8rem);
  --header-h: 5rem;
  --pill: 999px;            /* buttons */
  --radius: 1rem;           /* cards */
  --radius-lg: 1.5rem;      /* large panels */
  --ease: cubic-bezier(.22, .7, .18, 1);
}

/* Arabic: more line height, no tracking, a touch larger */
:root:lang(ar) {
  --lh-body: 1.85;
  --lh-head: 1.45;
  --fs-body: 1.1875rem;
  --fs-h1: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.4vw, 2.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: var(--lh-head); text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 500; letter-spacing: -.025em; }
h2 { font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.02em; }
h3 { font-size: var(--fs-h3); font-weight: 500; line-height: 1.3; letter-spacing: -.005em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-block-start: 1em; }
strong { font-weight: 600; color: var(--ink); }
a { color: var(--cyan-ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--cyan-ink); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; inset-block-start: -4rem; z-index: 100;
  padding: .75rem 1.1rem; background: var(--ink); color: #fff; border-radius: var(--pill); text-decoration: none;
}
.skip-link:focus { inset-block-start: 1rem; color: #fff; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text); }
:lang(ar) .lead { line-height: 1.85; }
[dir="rtl"] .ltr-value { direction: ltr; unicode-bidi: isolate; display: inline-block; }
[dir="rtl"] .icon-forward, [dir="rtl"] .icon-dir { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 3.25rem; padding: .75rem 1.6rem;
  border: 1.5px solid transparent; border-radius: var(--pill);
  font: inherit; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-hover); color: #fff; }
.btn-line { border-color: var(--line-strong); color: var(--ink); background: #fff; }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--cyan-soft); color: var(--ink); }

.icon-forward { width: 1.1em; height: 1.1em; flex: none; transition: translate .25s var(--ease); }

/* A text link: underlined, with an arrow that moves on hover */
.text-link {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px; text-underline-offset: .3em;
}
.text-link:hover { color: var(--cyan-ink); }
.text-link:hover .icon-forward { translate: .2em 0; }
[dir="rtl"] .text-link:hover .icon-forward { translate: -.2em 0; }

/* A small round chip that holds a line icon */
.icon-chip {
  display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: var(--cyan-soft); color: var(--cyan-ink);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.icon-chip svg { width: 1.5rem; height: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: rgb(255 255 255 / .96); backdrop-filter: saturate(1.2) blur(12px);
  border-block-end: 1px solid transparent; transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: block; flex: none; margin-inline-end: auto; }
.brand img { width: 150px; }

.nav-toggle {
  display: none; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .45rem 1rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--pill); background: #fff; color: var(--ink);
  font: inherit; font-weight: 500; cursor: pointer;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav ul { display: flex; list-style: none; gap: .15rem; }
.site-nav a.nav-link {
  display: block; padding: .55rem .75rem; border-radius: var(--pill);
  color: var(--ink); font-weight: 500; text-decoration: none; transition: background-color .2s var(--ease);
}
.site-nav a.nav-link:hover { background: var(--band); }
.site-nav a.nav-link[aria-current="page"] { background: var(--cyan-soft); color: var(--cyan-ink); }

.lang-switch { display: flex; gap: .15rem; padding: .2rem; border-radius: var(--pill); background: var(--band); }
.lang-switch a {
  display: grid; place-items: center; min-width: 2.6rem; min-height: 2.4rem; padding-inline: .45rem;
  border-radius: var(--pill); color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(15 35 56 / .12); }

.header-phone {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.header-phone svg { width: 1.1rem; height: 1.1rem; color: var(--cyan-ink); }
.header-phone:hover { color: var(--cyan-ink); }
.site-nav .btn { min-height: 2.9rem; padding-inline: 1.35rem; }
@media (max-width: 82rem) and (min-width: 68.01rem) { .header-phone { display: none; } }

@media (max-width: 68rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 1.5rem;
    padding: 1.25rem var(--gutter) 3rem; background: #fff; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-.5rem);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a.nav-link { padding: 1rem .25rem; border-radius: 0; border-block-end: 1px solid var(--line); font-size: 1.375rem; }
  .site-nav a.nav-link:hover { background: transparent; color: var(--cyan-ink); }
  .site-nav a.nav-link[aria-current="page"] { background: transparent; }
  .lang-switch { align-self: flex-start; }
  .lang-switch a { min-width: 3.5rem; min-height: 2.9rem; }
  .header-phone { font-size: 1.25rem; }
  .site-nav .btn { width: 100%; min-height: 3.25rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Sections ---------- */
main { position: relative; }
.section { position: relative; padding-block: var(--section); background: var(--bg); }
.section.is-band { background: var(--band); --stage-color: var(--stage-on-band); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); gap: 2rem 4rem; align-items: center;
  margin-block-end: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
.section-text { display: grid; gap: 1.25rem; justify-items: start; }
.section-text .lead { max-width: 38rem; }
.section-text .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: .5rem; }
@media (max-width: 52rem) { .section-head { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- People (people.js) ----------
   One fixed canvas over the page that never takes a click. The people gather
   on a round stage beside a heading (a "spot") and form a sign for what the
   visitor points at; the others wait close by. The stage is drawn here, under
   the canvas, so it scrolls with the page. */
.people { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 1s var(--ease); }
.people.is-ready { opacity: 1; }
.people canvas { width: 100%; height: 100%; }
.people-labels { position: absolute; inset: 0; overflow: hidden; }
.people-label {
  position: absolute; left: 0; top: 0; padding: .15rem .65rem; border-radius: var(--pill);
  background: #fff; border: 1.5px solid var(--cyan); color: var(--cyan-ink);
  font-size: .875rem; font-weight: 500; line-height: 1.5; white-space: nowrap; opacity: 0; will-change: transform, opacity;
}

.people-spot { position: relative; justify-self: center; align-self: center; width: min(100%, 17rem); aspect-ratio: 1; }
.people-spot::before {
  content: ""; position: absolute; inset: 4%; border-radius: 50%;
  background: var(--stage-color, var(--stage));
}
.people-caption {
  position: absolute; inset-inline: -2rem; inset-block-start: calc(100% + .5rem); text-align: center;
  color: var(--ink); font-size: .9375rem; font-weight: 500; opacity: 0; transition: opacity .3s var(--ease);
}
.people-caption.is-on { opacity: 1; }
@media (max-width: 52rem) {
  .section-head .people-spot { order: -1; justify-self: start; width: min(46vw, 10rem); }
  .people-caption { display: none; }
}

/* Motion switch: the people's own drift can be turned on and off, and the choice is kept */
.motion-toggle {
  position: fixed; z-index: 40; inset-inline-end: 1rem; inset-block-end: 1rem;
  display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .35rem 1rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--pill); background: #fff;
  color: var(--ink); font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer;
}
.motion-toggle:hover { border-color: var(--ink); }
.motion-dot { width: .65rem; height: .65rem; border-radius: 50%; border: 1.5px solid var(--ink); }
.motion-toggle[aria-pressed="true"] .motion-dot { background: var(--cyan); border-color: var(--cyan); }

/* Phone and mail, large */
.reach { display: grid; gap: .5rem; list-style: none; }
.reach a {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 500; line-height: 1.3;
  color: var(--ink); text-decoration: none;
}
.reach a .icon-chip { width: 2.75rem; height: 2.75rem; }
.reach a .icon-chip svg { width: 1.25rem; height: 1.25rem; }
.reach a:hover { color: var(--cyan-ink); }
.reach a:hover .icon-chip { background: var(--cyan); color: #fff; }
.reach-address { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--ink); color: var(--on-ink-muted); padding-block: 4.5rem 2rem; font-size: var(--fs-small); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem; }
.footer-grid h2 { color: #fff; font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; margin-block-end: 1rem; }
.footer-grid ul { list-style: none; display: grid; gap: .6rem; }
.footer-brand img { width: 140px; filter: brightness(0) invert(1); margin-block-end: 1.25rem; }
.footer-brand p { max-width: 32ch; color: var(--on-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-block-start: 4rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line-on-ink); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Quick contact bar on phones: call or write, always one tap away ---------- */
.quick-bar { display: none; }
@media (max-width: 52rem) {
  .quick-bar {
    position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 45;
    display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / .97); border-block-start: 1px solid var(--line); backdrop-filter: blur(10px);
  }
  .quick-bar .btn { min-height: 3rem; padding-inline: 1rem; }
  body { padding-block-end: calc(4.25rem + env(safe-area-inset-bottom)); }
  /* on phones the switch is a small round button above the bar; its name stays for screen readers */
  .motion-toggle { inset-block-end: calc(4.75rem + env(safe-area-inset-bottom)); width: 2.75rem; padding: 0; justify-content: center; }
  .motion-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
