/* ==========================================================================
   Base — reset, typography, shared primitives, motion
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Fixed two-tier header: anchor jumps must clear it. */
  scroll-padding-top: 132px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--cyan); text-decoration: none; transition: color .25s; }
a:hover { color: var(--cyan-lt); }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--cyan); color: var(--navy); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--steel); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

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

/* Screen-reader-only, still focusable (skip link). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip:focus {
  position: fixed;
  inset-inline-start: 16px;
  top: 16px;
  z-index: 10000;
  width: auto; height: auto;
  clip: auto;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  background: var(--cyan);
  color: var(--navy);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Layout shells
   -------------------------------------------------------------------------- */

.shell          { max-width: var(--shell);        margin-inline: auto; width: 100%; }
.shell--wide    { max-width: var(--shell-wide); }
.shell--mid     { max-width: var(--shell-mid); }
.shell--narrow  { max-width: var(--shell-narrow); }

.section {
  padding: var(--sec-y) var(--gutter);
}
.section--tight  { padding-block: 120px; }
.section--relief { position: relative; overflow: hidden; }

/* Radial washes painted behind a section's content. */
.glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Section furniture
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: .24em;
  color: var(--cyan);
  text-transform: uppercase;
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 34px;
  height: 2px;
  background: var(--cyan);
  flex: none;
}
.eyebrow--bare::before { display: none; }

.h2 {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--ink);
  line-height: 1.08;
  text-wrap: balance;
}
.h2--sm { font-size: clamp(34px, 3.6vw, 56px); line-height: 1.06; }

.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-5);
  text-wrap: pretty;
}

/* Head block: eyebrow + heading, optional trailing aside. */
.head { margin-bottom: 52px; }
.head > .eyebrow { margin-bottom: 16px; }
.head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.head--center > .eyebrow { margin-bottom: 0; }

.blocklabel {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--ink-7);
  text-transform: uppercase;
  font-weight: 600;
}
.blocklabel--cyan { color: var(--cyan); }
.blocklabel--sm   { font-size: 11px; letter-spacing: .2em; color: var(--ink-8); }

.mono { font-family: var(--mono); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  padding: 19px 40px;
  transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--cyan);
  color: var(--navy);
  box-shadow: 0 12px 44px rgba(28,196,233,.34);
}
.btn--primary:hover { background: var(--cyan-lt); color: var(--navy); }

.btn--outline {
  color: var(--ink-2);
  border-color: var(--line-stronger);
}
.btn--outline:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--cyan-outline {
  color: var(--cyan);
  border-color: var(--cyan-edge-2);
}
.btn--cyan-outline:hover { background: var(--cyan-wash); color: var(--cyan-lt); }

.btn--quiet {
  background: var(--wash-mid);
  border-color: var(--line-strong);
  color: var(--ink-3);
  font-weight: 400;
}
.btn--quiet:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--sm { font-size: 16px; padding: 15px 28px; }
.btn--md { font-size: 16px; padding: 16px 28px; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.card--flat  { background: var(--wash); }
.card--cyan  { background: var(--cyan-wash); border-color: var(--cyan-edge); }
.card--navy  { background: var(--card-navy); }
.card--lift  { background: var(--card-lift); border-color: rgba(255,255,255,.12); }

/* Left-rule callout (mirrors under RTL). */
.callout {
  background: rgba(255,255,255,.04);
  border-inline-start: 3px solid var(--cyan);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 22px 30px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-4);
}
.callout strong { color: var(--ink); font-weight: 600; }
[dir="rtl"] .callout { border-radius: var(--r-md) 0 0 var(--r-md); }

/* --------------------------------------------------------------------------
   Chips & tags
   -------------------------------------------------------------------------- */

.chiprow { display: flex; gap: 10px; flex-wrap: wrap; }

