/* ============================================================
   home-about.css — About Page
   ─────────────────────────────────────────
   PURPOSE : The About route (html-templates/about/tab-about.html):
             hero with the pointer-following eye, three feature
             cards and the follow banner.
   MOTION  : Entrance animations are pure CSS and replay whenever the
             route is shown (the tab is display:none while hidden).
             Scroll reveal is opt-in — js/about/about-init.js adds
             .about--js, so without script everything is simply visible.
   ============================================================ */

.about {
  --about-max: 1120px;
  --about-gutter: clamp(16px, 4vw, 32px);
  --about-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --about-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  width: 100%;
  max-width: calc(var(--about-max) + 2 * var(--about-gutter));
  margin: 0 auto;
  padding: 0 var(--about-gutter) calc(56px + env(safe-area-inset-bottom, 0px));
  overflow-x: clip;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html[dir="rtl"] .about {
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', 'Inter', system-ui, sans-serif;
}

.about [id] {
  scroll-margin-top: calc(var(--shell-header-h, 64px) + 20px);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.about-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(96px, 13vw, 132px) 0 0;
  text-align: center;
}

.about-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
}

/* Iris rings behind the emblem — the same motif as the home hero. */
.about-orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(600px, 150vw);
  height: auto;
  translate: -50% -50%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  animation: about-orbit-in 1.2s var(--about-ease) both;
}

.about-orbit__ring {
  stroke: var(--border);
  stroke-width: 1.5;
}

.about-orbit__tint {
  fill: var(--accent-tint);
  fill-opacity: 0.7;
  animation: about-breathe 6s ease-in-out 1.2s infinite;
}

.about-orbit__spin {
  transform-origin: 200px 200px;
  animation: about-spin 90s linear infinite;
}

.about-orbit__dash {
  stroke: var(--text-faint);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1 11;
  opacity: 0.55;
}

.about-orbit__dot {
  fill: var(--mark-catch);
}

/* The emblem. --ex / --ey (−1…1) are set by about-init.js from the pointer. */
.about-eye {
  width: 112px;
  height: 112px;
  animation: about-eye-in 0.9s var(--about-spring) 0.1s both;
}

.about-eye svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 18px hsl(var(--shadow-color) / 0.22));
  animation: about-float 7s ease-in-out 1s infinite;
}

.about-eye__look {
  transform: translate(calc(var(--ex, 0) * 2.3px), calc(var(--ey, 0) * 2.3px));
  transition: transform 0.35s var(--about-ease);
}

.about-eye__blink {
  transform-box: fill-box;
  transform-origin: center;
  animation: about-blink 7s ease-in-out 2.4s infinite;
}

.about-eye__catch {
  transform: translate(calc(var(--ex, 0) * 0.7px), calc(var(--ey, 0) * 0.7px));
  transition: transform 0.35s var(--about-ease);
}

.about-hero__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin-top: clamp(18px, 3vw, 28px);
}

.about-rise {
  animation: about-rise 0.8s var(--about-ease) both;
  animation-delay: calc(0.18s + var(--i, 0) * 0.08s);
}

.about-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.about-title {
  margin: 12px 0 0;
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-size: clamp(2.3rem, 6.2vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}

.about-lead {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.65;
  color: var(--text-soft);
  text-wrap: pretty;
}

/* Who it is for */
.about-audience {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 26px;
}

.about-audience__label {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 1px 2px hsl(var(--shadow-color) / 0.05);
  transition: border-color 0.2s ease, transform 0.25s var(--about-ease);
}

.about-chips li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mark-catch);
}

@media (hover: hover) {
  .about-chips li:hover {
    border-color: var(--text-faint);
    transform: translateY(-1px);
  }
}

/* ── Buttons ──────────────────────────────────────────────────── */
.about-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.about-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
              box-shadow 0.25s ease, transform 0.25s var(--about-ease);
}

