/* ══════════════════════════════════════════════════════════════════
   Corbit — base, shell, header, footer.
   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%;
}

body {
  margin: 0;
  background: var(--white);
  font-family: var(--font-fa);
  font-size: var(--body-medium);
  line-height: var(--lh-body-medium);
  color: var(--content-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--mint-7); color: var(--blue-8); }

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--blue-8); text-decoration: none; }
a:hover { color: var(--blue-7); }

img, picture, video, svg { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible { outline: 2px solid var(--mint-7); outline-offset: 2px; }

/* ── Keyframes ────────────────────────────────────────────────────── */
@keyframes nhPulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(2.7); opacity: 0; }
  100% { transform: scale(2.7); opacity: 0; }
}
@keyframes nhDrift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.13); }
}

/* ── Layout shell ─────────────────────────────────────────────────── */
.shell {
  max-width: var(--container-site);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* the About hero, the Contact page and the masthead footers of both
   lay out on the narrower 1240px shell with 32px gutters */
.shell--narrow {
  max-width: 1240px;
  padding: 0 var(--gutter-narrow);
}

.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;
}

/* Small pulsing brand dot, reused in the hero and the security badge */
.pulse-dot {
  position: relative;
  display: inline-flex;
  width: 7px; height: 7px;
  flex-shrink: 0;
}
.pulse-dot::before,
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--mint-7);
}
.pulse-dot::after { animation: nhPulse 2.6s ease-out infinite; }
.pulse-dot--deep::before,
.pulse-dot--deep::after { background: var(--mint-9); }
.pulse-dot--deep::after { animation-duration: 2.4s; }

/* Inline arrow that slides on hover (RTL — it points left) */
.arrow {
  font-size: 15px;
  line-height: 1;
  transition: transform .2s ease;
}

/* ── Quiet link with arrow ────────────────────────────────────────── */
.qlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: var(--fw-bold);
  color: var(--blue-8);
  transition: color .2s ease, transform .2s ease;
}
.qlink:hover { color: var(--blue-7); transform: translateX(-5px); }
.qlink:hover .arrow { transform: translateX(-5px); }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  white-space: nowrap;
  font-weight: var(--fw-bold);
  transition: background .18s ease, transform .18s ease,
              box-shadow .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover .arrow { transform: translateX(-5px); }

.btn--navy {
  height: 40px;
  padding: 0 20px;
  gap: 10px;
  background: var(--blue-8);
  color: var(--white);
  font-size: 15px;
  font-weight: var(--fw-semibold);
}
.btn--navy:hover { background: var(--blue-7); color: var(--white); }

.btn--mint {
  height: 56px;
  padding: 0 30px;
  background: var(--mint-7);
  color: var(--blue-10);
  font-size: 16.5px;
}
.btn--mint:hover {
  background: #00D9B8;
  color: var(--blue-10);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(1, 233, 197, .24);
}

.btn--ghost {
  height: 56px;
  padding: 0 26px;
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--white);
  font-size: 15.5px;
  font-weight: var(--fw-medium);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .6);
  color: var(--white);
}

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-main);
}

/* Equal side columns keep the nav centred on the page, so it never
   shifts when the button on the left changes width. */
.site-header__inner {
  position: relative;   /* containing block for the mobile menu panel */
  max-width: var(--container-site);
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
  justify-self: start;
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
  min-width: 0;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 23px; width: auto; }

/* the middle `auto` column already centres this — no justify-self, which
   would make the absolutely-positioned mobile panel shrink to fit */
.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  min-width: 0;
}
.site-nav a {
  font-size: 15.5px;
  font-weight: var(--fw-medium);
  color: var(--gray-1000);
  white-space: nowrap;
  transition: color .18s ease;
}
.site-nav a:hover { color: var(--black); }
.site-nav a.is-active {
  font-size: 15px;
  font-weight: var(--fw-semibold);
  color: var(--blue-8);
}

/* Burger — desktop design has no mobile nav, so this is additive */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-main);
}
.nav-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--black);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  right: 0;
  width: 18px;
  height: 1.5px;
  background: var(--black);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border-main);
}

.site-footer__top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: start;
  padding: 56px 0 44px;
}
.site-footer__top img { height: 38px; width: auto; }
.site-footer__blurb {
  font-size: 15px;
  line-height: 2.05;
  color: var(--gray-1000);
  max-width: 560px;
  justify-self: end;
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border-main);
  border-bottom: 1px solid var(--border-main);
}
.site-footer__links a {
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--gray-1100);
  transition: color .2s ease;
}
.site-footer__links a:hover { color: var(--blue-8); }
.site-footer__sep {
  width: 1px;
  height: 13px;
  background: var(--border-strong);
}

.site-footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 22px 0 30px;
}
.site-footer__copy { font-size: 12px; color: var(--gray-900); }
.site-footer__copy .ltr-latin { font-size: .94em; }
.site-footer__tagline {
  direction: ltr;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--gray-800);
}

