/* ============================================================
   Synexian — About page (cream theme, home-derived family)
   Editorial manifesto structure — distinct from every sibling:
   big-type hero, scroll-scrubbed manifesto (words ignite as you
   read), the company story as a git commit log in an ink window,
   a mirrored mission/vision spread, values as design tokens, and
   a team-shape grid with a live open-roles chip. Light motion
   only: CSS + IntersectionObserver + one rAF scroll scrub.
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

section { padding: 6rem 0; }

.section-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.6rem;
}

/* ---------- 1. hero — editorial big type ---------- */
.hero {
  position: relative;
  padding: 6.5rem 0 5.5rem;
  overflow: hidden;
}
.grid-paper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 30%, transparent 75%);
}
.hero .dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.85;
  animation: dot-drift 9s ease-in-out infinite alternate;
}
.dot-amber { width: 18px; height: 18px; background: var(--amber); top: 18%; left: 8%; }
.dot-coral { width: 13px; height: 13px; background: var(--coral); top: 70%; left: 82%; animation-delay: -3s; }
.dot-olive { width: 15px; height: 15px; background: var(--olive); top: 14%; left: 70%; animation-delay: -6s; }
@keyframes dot-drift {
  to { transform: translate(14px, -20px); }
}

.hero-inner { position: relative; max-width: 900px; }
.tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1.4rem;
}
.hero-inner h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.hero-inner h1 em {
  font-style: normal;
  color: var(--amber-deep);
}
.hero-sub {
  margin: 1.6rem 0 0;
  max-width: 56ch;
  font-size: 1.12rem;
  color: var(--text-dim);
}
.hero-pills { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 2rem; }

.hero-inner > * { animation: rise-in 0.9s var(--ease-out) both; }
.hero-inner > *:nth-child(2) { animation-delay: 0.08s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.16s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
}

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-cue svg { width: 15px; height: 15px; animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob {
  50% { transform: translateY(5px); }
}

/* ---------- 2. manifesto — scroll-ignited words ---------- */
.manifesto { background: var(--surface); border-block: 1px solid var(--line); padding: 7rem 0; }
.manifesto .eyebrow { margin-bottom: 2rem; }
.manifesto-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  max-width: 22em;
  text-wrap: pretty;
}
/* words start faint; JS scrubs them to full ink as the block scrolls */
.manifesto-text .w {
  color: var(--text-faint);
  transition: color 0.35s var(--ease-out);
}
.manifesto-text .w.lit { color: var(--text); }
.manifesto-text .w.hot { color: var(--amber-deep); }

.trusted-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 3rem;
}
.trusted-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.trusted-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- 3. story — git log window ---------- */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.story-copy .eyebrow { margin-bottom: 1.2rem; }
.story-copy h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1.1rem; }
.story-copy p { color: var(--text-dim); margin-bottom: 1rem; max-width: 48ch; }

