/* ══════════════════════════════════════════════════════════════════
   Unitech — base, shell, header, footer, shared primitives.
   Shared by every page. Page-specific rules live in their own file.
   ══════════════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--page);
}

body {
  margin: 0;
  background: var(--page);
  font-family: var(--font-fa);
  font-size: var(--fs-body);
  /* The source design sets no body line-height, so anything that does not
     declare one — eyebrows, buttons, chips, tags — sits at `normal`.
     Inheriting 1.95 here grew every one of them by several pixels. */
  line-height: normal;
  color: var(--tx);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #1B3A6A40; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
img, picture, video, svg, canvas { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* The tab panels below are grid/flex containers, and a display value
   beats the [hidden] presentation hint — so it is stated outright. */
[hidden] { display: none !important; }

/* Latin/technical fragments inside Persian copy */
.ltr { direction: ltr; unicode-bidi: isolate; }

.mono {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Keyframes ────────────────────────────────────────────────────── */
@keyframes ut-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ut-drop {
  from { opacity: 0; transform: translateY(-46px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes ut-wipe {
  from { clip-path: inset(0 0 0 100%); opacity: .2; }
  to   { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes ut-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.8); }
}
@keyframes ut-sheen {
  from { transform: translateX(120%); }
  to   { transform: translateX(-120%); }
}
/* rules that grow out of their right edge, as everything RTL does */
@keyframes ut-bar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.page {
  position: relative;
  min-height: 100vh;
}

/* ── Scroll progress bar ──────────────────────────────────────────── */
.scroll-bar {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right center;
  z-index: 90;
  will-change: transform;
}

/* ── Layout shell ─────────────────────────────────────────────────── */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* A full-bleed band. `--s1` and `--s2` alternate down the page. */
.band {
  border-bottom: 1px solid var(--bd);
}
.band--s1 { background: var(--s1); }
.band--s2 { background: var(--s2); }
.band--deep { background: var(--deep); }
/* vertical only — a `padding` shorthand here would override the side
   gutters .shell sets, running every section edge-to-edge on narrow screens */
.band__inner {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y-end);
}

/* ── Section eyebrow rail ─────────────────────────────────────────── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(270deg, var(--red), #E31F2600);
  flex-shrink: 0;
}
.eyebrow__label {
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  letter-spacing: .01em;
  color: var(--eyebrow);
}
.eyebrow--deep .eyebrow__label { color: #FF9A9F; }

/* ── Section headings ─────────────────────────────────────────────── */
.sec-title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--fw-black);
  color: var(--txs);
  letter-spacing: var(--tracking-h2);
  text-wrap: pretty;
}
.sec-lead {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--tx);
}
.sec-note {
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  color: var(--txm);
}

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-16);
  box-shadow: var(--cardShadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform .3s var(--ease), box-shadow .3s ease,
              border-color .3s ease, background .3s ease;
}
.card:hover {
  background: var(--cardh);
  border-color: var(--ring);
  transform: translateY(-3px);
  box-shadow: var(--cardShadowH);
}

/* The red hairline that caps the principle and pillar cards */
.card__accent {
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 3px;
  background: linear-gradient(270deg, var(--red), #E31F2600);
}

/* ── Numbered badge / tag — one visual trio, three sizes ──────────── */
.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: var(--fw-bold);
  background: var(--badge-bg);
  border: 1px solid var(--badge-bd);
  color: var(--badge-tx);
}
.badge--sm { width: 30px; height: 30px; border-radius: 9px; font-size: var(--fs-meta); }
.badge--md { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }

.tag {
  font-size: 11px;
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-bd);
  color: var(--badge-tx);
}

/* Monospace English label sitting above a Persian title */
.card__en {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--badge-tx);
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  white-space: nowrap;
  font-family: inherit;
  font-weight: var(--fw-bold);
  transition: opacity .2s ease, transform .2s ease,
              box-shadow .2s ease, border-color .2s ease, color .2s ease;
}

/* Primary — the navy (light) / white (dark) call to action */
.btn--cta {
  background: var(--ctaBg);
  color: var(--ctaFg);
  border-radius: var(--radius-10);
  padding: 17px 30px;
  font-size: 15.5px;
}
.btn--cta:hover {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px #1b3a6a2e;
}

