/* =========================================================
   Components — reusable pieces, built from tokens only
   ---------------------------------------------------------
   Glyphs · Eyebrow · Button · Icon button · Tag · Check list · Info card
   Arrow link · Nav + menu box · Menu panel · Service card · Project card
   Sector row · Logo grid
   ========================================================= */

/* ---------- Glyphs (inherit currentColor) ---------- */
.arr { position: relative; display: inline-block; width: 11px; height: 11px; flex: none; transition: transform var(--dur-base) var(--ease-out); }
.arr::before { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; margin-top: -.75px; background: currentColor; border-radius: 1px; }
.arr::after { content: ""; position: absolute; right: .5px; top: 50%; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.arr--up { rotate: -45deg; }                       /* ↗ */
.arr--back { scale: -1 1; }                        /* ← */
.arr--down { rotate: 90deg; }                      /* ↓ (a hover nudge then moves it down) */

.plus { position: relative; width: 14px; height: 14px; flex: none; transition: transform var(--dur-fill) var(--ease-out); }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; transform: translate(-50%, -50%); }
.plus::before { width: 100%; height: 1.6px; }
.plus::after { width: 1.6px; height: 100%; }

.x { position: relative; width: 14px; height: 14px; }
.x::before, .x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 100%; height: 1.5px; background: currentColor; }
.x::before { transform: translate(-50%, -50%) rotate(45deg); }
.x::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Eyebrow: section label with the cyan dot ---------- */
.eyebrow {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--fs-label); font-weight: var(--fw-semibold); line-height: var(--lh-lead);
  color: var(--color-text-muted);
}
.eyebrow::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-inline-start: 3px;
  border-radius: 50%; background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(109, 224, 243, .25);
}

/* =========================================================
   Button — the notched control. Colour fills up from the bottom on hover.
   Variants: (default = secondary) · --primary · --inverse · --glass
   Sizes:    --sm (40) · default (61) · --lg (72) · --wide · --block
   ========================================================= */
.btn {
  --btn-w: 176px;
  --btn-h: 61px;
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  --btn-border: var(--line);
  --btn-fill: var(--indigo);
  --btn-fg-hover: var(--white);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4);
  width: var(--btn-w); max-width: 100%; min-height: var(--btn-h);
  padding: var(--space-3);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: var(--shape-control);
  font-size: var(--fs-label); font-weight: var(--fw-semibold); line-height: var(--lh-lead);
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-fill);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform var(--dur-fill) var(--ease-out);
}
.btn:hover { color: var(--btn-fg-hover); border-color: var(--btn-fill); }
.btn:hover::before { transform: scaleY(1); }
.btn:hover .arr { transform: translateX(3px); }
/* touch screens keep :hover after a tap, which would leave the button filled */
@media (hover: none) {
  .btn:hover { color: var(--btn-fg); border-color: var(--btn-border); }
  .btn:hover::before { transform: scaleY(0); }
}

.btn--primary { --btn-bg: var(--indigo); --btn-fg: var(--white); --btn-border: var(--indigo); --btn-fill: var(--indigo-deep); }
.btn--inverse { --btn-border: var(--white); }                                  /* white on dark */
.btn--glass   { --btn-bg: rgba(255, 255, 255, .1); --btn-fg: var(--white); --btn-border: transparent; --btn-fill: var(--white); --btn-fg-hover: var(--indigo); }

.btn--sm    { --btn-w: auto; --btn-h: 40px; min-width: 106px; align-items: center; justify-content: center; padding: 0 var(--space-5); }
.btn--lg    { --btn-h: 72px; }
.btn--wide  { --btn-w: 304px; }
.btn--block { --btn-w: 100%; }