/* A soft light that sweeps across on hover. */
.about-btn::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-start: -60%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgb(255 255 255 / 0.28), transparent);
  transform: skewX(-18deg) translateX(-120%);
  transition: transform 0.7s var(--about-ease);
  pointer-events: none;
}

.about-btn:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

.about-btn--primary {
  background: var(--accent);
  color: #FFFFFF !important;
  box-shadow:
    0 1px 2px hsl(var(--shadow-color) / 0.12),
    0 10px 22px -10px hsl(var(--shadow-color) / 0.55);
}

.about-btn--quiet {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.about-btn--amber {
  background: var(--mark-catch);
  color: var(--mark-disc) !important;
  box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.5);
}

.about-btn__arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--about-ease);
}

.about-btn__icon {
  flex-shrink: 0;
}

html[dir="rtl"] .about-btn__arrow {
  transform: scaleX(-1);
}

@media (hover: hover) {
  .about-btn:hover {
    transform: translateY(-2px);
  }

  .about-btn:hover::after {
    transform: skewX(-18deg) translateX(520%);
  }

  .about-btn--primary:hover {
    background: var(--accent-strong);
    box-shadow:
      0 1px 2px hsl(var(--shadow-color) / 0.12),
      0 16px 28px -12px hsl(var(--shadow-color) / 0.6);
  }

  .about-btn--quiet:hover {
    background: var(--surface);
    border-color: var(--text-faint);
  }

  .about-btn--amber:hover {
    box-shadow: 0 16px 30px -12px rgb(0 0 0 / 0.6);
  }

  .about-btn:hover .about-btn__arrow {
    transform: translateX(3px);
  }

  html[dir="rtl"] .about-btn:hover .about-btn__arrow {
    transform: scaleX(-1) translateX(3px);
  }

  .about-btn:hover:active {
    transform: scale(0.97);
  }
}

/* ── Sections ─────────────────────────────────────────────────── */
.about-section {
  padding-top: clamp(64px, 9vw, 112px);
}

.about-section__title {
  margin: 0 0 clamp(24px, 4vw, 40px);
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}

/* ── Feature cards ────────────────────────────────────────────── */
.about-features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-feature {
  --mx: 50%;
  --my: 0%;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 1px 2px hsl(var(--shadow-color) / 0.05);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s ease, box-shadow 0.3s ease,
              transform 0.35s var(--about-ease);
}

/* Cursor-following glow, set by about-init.js via --mx / --my. */
.about-feature::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx) var(--my), var(--accent-tint), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.about-feature__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-tint);
  color: var(--accent);
  transition: background-color 0.25s ease, color 0.25s ease,
              transform 0.4s var(--about-spring);
}

.about-feature__icon svg {
  width: 24px;
  height: 24px;
}

.about-feature__title {
  margin: 2px 0 0;
  padding-inline-end: 34px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.about-feature__text {
  margin: 6px 0 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-soft);
  text-wrap: pretty;
}

.about-feature__go {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-sunken);
  color: var(--text-soft);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.35s var(--about-ease);
}

.about-feature__go svg {
  width: 15px;
  height: 15px;
}

html[dir="rtl"] .about-feature__go svg {
  transform: scaleX(-1);
}

@media (hover: hover) {
  .about-feature:hover {
    border-color: var(--border);
    box-shadow: 0 22px 40px -22px hsl(var(--shadow-color) / 0.45);
    transform: translateY(-4px);
  }

  .about-feature:hover::before {
    opacity: 1;
  }

  .about-feature:hover .about-feature__icon {
    background: var(--accent);
    color: #FFFFFF;
    transform: scale(1.08) rotate(-4deg);
  }

  .about-feature:hover .about-feature__go {
    background: var(--accent);
    color: #FFFFFF;
    transform: translateX(3px);
  }

  html[dir="rtl"] .about-feature:hover .about-feature__go {
    transform: translateX(-3px);
  }
}

.about-feature:active {
  transform: scale(0.985);
  transition-duration: 0.1s;
}