.gitlog {
  background: var(--ink-800);
  color: var(--cream);
  border: 1px solid rgba(20, 36, 48, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 34px 70px -32px rgba(20, 36, 48, 0.5);
  overflow: hidden;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.1rem;
  background: var(--ink-900);
  border-bottom: 1px solid rgba(240, 235, 218, 0.12);
}
.win-dots { display: inline-flex; gap: 6px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; }
.win-dots i:nth-child(1) { background: var(--amber); }
.win-dots i:nth-child(2) { background: var(--coral); }
.win-dots i:nth-child(3) { background: var(--olive); }
.win-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: rgba(240, 235, 218, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gitlog-body {
  list-style: none;
  margin: 0;
  padding: 1.4rem 1.5rem 1.6rem;
  display: grid;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
}
.commit {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: baseline;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.commit.is-in { opacity: 1; transform: none; }
.commit .hash { color: var(--amber); white-space: nowrap; }
.commit .msg { color: rgba(240, 235, 218, 0.8); }
.commit .msg b { color: var(--cream); font-weight: 500; }
.commit.head .hash { color: var(--olive); }
.commit.head .msg { color: var(--cream); }
.commit.head .msg::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1em;
  vertical-align: text-bottom;
  background: var(--amber);
  margin-left: 6px;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}

/* ---------- 4. mission / vision spread ---------- */
.mv { background: var(--surface); border-block: 1px solid var(--line); }
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  align-items: stretch;
}
.mv-card {
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.mv-mission {
  background: var(--surface-2);
  border: 1px solid var(--line);
  transform: translateX(-36px);
}
.mv-vision {
  background: var(--ink-800);
  color: var(--cream);
  border: 1px solid var(--ink-800);
  transform: translateX(36px);
}
.mv-card.is-in { opacity: 1; transform: none; }
.mv-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.mv-mission .mv-tag { background: color-mix(in srgb, var(--amber) 20%, transparent); color: var(--amber-deep); }
.mv-vision .mv-tag { background: color-mix(in srgb, var(--olive) 25%, transparent); color: var(--olive); }
.mv-card h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.mv-mission p { color: var(--text-dim); }
.mv-vision p { color: rgba(240, 235, 218, 0.72); }

/* ---------- 5. principles — design tokens ---------- */
.principles .section-head { margin-bottom: 2.8rem; }
.prin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.prin-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--surface-2);
}
.prin-card:hover { border-color: var(--amber); transform: translateY(-4px); }
.prin-card code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--amber-deep);
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  align-self: flex-start;
  white-space: nowrap;
}
.prin-card code i { font-style: normal; color: var(--text-faint); }
.prin-card h3 { font-size: 1.12rem; }
.prin-card p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- 6. team shape ---------- */
.team { background: var(--surface); border-block: 1px solid var(--line); }
.hiring-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}
.hiring-chip:hover { border-color: var(--amber); transform: translateY(-2px); }
.hiring-chip svg { width: 15px; height: 15px; color: var(--amber-deep); }
.status-pulse {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--olive) 55%, transparent);
  animation: status-ping 2s ease-out infinite;
}
@keyframes status-ping {
  70% { box-shadow: 0 0 0 8px transparent; }
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--surface-2);
}
.team-card:hover { border-color: var(--amber); transform: translateY(-4px); }
.team-card .gif-badge {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.team-card .gif-badge img { width: 48px; height: 48px; object-fit: contain; }
.team-card h3 { font-size: 1.08rem; }
.team-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- 7. final CTA — ink card (family pattern) ---------- */
.cta-final { padding-bottom: 7rem; }
.cta-card {
  position: relative;
  background: var(--ink-800);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 235, 218, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 235, 218, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.cta-card > * { position: relative; }
.cta-dots { display: inline-flex; gap: 8px; margin-bottom: 1.4rem; }
.cta-dots i { width: 12px; height: 12px; border-radius: 50%; }
.cta-dots i:nth-child(1) { background: var(--amber); }
.cta-dots i:nth-child(2) { background: var(--coral); }
.cta-dots i:nth-child(3) { background: var(--olive); }
.cta-card h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.cta-card p {
  max-width: 62ch;
  margin: 1.1rem auto 2rem;
  color: rgba(240, 235, 218, 0.7);
}
.cta-group { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.cta-card .btn-ghost { color: var(--cream); border-color: rgba(240, 235, 218, 0.3); }
.cta-card .btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .story-grid { grid-template-columns: 1fr; }
  .mv-grid { grid-template-columns: 1fr; }
  .mv-mission, .mv-vision { transform: translateY(24px); }
  .commit { transform: translateY(10px); }
  .prin-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .section-row { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
}
@media (max-width: 680px) {
  section { padding: 4rem 0; }
  .hero { padding: 4.5rem 0 5rem; }
  .manifesto { padding: 5rem 0; }
  .prin-grid, .team-grid { grid-template-columns: 1fr; }
  .gitlog-body { font-size: 0.78rem; }
  .commit { grid-template-columns: 1fr; gap: 0.15rem; }
}