/* the sheen that sweeps across the hero CTA */
.btn--sheen {
  position: relative;
  overflow: hidden;
}
.btn--sheen::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, #FFFFFF3D, transparent);
  animation: ut-sheen 3.4s ease-in-out 1.6s infinite;
  pointer-events: none;
}

/* Compact primary — used in the header */
.btn--cta-sm {
  background: var(--ctaBg);
  color: var(--ctaFg);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: var(--fs-card);
}
.btn--cta-sm:hover { opacity: .88; transform: translateY(-1px); }

/* Secondary — hairline box that turns red on hover */
.btn--outline {
  background: var(--pillBg);
  color: var(--txs);
  border: 1px solid var(--bd2);
  border-radius: var(--radius-10);
  padding: 16px 26px;
  font-size: 15px;
}
.btn--outline:hover { border-color: var(--red); color: var(--red); }

.btn--outline-quiet {
  background: transparent;
  color: var(--txs);
  border: 1px solid var(--bd2);
  border-radius: var(--radius-9);
  padding: 13px 22px;
  font-size: 14px;
}
.btn--outline-quiet:hover { border-color: var(--red); color: var(--red); }

/* Inline "more" link whose gap opens on hover (RTL — arrow points left) */
.qlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: var(--fw-bold);
  color: var(--nvy);
  white-space: nowrap;
  transition: gap .2s ease;
}
.qlink:hover { gap: 12px; }
.qlink--sm { font-size: var(--fs-meta); gap: 6px; }
.qlink--sm:hover { gap: 11px; }

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--nav);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bd);
}
.site-header__inner {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  transition: height .25s ease;
}
/* the source shrank the bar over the first 200px of scroll */
.site-header.is-stuck .site-header__inner { height: var(--nav-h-stuck); }

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
/* the logo is dark ink, so it always sits on a white chip.
   It must never be the thing that gives way when the bar runs out of
   room — the global `img { max-width: 100% }` would otherwise squash it. */
.site-header__logo {
  display: inline-flex;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius-9);
  padding: 9px 13px;
}
.site-header__logo img {
  height: 24px;
  width: auto;
  max-width: none;
  flex-shrink: 0;
}

.site-header__id {
  padding-right: 14px;
  border-right: 1px solid var(--bd2);
}
.site-header__name {
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  color: var(--txs);
  white-space: nowrap;
}
.site-header__tag {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--txm);
  white-space: nowrap;
}

/* Centred on the bar itself, so it never shifts when the sides resize */
.site-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 16px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.site-nav a {
  color: var(--tx);
  padding: 7px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--txs);
  border-bottom-color: var(--red);
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* The CTA duplicated inside the mobile menu panel — the bar has no room
   for it below the nav breakpoint, but the page should not lose its
   primary action. Hidden on desktop, where the bar carries it. */
.site-nav__cta { display: none; }

/* Burger — the source design is desktop-only, so this is additive */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bd2);
  border-radius: 8px;
}
.nav-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--txs);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  right: 0;
  width: 18px;
  height: 1.5px;
  background: var(--txs);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--footer);
  border-top: 1px solid var(--footerBd);
}
.site-footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
  padding: 44px 0 38px;
}

.site-footer__brand { display: inline-block; text-align: left; }
.site-footer__logo {
  display: inline-flex;
  background: var(--white);
  border-radius: var(--radius-9);
  padding: 10px 14px;
  margin-left: -14px;
}
.site-footer__logo img { height: 25px; width: auto; }
.site-footer__motto {
  margin-top: 13px;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  font-size: 24px;
  line-height: 1.4;
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  color: var(--footerTxs);
}
.site-footer__motto span { color: var(--red); }
.site-footer__kicker {
  margin-top: 13px;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .07em;
  color: var(--footerTx);
}

.site-footer__head {
  font-size: 13px;
  font-weight: var(--fw-bold);
  color: var(--footerTxs);
}
.site-footer__list {
  margin-top: 13px;
  display: grid;
  gap: 9px;
  font-size: var(--fs-meta);
}
.site-footer__list a {
  color: var(--footerTx);
  transition: color .2s ease;
}
.site-footer__list a:hover { color: var(--red); }