/* Latin/technical fragments inside Persian copy — still Yekan Bakh, so a
   digit inside a wordmark like 7GTech matches the numerals around it */
.ltr-latin {
  direction: ltr;
  font-family: var(--font-fa);
}

/* ══════════════════════════════════════════════════════════════════
   Dark page hero — the manifesto band the About and Contact pages
   open with: navy ground, faint grid, cyan spotlight on the pointer.
   ══════════════════════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  background: var(--blue-10);
  overflow: hidden;
}
.page-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 74px 74px;
  pointer-events: none;
}
.page-hero__spot {
  position: absolute;
  top: 0;
  left: 0;
  width: 820px;
  height: 820px;
  margin: -410px 0 0 -410px;
  background: radial-gradient(circle, rgba(1, 233, 197, .14) 0%, rgba(1, 233, 197, 0) 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}
.page-hero__spot--sm {
  width: 780px;
  height: 780px;
  margin: -390px 0 0 -390px;
  background: radial-gradient(circle, rgba(1, 233, 197, .13) 0%, rgba(1, 233, 197, 0) 60%);
}
.page-hero__body {
  position: relative;
  padding: 100px var(--gutter-narrow) 56px;
}
.page-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--mint-7);
}
.page-hero__title {
  margin: 0 0 24px;
  font-size: 60px;
  line-height: 1.26;
  font-weight: var(--fw-black);
  letter-spacing: -.035em;
  color: var(--white);
}
.page-hero__title span {
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, .5);
}
.page-hero__text {
  margin: 0;
  font-size: 17.5px;
  line-height: 2.05;
  color: rgba(255, 255, 255, .68);
}

/* ══════════════════════════════════════════════════════════════════
   Final CTA band — closes the Home and About pages.
   ══════════════════════════════════════════════════════════════════ */
.final-cta {
  position: relative;
  background: var(--blue-10);
  overflow: hidden;
}
.final-cta__aurora {
  position: absolute;
  top: -38%;
  left: 50%;
  width: 1180px;
  height: 1180px;
  margin-left: -590px;
  background: radial-gradient(circle,
    rgba(1, 233, 197, .16) 0%,
    rgba(1, 233, 197, .05) 34%,
    rgba(1, 233, 197, 0) 62%);
  pointer-events: none;
}
.final-cta__hairline {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(to left,
    rgba(1, 233, 197, 0) 0%,
    rgba(1, 233, 197, .55) 50%,
    rgba(1, 233, 197, 0) 100%);
  pointer-events: none;
}
.final-cta__fade {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 190px;
  background: linear-gradient(to bottom, rgba(0, 19, 75, 0), rgba(0, 10, 40, .75));
  pointer-events: none;
}
.final-cta__body {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 104px 32px 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.final-cta__title {
  margin: 0 0 22px;
  font-size: 52px;
  line-height: 1.36;
  font-weight: var(--fw-black);
  letter-spacing: -.03em;
  color: var(--white);
  max-width: 720px;
}
.final-cta__text {
  margin: 0 0 42px;
  font-size: 17px;
  line-height: 2.05;
  color: rgba(255, 255, 255, .66);
  max-width: 600px;
}
.final-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.final-cta__actions .btn--mint {
  height: 58px;
  padding: 0 34px;
  gap: 14px;
  font-size: 17px;
}
.final-cta__actions .btn--ghost {
  height: 58px;
  padding: 0 28px;
}
.final-cta__note {
  margin-top: 28px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .45);
}

/* ══════════════════════════════════════════════════════════════════
   Responsive — the source design is desktop-only; these rules keep
   the same composition readable down to phone widths.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  :root { --gutter: 24px; }

  /* burger takes the CTA's place — the left end of the bar in RTL */
  .nav-toggle { display: flex; }
  .site-header__cta { display: none; }

  /* the nav goes `position: absolute` below, so it leaves grid flow and the
     burger would land in the middle column — two columns keeps it at the end */
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-header__end { grid-column: 2; }

  .site-nav {
    position: absolute;
    top: 66px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border-main);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-secondary);
  }
  .site-nav a:last-child { border-bottom: 0; }
}

@media (max-width: 980px) {
  .page-hero__body { padding: 72px var(--gutter-narrow) 44px; }
  .page-hero__title { font-size: 38px; }
  .page-hero__text { font-size: 16px; }

  .final-cta__body { padding: 76px 24px 80px; }
  .final-cta__title { font-size: 34px; }
}

@media (max-width: 860px) {
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 0 32px;
  }
  .site-footer__blurb { justify-self: start; }
}

@media (max-width: 620px) {
  .page-hero__title { font-size: 30px; }

  .final-cta__title { font-size: 27px; }
  .btn--mint, .btn--ghost,
  .final-cta__actions .btn--mint,
  .final-cta__actions .btn--ghost { 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;
  }
}