/* ---------- Icon button: round carousel control ---------- */
.icon-btn {
  display: grid; place-items: center;
  width: 51px; height: 51px; border-radius: 50%;
  border: 1px solid currentColor; color: var(--color-text);
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), opacity var(--dur-fast);
}
.icon-btn .arr { width: 14px; }
.icon-btn:hover:not(:disabled) { background: var(--color-accent); border-color: var(--color-accent); color: var(--midnight); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ---------- Tag ---------- */
.tag {
  display: inline-block; padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
  background: var(--color-primary); color: var(--color-on-primary);
  font-size: var(--fs-micro); font-weight: var(--fw-semibold); line-height: var(--lh-lead);
}
/* soft: a plain category label beside a number, no chip; several in a row are separated by a dot */
.tag--soft { padding: 0; border-radius: 0; background: none; color: var(--color-text-subtle); font-size: var(--fs-label); font-weight: var(--fw-medium); }
.tag--soft + .tag--soft::before { content: "·"; margin-inline-end: var(--space-2); color: var(--color-text-subtle); }
.tag--outline { padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: none; border: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--fs-caption); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Check list: short "what you get" points with the cyan dot ---------- */
.check-list { display: grid; gap: var(--space-3); }
.check-list li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-body); font-weight: var(--fw-medium); line-height: var(--lh-snug); }
.check-list li::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--color-accent); }

/* ---------- Info card: a notched panel for one short statement (mission, principle, comparison) ---------- */
.info-card {
  display: flex; flex-direction: column; gap: var(--space-4);
  min-height: 280px; padding: var(--space-8) var(--card-pad) var(--card-pad);
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--shape-card);
}
.section--alt .info-card { background: var(--white); }
.info-card__label { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--color-accent-text); font-variant-numeric: tabular-nums; }
.info-card__text { margin-top: auto; font-size: var(--fs-h5); font-weight: var(--fw-medium); line-height: var(--lh-snug); letter-spacing: var(--tracking-body); }

/* ---------- Arrow link ---------- */
.link-arrow { display: inline-flex; align-items: center; gap: var(--space-3); width: fit-content; min-height: 24px; color: var(--color-primary); font-size: var(--fs-label); font-weight: var(--fw-semibold); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* =========================================================
   Nav: fixed logo (hides on scroll down, swaps on dark) + menu box
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--nav-top) var(--edge);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__logo { display: grid; width: var(--logo-w); transition: transform .45s ease-in-out; }
.nav__logo img { grid-area: 1 / 1; width: var(--logo-w); height: var(--logo-h); object-fit: contain; transition: opacity var(--dur-fast) ease; }
.nav__logo .on-dark, .page.is-dark .nav__logo .on-light { opacity: 0; }
.page.is-dark .nav__logo .on-dark { opacity: 1; }
.nav.logo-hidden .nav__logo { transform: translateY(-160%); }

.nav__actions { display: flex; align-items: flex-start; gap: var(--space-2); }

/* Language link: the current language as plain text beside the menu box */
.lang {
  display: grid; place-items: center; height: var(--control-h); padding: 0 var(--space-3);
  font-size: var(--fs-body); font-weight: var(--fw-regular);
  color: var(--color-text); transition: color var(--dur-fast);
}
.lang:hover { color: var(--color-primary); }
.page.is-dark .lang { color: var(--white); }
.page.is-dark .lang:hover { color: var(--cyan); }

.micro {
  width: 208px; overflow: hidden;
  border-radius: var(--shape-control);
  background: var(--color-primary); color: var(--color-on-primary);
  transition: background-color .4s;
}
.page.is-dark .micro { background: rgba(53, 68, 150, .85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
/* one control, one action: a click opens the menu panel; the only hover cue is the plus turning */
.micro__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  width: 100%; height: var(--control-h); padding: 0 var(--space-5);
  font-size: var(--fs-body); font-weight: var(--fw-semibold);
  -webkit-user-select: none; user-select: none;
}
.micro__head:hover .plus { transform: rotate(90deg); }
.underline-link {
  width: fit-content;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur-base) var(--ease-out);
}
.underline-link:hover { background-size: 100% 1px; }

/* Phones and tablets: a solid bar, so nothing floats over the page.
   It slides away while scrolling down and returns on the way up (main.js sets .logo-hidden). */
