/* ==========================================================================
   Components — reusable UI pieces
   ========================================================================== */

/* ---------- Headings ---------- */
.h2 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  font-weight: 600;
}

:root[lang="en"] .h2 {
  font-stretch: 118%;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h3 {
  font-size: var(--fs-xl);
  line-height: 1.2;
}

.kicker {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

/* ---------- Eyebrow (section label with a bearing tick) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-block-end: var(--space-5);
}

:root[lang="ar"] .eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  letter-spacing: 0;
  font-weight: 500;
}

.eyebrow__mark {
  width: 28px;
  height: 1px;
  background: currentColor;
  position: relative;
}

.eyebrow__mark::after {
  content: "";
  position: absolute;
  inset-inline-end: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.eyebrow--light {
  color: #ffc06b;
}

/* ---------- Section header ---------- */
.section-head {
  margin-block-end: clamp(2.5rem, 2rem + 3vw, 5rem);
}

.section-head--split {
  display: grid;
  gap: var(--space-6);
  align-items: end;
}

.section-head__lede {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  max-width: 46ch;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text-primary);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 52px;
  padding-inline: var(--space-6);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
  will-change: transform;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent-strong);
  transform: translateY(101%);
  transition: transform var(--dur-short) var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: none;
}

.btn--accent {
  --btn-bg: var(--accent);
  --btn-fg: #1b1206;
}

.btn--accent:hover {
  box-shadow: var(--glow-accent);
}

.btn--ghost {
  --btn-fg: #fff;
  background: rgba(3, 24, 43, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.btn--ghost::before {
  background: rgba(255, 255, 255, 0.12);
}

.btn--small {
  min-height: 40px;
  padding-inline: var(--space-5);
  font-size: var(--fs-xs);
}

.btn--large {
  min-height: 64px;
  padding-inline: var(--space-7);
  font-size: var(--fs-md);
}

.btn__arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate var(--dur-short) var(--ease-out);
}

.btn:hover .btn__arrow {
  translate: -4px 0;
}

:root[dir="ltr"] .btn:hover .btn__arrow {
  translate: 4px 0;
}

/* ---------- Icon button ---------- */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: box-shadow var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.icon-btn:hover {
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-toggle__txt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-nav);
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--text-primary);
  transition: background-color var(--dur-medium) var(--ease-out), box-shadow var(--dur-medium) var(--ease-out), transform var(--dur-medium) var(--ease-out);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--nav-h);
}

/* Over the hero photo the bar is transparent with light content */
.nav:not(.is-scrolled) {
  color: #fff;
}

.nav:not(.is-scrolled) .icon-btn {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.nav.is-scrolled {
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__brand {
  flex: none;
  display: flex;
  align-items: center;
  border-radius: var(--radius-xs);
}

.nav__logo {
  width: clamp(150px, 12vw, 190px);
  height: auto;
  aspect-ratio: 1712 / 376;
  color: currentColor;
  fill: currentColor;
}

.nav__links {
  position: relative;
  margin-inline-start: auto;
}

.nav__links ul {
  display: flex;
  gap: var(--space-1);
}

.nav__link {
  position: relative;
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  opacity: 0.78;
  border-radius: var(--radius-pill);
  transition: opacity var(--dur-micro) var(--ease-out);
}

.nav__link:hover,
.nav__link.is-active {
  opacity: 1;
}

.nav__indicator {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transition: transform var(--dur-medium) var(--ease-out), width var(--dur-medium) var(--ease-out), opacity var(--dur-short);
  opacity: 0;
}

.nav__indicator.is-visible {
  opacity: 1;
}

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

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
}

.nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-short) var(--ease-out);
}

.nav__burger[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav__burger[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* Theme toggle icon swap */
.i-moon {
  display: none;
}

:root[data-mode="light"] .i-sun,
:root[data-theme="light"]:not([data-mode="dark"]) .i-sun {
  display: none;
}

:root[data-mode="light"] .i-moon,
:root[data-theme="light"]:not([data-mode="dark"]) .i-moon {
  display: block;
}

/* ---------- Mobile menu ---------- */
.mobile-menu[hidden] {
  display: none;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + var(--space-6)) var(--gutter) calc(var(--space-7) + env(safe-area-inset-bottom, 0px));
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-y: auto;
}

.mobile-menu__list {
  display: grid;
  gap: var(--space-1);
}

.mobile-menu__list a {
  display: block;
  padding-block: var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 3vw, 2.5rem);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.mobile-menu__foot {
  color: var(--accent);
  margin-top: var(--space-7);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .nav {
  color: var(--text-primary);
}

body.menu-open .nav .icon-btn {
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ---------- Lists / tags / chips ---------- */
.tick-list {
  display: grid;
  gap: var(--space-3);
}

.tick-list li {
  position: relative;
  padding-inline-start: var(--space-6);
  color: var(--text-secondary);
}

.tick-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 12px;
  height: 7px;
  border-inline-start: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

:root[dir="rtl"] .tick-list li::before {
  transform: rotate(45deg) scaleX(-1);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag-list li {
  padding: 0.2rem 0.7rem;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
}

.chip--soon {
  color: var(--accent-2);
}

.pin-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.pin-dot--live {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.pin-dot--soon {
  background: transparent;
  border: 2px solid var(--accent-2);
  box-shadow: 0 0 0 4px var(--accent-2-soft);
}

/* ---------- Social links ---------- */
.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-spring);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.social-link svg,
.channel svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-link svg.stroke,
.channel svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

/* ---------- Custom cursor ---------- */
.cursor {
  display: none;
}

.has-cursor .cursor {
  display: block;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
}

.has-cursor,
.has-cursor a,
.has-cursor button,
.has-cursor [data-lightbox] {
  cursor: none;
}

.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  will-change: transform;
}

.cursor__dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--accent);
}

.cursor__ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  transition: width var(--dur-short) var(--ease-out), height var(--dur-short) var(--ease-out), margin var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), opacity var(--dur-short);
}

.cursor__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #1b1206;
  opacity: 0;
  transition: opacity var(--dur-micro);
}

.cursor.is-hover .cursor__ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  background: var(--accent-soft);
}

.cursor.is-cta .cursor__ring {
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.5);
}

.cursor.is-cta .cursor__dot {
  opacity: 0;
}

.cursor.is-view .cursor__ring {
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  background: var(--accent);
  border-color: var(--accent);
}

.cursor.is-view .cursor__label {
  opacity: 1;
}

.cursor.is-view .cursor__dot,
.cursor.is-hidden .cursor__dot,
.cursor.is-hidden .cursor__ring {
  opacity: 0;
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(1200px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: #000;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(2, 12, 22, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox__img {
  width: 100%;
  max-height: calc(100vh - 2rem);
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__close {
  position: absolute;
  top: var(--space-3);
  inset-inline-end: var(--space-3);
  z-index: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.lightbox[open] {
  animation: lightbox-in var(--dur-medium) var(--ease-out);
}