.chip {
  background: var(--wash-mid);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--ink-3);
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  transition: background .25s, border-color .25s, color .25s;
}
.chip:hover { border-color: var(--cyan); color: var(--ink); }
.chip.is-on {
  background: var(--cyan-wash-3);
  border-color: var(--cyan-edge-3);
  color: var(--ink);
}
.chip--sm { padding: 10px 17px; font-size: 13.5px; }

.tag {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}
.tag--cyan {
  background: var(--cyan-wash-2);
  border-color: rgba(28,196,233,.34);
  color: var(--cyan);
}

/* --------------------------------------------------------------------------
   Lists used inside panels
   -------------------------------------------------------------------------- */

.dashlist { display: flex; flex-direction: column; gap: 11px; margin: 0; padding: 0; list-style: none; }
.dashlist li {
  display: flex;
  gap: 12px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-3);
}
.dashlist li::before {
  content: '—';
  color: var(--cyan);
  flex: none;
}

.dotlist { display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; list-style: none; }
.dotlist li {
  display: flex;
  gap: 12px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}
.dotlist li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: 8px;
  flex: none;
}

/* --------------------------------------------------------------------------
   Form fields
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-8);
}
.input,
.textarea {
  width: 100%;
  background: rgba(0,15,27,.6);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  color: var(--ink-2);
  font-size: 15.5px;
  font-family: var(--font);
  outline: none;
  transition: border-color .25s;
}
.input::placeholder,
.textarea::placeholder { color: var(--ink-12); }
.input:focus,
.textarea:focus { border-color: var(--cyan); }
.textarea {
  border-radius: var(--r-md);
  padding: 16px;
  line-height: 1.6;
  min-height: 120px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Reveal-on-scroll
   The .reveal class only dims things once JS confirms it can un-dim them —
   see js/reveal.js, which adds `js-reveal` to <html> on boot.
   -------------------------------------------------------------------------- */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity .9s var(--ease) var(--reveal-delay, 0s),
    transform .9s var(--ease) var(--reveal-delay, 0s);
}
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* Tilt cards animate transform on their own timing, so they must not have
   transform driven by the reveal transition once revealed. */
.js-reveal .tilt.is-in { transition: opacity .9s var(--ease), transform .5s var(--ease); }
.tilt { transform-style: preserve-3d; will-change: transform; }

/* --------------------------------------------------------------------------
   Magnetic cursor (pointer-fine only — see responsive.css)
   -------------------------------------------------------------------------- */

.cursor,
.cursor-dot {
  position: fixed;
  /* Physical `left`, not a logical property: cursor.js positions with raw
     viewport coordinates, so under [dir="rtl"] a logical start would anchor
     to the right edge and mirror the cursor away from the pointer. */
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  display: none;
}
.cursor {
  width: 34px; height: 34px;
  border: 1px solid rgba(28,196,233,.7);
  border-radius: 50%;
  mix-blend-mode: screen;
  transition: width .25s, height .25s, background .25s, border-color .25s;
}
.cursor.is-magnetic {
  width: 58px; height: 58px;
  background: rgba(28,196,233,.14);
}
.cursor-dot {
  width: 5px; height: 5px;
  background: var(--cyan);
  border-radius: 50%;
}

/* Mirror directional glyphs/graphics when the page flips to Arabic. */
[dir="rtl"] .flip { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes rq-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -26px, 0); }
}
@keyframes rq-pulse {
  0%, 100% { opacity: .25; transform: scale(1); }
  50%      { opacity: .6;  transform: scale(1.08); }
}
@keyframes rq-scan {
  from { transform: translateY(-100%); }
  to   { transform: translateY(600%); }
}
@keyframes rq-spin {
  to { transform: rotate(360deg); }
}
@keyframes rq-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes rq-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes rq-dash {
  to { stroke-dashoffset: 0; }
}

/* --------------------------------------------------------------------------
   Reduced motion — kill decorative loops outright rather than merely
   shortening them, and let every reveal paint immediately.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .js-reveal .reveal { opacity: 1; transform: none; }
  .cursor, .cursor-dot { display: none !important; }
}