.about-feature:focus-visible,
.about-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.about-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text-soft);
}

.about-note svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ── Follow banner ────────────────────────────────────────────── */
.about-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(28px, 5vw, 52px);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--mark-disc), var(--accent-strong));
  color: #FFFFFF;
  box-shadow: 0 30px 50px -30px hsl(var(--shadow-color) / 0.7);
}

.about-cta__art {
  position: absolute;
  z-index: -1;
  top: 50%;
  inset-inline-end: -110px;
  width: 400px;
  height: 400px;
  translate: 0 -50%;
  stroke: rgb(255 255 255 / 0.13);
  stroke-width: 1.5;
  pointer-events: none;
}

.about-cta__art circle:last-child {
  fill: rgb(254 181 54 / 0.09);
  stroke: none;
}

html[dir="rtl"] .about-cta__art {
  scale: -1 1;
}

.about-cta__body {
  flex: 1 1 260px;
  min-width: 0;
}

.about-cta__title {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.about-cta__text {
  margin: 8px 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: rgb(255 255 255 / 0.74);
}

.about-cta .about-btn {
  flex: 0 0 auto;
}

/* ── Arabic ───────────────────────────────────────────────────── */
html[dir="rtl"] .about-title,
html[dir="rtl"] .about-section__title,
html[dir="rtl"] .about-cta__title {
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: normal;
}

html[dir="rtl"] .about-title {
  line-height: 1.3;
}

html[dir="rtl"] .about-eyebrow {
  font-size: 0.9rem;
  letter-spacing: normal;
  text-transform: none;
}

html[dir="rtl"] .about-lead,
html[dir="rtl"] .about-feature__text,
html[dir="rtl"] .about-cta__text {
  line-height: 1.85;
}

/* ── Scroll reveal (opt-in: about-init.js adds .about--js) ─────── */
.about--js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--about-ease), transform 0.8s var(--about-ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.about--js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ── Keyframes ────────────────────────────────────────────────── */
@keyframes about-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes about-orbit-in {
  from { opacity: 0; scale: 0.82; }
  to   { opacity: 1; scale: 1; }
}

@keyframes about-eye-in {
  from { opacity: 0; transform: scale(0.55); }
  to   { opacity: 1; transform: none; }
}

@keyframes about-spin {
  to { transform: rotate(360deg); }
}

@keyframes about-breathe {
  0%, 100% { fill-opacity: 0.55; }
  50%      { fill-opacity: 0.9; }
}

@keyframes about-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

@keyframes about-blink {
  0%, 93%, 100% { transform: scaleY(1); }
  96%           { transform: scaleY(0.08); }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (min-width: 880px) {
  .about-features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .about-feature {
    display: flex;
    flex-direction: column;
    padding: 28px 26px 26px;
  }

  .about-feature__icon {
    margin-bottom: 20px;
  }

  .about-feature__title {
    margin: 0;
    padding-inline-end: 0;
    font-size: 1.22rem;
  }

  .about-feature__go {
    top: 26px;
    inset-inline-end: 24px;
  }
}

@media (max-width: 640px) {
  .about-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .about-cta__body {
    flex-basis: auto;
  }

  .about-cta__art {
    inset-inline-end: -180px;
    opacity: 0.8;
  }
}

@media (max-width: 520px) {
  .about-stage {
    width: 116px;
    height: 116px;
  }

  .about-eye {
    width: 96px;
    height: 96px;
  }

  .about-actions {
    flex-direction: column;
    align-self: stretch;
    gap: 10px;
  }

  .about-btn {
    min-height: 52px;
  }

  .about-audience {
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about *,
  .about *::before,
  .about *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .about--js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ── Legal link ───────────────────────────────────────────────── */
.about-legal {
  display: flex;
  justify-content: center;
  margin: 36px 0 24px;
}

.about-legal__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.about-legal__link svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.about-legal__link:hover,
.about-legal__link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
