/* ORBIT - components: header, navigation, mobile menu, modal (shared UI) */

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--header-height);
  opacity: 0;
  transition: .2s;
  background-image: linear-gradient(180deg, #141414, color-mix(in srgb, #141414, transparent 30%));
}

.header.is-filled::before,
.header.is-open::before {
  opacity: 1;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header__content {
  position: absolute;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: min(var(--max-section-width), 100% - var(--screen-padding) * 2);
  min-height: var(--header-height);
}

.brand {
  position: relative;
  display: block;
  width: 165px;
  height: 50px;
  flex-shrink: 0;
}
.brand__svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* nav */
.nav { margin-right: -30px; display: flex; align-items: center; justify-content: center; }
.nav ul { display: flex; align-items: center; justify-content: center; }
.nav li { list-style: none; }

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: var(--header-height);
  margin-right: var(--m);
}

.nav-link__parent {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  font-family: var(--font-text);
  font-weight: 500;
  color: var(--c-white);
  font-size: 16px;
  line-height: 28px;
  cursor: pointer;
  outline: none;
}

.nav-link:hover .nav-link__parent::after,
.nav-link:focus-within .nav-link__parent::after {
  content: "";
  position: absolute;
  bottom: var(--s);
  left: 0;
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-accent);
}

.nav-link--arrow:hover .nav-link__parent::before,
.nav-link--arrow.is-open .nav-link__parent::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: calc(50% - 10px);
  width: 20px;
  height: 12px;
  background: var(--c-page);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.nav-children {
  position: absolute;
  top: calc(100% - 1px);
  left: -20px;                     /* reference: panel starts 20px left of its trigger */
  min-width: 400px;                /* reference 560px holds icons + 3-level items; ORBIT has 3 text items */
  padding: 20px;
  border-radius: 20px;
  background: var(--c-page);
  display: none;
  flex-direction: column;
  gap: 10px;
}

/* opens on mouse hover, or via its disclosure button (Enter / Space / click → .is-open, set by script.js) */
.nav-link:hover .nav-children,
.nav-link.is-open .nav-children { display: flex; }
.nav-link.is-dismissed:not(.is-open) .nav-children,
.nav-link.is-dismissed:not(.is-open) .nav-link__parent::before { display: none; }

.nav-children a {
  display: block;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 28px;
  font-weight: 700;
  color: var(--c-dark);
  white-space: nowrap;
  transition: background-color .2s;
}
.nav-children a small { display: block; font-size: 16px; line-height: 28px; font-weight: 400; color: var(--c-text); }
.nav-children a:hover { background: var(--c-white); color: var(--c-accent-text); }

/* togglers */
.togglers { display: flex; align-items: center; align-self: center; }

.lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 28px;
}

.lang__globe {
  position: relative;
  display: flex;
  width: calc(32px + var(--s) * 2);
  height: var(--header-height);
  align-items: center;
  justify-content: center;
}