@media (max-width: 991px) {
  .nav {
    height: var(--nav-h); align-items: center; padding-block: 0;
    background: rgba(245, 246, 249, .94);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    pointer-events: auto;
    transition: transform .45s ease-in-out, background-color .4s, border-color .4s;
  }
  .page.is-dark .nav { background: rgba(10, 18, 48, .9); border-color: var(--midnight-line); }
  .nav.logo-hidden { transform: translateY(-100%); }
  .nav.logo-hidden:focus-within { transform: none; }        /* keyboard users can still reach it */
  .nav.logo-hidden .nav__logo { transform: none; }          /* the whole bar moves, not the logo */
  .nav__logo, .nav__logo img { width: 57px; height: 52px; }
  .nav__actions { align-items: center; gap: var(--space-1); }
  .micro { width: auto; }
  .lang { height: 44px; min-width: 44px; padding: 0 var(--space-2); }
  .micro__head { height: 44px; gap: var(--space-3); padding: 0 var(--space-4); }
}

/* ---------- Menu panel: drops open from the menu box ---------- */
.menu { position: fixed; inset: 0; z-index: var(--z-menu); pointer-events: none; }
.menu::before { content: ""; position: absolute; inset: 0; background: var(--color-scrim); opacity: 0; transition: opacity var(--dur-fill); }
.menu.is-open { pointer-events: auto; }
.menu.is-open::before { opacity: 1; }
.menu__panel {
  position: absolute; top: var(--nav-top); inset-inline-end: var(--edge);
  width: min(480px, calc(100vw - 2 * var(--gutter))); max-height: calc(100dvh - 2 * var(--nav-top));
  display: flex; flex-direction: column; overflow: hidden auto; overscroll-behavior: contain;
  background: radial-gradient(circle at 90% 108%, rgba(92, 185, 237, .28), transparent 42%), var(--color-bg);
  border-radius: var(--shape-panel);
  clip-path: inset(0 0 100% 30% round var(--radius-sm));
  transition: clip-path var(--dur-slow) var(--ease-out);
  -webkit-user-select: none; user-select: none;      /* navigation only: a stray double-click highlights nothing */
}
.menu.is-open .menu__panel { clip-path: inset(0 0 0 0 round var(--radius-sm)); }
.menu__top { display: flex; justify-content: space-between; align-items: center; height: var(--control-h); padding: 0 var(--space-5); font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.menu__close { display: flex; align-items: center; gap: var(--space-3); font-weight: var(--fw-semibold); }
.menu__list { margin-top: var(--space-12); padding: 0 var(--space-5); }
.menu__list li { display: flex; align-items: baseline; gap: var(--space-5); padding: var(--space-2) 0; border-top: 1px solid var(--color-border); overflow: hidden; }
.menu__num { width: 22px; font-size: var(--fs-caption); color: var(--color-accent-text); }
.menu__list a { font-size: clamp(24px, 2.3vw, 32px); font-weight: var(--fw-medium); letter-spacing: var(--tracking-heading); transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast); }
.menu__list a[aria-current="page"]::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-start: var(--space-3); border-radius: 50%; background: var(--color-accent); vertical-align: middle; }
.menu__list:hover a { opacity: .45; }
.menu__list a:hover { opacity: 1; transform: translateX(var(--space-2)); }
.menu__foot { margin-top: auto; padding: var(--space-10) var(--space-5) var(--space-5); display: grid; gap: var(--space-6); }
.menu__legal { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); font-size: var(--fs-label); color: var(--color-text-muted); }
.menu__legal a { transition: color var(--dur-fast); }
.menu__legal a:hover { color: var(--color-text); }
.menu__btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
@media (max-width: 991px) {
  .menu__panel { top: 10px; max-height: calc(100dvh - 20px); }   /* level with the 44px menu box in the bar */
  .menu__top { height: 44px; }                     /* Close lands where the menu box was */
}
@media (max-width: 600px) {
  .menu__list { margin-top: var(--space-6); }
  .menu__foot { padding-top: var(--space-6); gap: var(--space-4); }
  .menu__legal a { padding-block: var(--space-1); }
  .menu__btns { grid-template-columns: 1fr; }
}