.site-footer__base {
  border-top: 1px solid var(--footerBd);
  padding: 18px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
}
.site-footer__copy {
  font-size: var(--fs-mono);
  color: var(--footerTx);
  white-space: nowrap;
}
.site-footer__ticker {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--footerTx);
  white-space: nowrap;
  overflow: hidden;
}
.site-footer__legal {
  display: flex;
  gap: 20px;
  font-size: var(--fs-mono);
  white-space: nowrap;
}
.site-footer__legal a {
  color: var(--footerTx);
  transition: color .2s ease;
}
.site-footer__legal a:hover { color: var(--red); }

/* ── Scroll reveal ────────────────────────────────────────────────
   The source drove these off CSS scroll-timelines, which only ship in
   Chromium. main.js runs the same reveal on an IntersectionObserver so
   every browser gets it — and content is never gated on JS: the hidden
   state is only applied once the observer is known to work.
   ══════════════════════════════════════════════════════════════════ */
.js-reveal [data-reveal],
.js-reveal [data-step] {
  opacity: 0;
}
.js-reveal [data-reveal] { transform: translateY(22px); }
.js-reveal [data-step]   { transform: translateY(-46px) scale(.97); }
/* headings wipe in rather than rise — matched to the animation's from-state
   so there is no flash of the finished heading before the observer fires */
.js-reveal main h2 { opacity: .2; clip-path: inset(0 0 0 100%); }

[data-reveal].is-in    { animation: ut-rise 1.4s var(--ease) both; }
[data-step].is-in      { animation: ut-drop 1.6s var(--ease) both; }
main h2.is-in          { animation: ut-wipe 1.6s var(--ease) both; }

/* ══════════════════════════════════════════════════════════════════
   NEXT STEP — the closing band: one line, one button
   ══════════════════════════════════════════════════════════════════ */
.cta-band {
  background: var(--s1);
  border-bottom: 1px solid var(--bd);
}
.cta-band__inner {
  padding-top: 62px;
  padding-bottom: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.cta-band__text { max-width: 700px; }
.cta-band__title {
  margin: 0;
  font-size: 32px;
  line-height: 1.45;
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  color: var(--txs);
  text-wrap: pretty;
}
.cta-band__lead {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--tx);
}
.cta-band__cta { padding: 17px 32px; }

/* ══════════════════════════════════════════════════════════════════
   Responsive — the source design is desktop-only (it pinned a
   1180px minimum). These rules keep the same composition legible
   down to phone widths.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  :root { --gutter: 24px; --section-y: 56px; --section-y-end: 60px; }

  .nav-toggle { display: flex; }

  /* The bar keeps the brand and the burger only. A nowrap CTA here would
     squeeze the logo out of the layout. */
  .site-header__cta { display: none; }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0; left: 0;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    /* opaque, not the bar's translucent sheet — this panel covers hero
       artwork, and a backdrop-filter inside the header's own filtered
       layer does not composite reliably */
    background: var(--nav-solid);
    border-bottom: 1px solid var(--bd);
    box-shadow: var(--cardShadowH);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--bdw);
  }
  .site-nav a:last-child { border-bottom: 0; }

  /* the CTA rejoins the menu as its closing item */
  .site-nav a.site-nav__cta {
    display: inline-flex;
    margin-top: 16px;
    padding: 14px 20px;
    border-bottom: 0;
    color: var(--ctaFg);
    white-space: normal;
    text-align: center;
  }

  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  :root { --fs-h2: 30px; --fs-h2-cta: 27px; }

  .site-header__id { display: none; }

  .cta-band__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  /* comfortable thumb target */
  .nav-toggle { width: 44px; height: 44px; }

  .site-footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .site-footer__ticker { display: none; }
}

@media (max-width: 620px) {
  .site-footer__top { grid-template-columns: 1fr; }
  .btn--cta, .btn--outline { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js-reveal [data-reveal],
  .js-reveal [data-step] { opacity: 1; transform: none; }
  .js-reveal main h2 { opacity: 1; clip-path: none; }
}