.lang__globe::before {
  content: "";
  display: block;
  width: 32px;
  height: 100%;
  background-color: var(--c-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='16' cy='16' r='12.5'/%3E%3Cellipse cx='16' cy='16' rx='5.5' ry='12.5'/%3E%3Cpath d='M3.5 16h25M5.6 9.5h20.8M5.6 22.5h20.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='16' cy='16' r='12.5'/%3E%3Cellipse cx='16' cy='16' rx='5.5' ry='12.5'/%3E%3Cpath d='M3.5 16h25M5.6 9.5h20.8M5.6 22.5h20.8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lang:hover .lang__globe::before { background-color: var(--c-accent); }

.lang__list {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--s);
  border-radius: var(--s);
  background-color: var(--c-page);
  box-shadow: 0 0 10px 0 rgba(64, 64, 64, .25);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}
.lang:hover .lang__list,
.lang:focus-within .lang__list { opacity: 1; pointer-events: all; }
.lang__list > * {
  padding: 6px 16px;
  border-radius: 10px;
  background: var(--c-white);
  color: var(--c-text);
  white-space: nowrap;
}
.lang__list .is-active { color: var(--c-accent-text); }
.lang__list .is-disabled { color: #a6a6b3; cursor: not-allowed; }

.app-download {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  align-self: center;
  justify-content: center;
  height: 40px;
  padding: var(--xxs) var(--xs);
  background: transparent;
  border-radius: 16px;
  border: 1px solid var(--c-border);
  font-family: var(--font-text);
  font-weight: 700;
  color: var(--c-white);
  font-size: 16px;
  line-height: 28px;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.app-download:hover { background: var(--c-white); color: var(--c-dark); }

.burger {
  display: none;
  position: relative;
  margin-left: 16px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}
.burger::after { content: ""; position: absolute; inset: -12px; }   /* 44 x 44px tap target; the icon stays 20 x 20 */
.burger__open { display: block; width: 20px; }
.burger__line { display: block; height: 2px; background-color: var(--c-white); border-radius: 16px; }
.burger__line:nth-child(1) { width: 100%; }
.burger__line:nth-child(2) { width: 65%; margin-top: 5px; }
.burger__line:nth-child(3) { width: 40%; margin-top: 5px; }
.burger__cross { display: none; position: relative; width: 20px; height: 20px; }
.burger__cross::before, .burger__cross::after {
  content: ""; position: absolute; inset: 0; margin: auto; height: 2px; width: 100%;
  background-color: var(--c-white); border-radius: 30px;
}
.burger__cross::before { transform: rotate(45deg); }
.burger__cross::after { transform: rotate(-45deg); }
.header.is-open .burger__open { display: none; }
.header.is-open .burger__cross { display: block; }

.mobile-menu {
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  background: var(--c-page);
  padding: 20px var(--screen-padding) var(--l);   /* reference: white panel 20px below the bar, screen gutters */
  display: none;
}
.header.is-open .mobile-menu { display: block; }
.mobile-menu__list { list-style: none; padding-left: 16px; border-radius: 20px; background: var(--c-white); }
.mobile-menu__list a, .mobile-menu__demo {
  display: block;
  width: 100%;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--c-page);
  text-align: left;
  color: var(--c-dark);
  font-size: 16px;
  line-height: 28px;
  font-weight: 700;
}
.mobile-menu__list li:last-child > * { border-bottom: 0; }
.mobile-menu__list a:hover, .mobile-menu__demo:hover { color: var(--c-accent-text); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 20, 20, .6); }
.modal__box {
  position: relative; width: min(420px, calc(100% - 32px)); padding: 40px 32px 32px;
  border-radius: 20px; background: var(--c-white); text-align: center;
}
.modal__title { font-size: 24px; line-height: 36px; font-weight: 700; color: var(--c-dark); }
.modal__badge {
  display: inline-block; margin-bottom: 12px; padding: 2px 12px; border-radius: 10px;
  background: rgba(52, 190, 144, .14); color: #1f8f69; font-size: 12px; line-height: 22px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.modal__ok {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; margin-top: 24px; padding: 0 32px;
  border-radius: 14px; background: var(--c-dark); color: var(--c-white); font-weight: 700; font-size: 16px; line-height: 28px;
}
.modal__ok:hover { background: #3a3a3c; }

/* Header, dropdown and menu focus: one 2px ring in the control's text colour, so it contrasts with whatever is behind
   it — white on the dark bar / hero, dark on the light dropdown and menu panels; never overlapping a label or clipped
   by the viewport edge. */
.header a:focus-visible, .header button:focus-visible { outline: 2px solid var(--c-white); outline-offset: 2px; border-radius: 8px; }
/* full-height nav items: the ring is drawn by the underline pseudo-element as a box around the label (never clipped) */
.header .nav-link__parent:focus-visible { outline: none; }
.header .nav-link__parent:focus-visible::after {
  content: ""; top: 18px; bottom: 18px; left: -8px; width: auto; right: -8px; height: auto;
  background: none; border: 2px solid var(--c-white); border-radius: 8px;
}
.header .lang__globe:focus-visible { outline-offset: -8px; }   /* full-height box: ring around the icon */
.header .burger:focus-visible { outline-offset: 10px; }            /* ring around the whole 44 x 44px target */
.header .nav-children a:focus-visible, .header .mobile-menu__list a:focus-visible, .header .mobile-menu__demo:focus-visible { outline-color: var(--c-dark); }
.header .nav-children a:focus-visible { outline-offset: 0; }
.modal__ok:focus-visible, .modal__close:focus-visible { outline: 2px solid var(--c-accent-text); outline-offset: 3px; }
.modal__text { margin: 12px 0 0; font-size: 16px; line-height: 28px; color: var(--c-text); }
.modal__close { position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; }
.modal__close::before, .modal__close::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 2px; background: var(--c-dark); border-radius: 2px;
}
.modal__close::before { transform: rotate(45deg); }
.modal__close::after { transform: rotate(-45deg); }

/* ---------- Tablet (≤1199px) ---------- */
@media (max-width: 1199px) {
  .brand { width: 167px; height: 44px; }
  .nav { display: none; }
  .burger { display: flex; }
  .lang__globe::before { height: 24px; }
  .app-download { display: none; }   /* reference tablet header: logo, language, burger only */
}

/* ---------- Phone (≤767px) ---------- */
@media (max-width: 767px) {
  .brand { display: flex; align-self: center; width: 120px; height: 32px; }
}

/* =====================================================================
   Shared section components (used by Section 1 onwards)
   ===================================================================== */

/* Section shell: centred 1120px column with screen gutters */
main > section { scroll-margin-top: var(--header-height); }
.section { display: flex; justify-content: center; padding: 0 var(--screen-padding); }
.section--mt { margin-top: var(--xl); }
.section__content { position: relative; width: 100%; max-width: var(--max-section-width); }

/* Centred section heading */
.section-title {
  max-width: 930px;
  margin: 0 auto var(--l);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 48px;
  line-height: 64px;
  color: var(--c-dark);
  text-align: center;
}

/* Text link with an arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 20px;
  line-height: 32px;
  color: var(--c-accent-text);
}
.link-arrow::after {
  content: "";
  width: 32px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath d='M9 12h14m-5-5 5 5-5 5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath d='M9 12h14m-5-5 5 5-5 5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .15s ease;
}
.link-arrow:hover::after { transform: translateX(4px); }

/* List with round check marks */
.checklist { margin: var(--s) 0 0; padding: 0; list-style: none; }
.checklist li {
  display: flex;
  margin-bottom: var(--s);
  font-size: 20px;
  line-height: 32px;
  color: var(--c-text);
}
.checklist li:last-child { margin-bottom: 0; }
.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 4px 12px 4px 0;
  border-radius: 50%;
  background: rgba(52, 190, 144, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7.5 12.3 3 3 6-6.3' fill='none' stroke='%2334be90' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px no-repeat;
}

/* Text for assistive technology only (status messages) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Pause / Play button for automatically moving content (WCAG 2.2.2).
   Shows a pause icon (two bars) while the content moves and a play triangle once paused (.is-paused). */
.motion-toggle {
  position: relative; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 50%;
  background: var(--c-white); color: var(--c-dark); box-shadow: 0 2px 8px rgba(38, 38, 46, .1);
  cursor: pointer; transition: box-shadow .2s, background-color .2s, border-color .2s;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle::before, .motion-toggle::after {
  content: ""; position: absolute; top: 50%; width: 4px; height: 14px; margin-top: -7px; border-radius: 1px; background: currentColor;
}
.motion-toggle::before { left: calc(50% - 6px); }
.motion-toggle::after { left: calc(50% + 2px); }
.motion-toggle.is-paused::before {
  left: calc(50% - 4px); width: 0; height: 0; border-radius: 0; background: none;
  border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor;
}
.motion-toggle.is-paused::after { display: none; }
.motion-toggle:hover { box-shadow: 0 4px 14px rgba(38, 38, 46, .18); }
.motion-toggle:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
/* on dark bands */
.motion-toggle--inverse { border-color: rgba(254, 254, 254, .3); background: transparent; color: var(--c-white); box-shadow: none; }
.motion-toggle--inverse:hover { border-color: rgba(254, 254, 254, .6); background: rgba(255, 255, 255, .08); box-shadow: none; }

/* Small "demonstration content" caption */
.demo-note { margin: var(--s) 0 0; font-size: 14px; line-height: 22px; color: #6a6c76; text-align: center; }

/* Reveal on scroll (only when js/reveal.js is active) */
.reveal-on .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal-on .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 1199px) {
  .section-title { font-size: 40px; line-height: 52px; }
  .link-arrow { font-size: 18px; line-height: 30px; }
  .checklist li { font-size: 18px; line-height: 30px; }
  .checklist li::before { margin: 3px 12px 3px 0; }
}

@media (max-width: 767px) {
  .section-title { font-size: 32px; line-height: 44px; }
  .link-arrow { font-size: 16px; line-height: 28px; }
  .checklist li { font-size: 16px; line-height: 28px; }
  .checklist li::before { margin: 2px 12px 2px 0; }
}

/* =====================================================================
   Outlined button + dark APK link (download blocks on light backgrounds)
   ===================================================================== */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding: 0 var(--s);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: transparent;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 20px;
  line-height: 32px;
  color: var(--c-dark);
  white-space: nowrap;
  transition: border-color .2s, background-color .2s;
}
.btn-outline:not(:disabled):hover { border-color: var(--c-dark); }
.btn-outline:disabled { cursor: not-allowed; }

.apk-link.apk-link--dark { color: var(--c-dark); }
.apk-link.apk-link--dark::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7.5 10.5 12 15l4.5-4.5M5 16v2.5A1.5 1.5 0 0 0 6.5 20h11a1.5 1.5 0 0 0 1.5-1.5V16'/%3E%3C/svg%3E");
}
.apk-link.apk-link--dark:hover { color: var(--c-accent-text); }   /* light backgrounds: the bright accent is 2.3:1 on white */
.apk-link.is-disabled { cursor: not-allowed; }
.apk-link.is-disabled:hover { color: inherit; }

@media (max-width: 1199px) {
  .btn-outline { font-size: 18px; line-height: 30px; }
}
@media (max-width: 767px) {
  .btn-outline { height: 56px; font-size: 16px; line-height: 28px; }
}