/* =========================================================
   Service card — looping video, name top-left, points bottom-right
   ========================================================= */
.service-card {
  position: relative; isolation: isolate; overflow: hidden; flex: none;
  width: 564px; height: 336px; padding: var(--card-pad);
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: var(--radius-lg);
  background: var(--midnight-2); color: var(--white);
  scroll-snap-align: start;
  transform: translateZ(0);
}
.service-card--indigo { background: var(--indigo); }
.service-card__media { position: absolute; inset: 0; z-index: -1; }
.service-card__media video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform var(--dur-slower) var(--ease-soft); }
.service-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 18, 48, .55) 0%, rgba(10, 18, 48, .05) 42%, rgba(10, 18, 48, .7) 100%), rgba(0, 0, 0, .2);
}
.service-card--flip .service-card__media video { transform: scale(1.02) scaleX(-1); }
.service-card:hover .service-card__media video { transform: scale(1.08); }
.service-card--flip:hover .service-card__media video { transform: scale(1.08) scaleX(-1); }
.service-card__head { display: flex; flex-direction: column; gap: var(--space-2); }
.service-card__num { font-size: var(--fs-label); font-weight: var(--fw-medium); color: var(--cyan); font-variant-numeric: tabular-nums; }
.service-card__name { max-width: 380px; }
.service-card__points { align-self: flex-end; display: flex; flex-direction: column; gap: var(--space-2); }
.service-card__points li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-body); font-weight: var(--fw-medium); line-height: var(--lh-snug); white-space: nowrap; }
.service-card__points li::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--cyan); }

@media (max-width: 991px) { .service-card { width: min(78vw, 564px); } }
@media (max-width: 600px) {
  /* phones: the cards stack and scroll with the page, each only as tall as its text (see #servicesCarousel) */
  .service-card { width: 100%; height: auto; min-height: 240px; padding: var(--space-5); gap: var(--space-5); }
  .service-card__name { font-size: var(--fs-h2); line-height: var(--lh-heading); }
  .service-card__media::after { background: linear-gradient(180deg, rgba(10, 18, 48, .5) 0%, rgba(10, 18, 48, .55) 35%, rgba(10, 18, 48, .88) 65%, rgba(10, 18, 48, .92) 100%); }   /* the video shows behind the name; the list sits on near-solid colour */
  .service-card__points { align-self: stretch; gap: var(--space-1); }   /* lines up with the name, on every card */
  .service-card__points li { font-size: var(--fs-body-sm); white-space: normal; }
}

/* =========================================================
   Project card — artwork stage on top, copy below; the whole card is the link
   ========================================================= */
.project-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--color-bg);
  border-radius: var(--shape-card);
  overflow: hidden;
}
.project-card:has(a:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.project-card__body { flex: 1; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) 0 0; }   /* text sits flush with the image edge */
.project-card__meta { display: flex; align-items: center; gap: var(--space-3); }
.project-card__num { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--color-accent-text); }
.project-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }   /* stretch the link over the card */
.project-card__title a:focus-visible { outline: none; }

/* Stage: artwork laid out in design pixels; --u is one design px at any width.
   The zoom layer carries the background + artwork so hovering the card zooms the whole picture. */
.stage {
  --u: calc(100cqw / var(--sw));
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: var(--sw) / 420;
  container-type: inline-size;
}
.stage__zoom { position: absolute; inset: 0; background: inherit; transition: transform 1.2s var(--ease-soft); }
.project-card:hover .stage__zoom { transform: scale(1.06); }

.stage--bravo  { background: radial-gradient(35.71% 35.71% at 50% 35.71%, rgba(124, 104, 232, .55), rgba(124, 104, 232, 0)), linear-gradient(149.88deg, #3b2f7a 14.286%, #1c1640 85.714%); }
.stage--sendd  { background: radial-gradient(35.71% 35.71% at 64.29% 14.29%, rgba(109, 224, 243, .4), rgba(109, 224, 243, 0)), linear-gradient(157.65deg, #eef1f8 14.286%, #dce3f2 85.714%); }
.stage--sikina { background: radial-gradient(35.71% 35.71% at 50% 42.86%, rgba(109, 224, 243, .45), rgba(109, 224, 243, 0)), linear-gradient(157.65deg, #e9f7fb 14.286%, #d6e8f6 85.714%); }
.stage--ticket { background: radial-gradient(35.71% 35.71% at 50% 53.57%, rgba(92, 185, 237, .35), rgba(92, 185, 237, 0)), var(--midnight); }

.phone {
  position: absolute; overflow: hidden; background: #000;
  border: calc(4 * var(--u)) solid #0e0b1e;
  border-radius: calc(22 * var(--u));
  box-shadow: var(--shadow-device);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone--1 { left: calc(69.45 * var(--u)); top: calc(75.22 * var(--u)); width: calc(147 * var(--u)); height: calc(399 * var(--u)); rotate: -6deg; }
.phone--2 { left: calc(198 * var(--u)); top: calc(46 * var(--u)); width: calc(157 * var(--u)); height: calc(408 * var(--u)); }
.phone--3 { left: calc(323.24 * var(--u)); top: calc(90.4 * var(--u)); width: calc(147 * var(--u)); height: calc(466 * var(--u)); rotate: 6deg; }

.browser { position: absolute; overflow: hidden; display: flex; flex-direction: column; background: var(--white); border-radius: calc(10 * var(--u)); box-shadow: var(--shadow-float); }
.browser__bar { display: flex; gap: calc(5 * var(--u)); padding: calc(8 * var(--u)) calc(10 * var(--u)); background: #f1f3f7; }
.browser__bar i { width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%; background: var(--mist); }
.browser img { width: 100%; object-fit: cover; }
.browser--main { left: calc(54 * var(--u)); top: calc(50 * var(--u)); width: calc(567 * var(--u)); }
.browser--main img { height: calc(535 * var(--u)); }
.browser--float { left: calc(360 * var(--u)); top: calc(193 * var(--u)); width: calc(368 * var(--u)); }
.browser--float img { height: calc(178 * var(--u)); }

.mockup { position: absolute; left: calc(90 * var(--u)); top: calc(25 * var(--u)); width: calc(585 * var(--u)); height: calc(370 * var(--u)); filter: drop-shadow(0 calc(30 * var(--u)) calc(40 * var(--u)) rgba(17, 22, 43, .22)); }
.render { position: absolute; left: calc(49 * var(--u)); top: calc(43 * var(--u)); width: calc(445 * var(--u)); height: calc(334 * var(--u)); }
.mockup img, .render img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Sector row ---------- */
.sector {
  display: grid; gap: var(--space-3); justify-items: start;
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.sector__title { margin-bottom: calc(-1 * var(--space-2)); transition: color var(--dur-fast); }
.sector__desc { max-width: 544px; }
.sector .arr { justify-self: end; color: var(--color-primary); }
.sector:hover .sector__title { color: var(--color-primary); }
.sector:hover .arr { transform: translateX(4px); }
/* phones: the arrow sits beside the tag instead of taking a line of its own */
@media (max-width: 600px) {
  .sector { grid-template-columns: minmax(0, 1fr) auto; }
  .sector > * { grid-column: 1; }
  .sector > .arr { grid-column: 2; grid-row: 1; align-self: center; }
}

/* ---------- Logo grid: 7 per row, short last row centred ---------- */
.logo-grid { display: flex; flex-wrap: wrap; justify-content: center; row-gap: var(--space-14); max-width: 1324px; margin-inline: auto; }
.logo-grid li { flex: 0 0 calc(100% / 7); height: 88px; padding: 0 var(--space-5); display: grid; place-items: center; }
.logo-grid img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s var(--ease-soft); }
.logo-grid li:hover img { transform: scale(1.06); }
@media (max-width: 991px) { .logo-grid { row-gap: var(--space-8); } .logo-grid li { flex-basis: 25%; } }
@media (max-width: 600px) { .logo-grid { row-gap: var(--space-5); } .logo-grid li { flex-basis: calc(100% / 3); height: 64px; padding: 0 var(--space-2); } }
