/* QNSET About page. Builds on qx.css (tokens, buttons, sections, CTA). */

/* ---------- Hero: "Software sold as fast. / Shipped slow. / So we started QNSET." ---------- */

.qa-hero {
  padding-block: clamp(4rem, 12vh, 8rem) clamp(4rem, 10vh, 6rem);
}

.qa-hero-title {
  margin: 0;
  font-size: clamp(2.8rem, 7.8vw, 7.75rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.qa-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.qa-line > span {
  position: relative;
  display: inline-block;
  transform: translateY(110%);
  animation: qa-rise 1.1s var(--qx-ease) forwards;
}

.qa-line:nth-child(1) > span { animation-delay: 0.15s; }
.qa-line:nth-child(2) > span { animation-delay: 0.3s; }
.qa-line:nth-child(3) > span { animation-delay: 1.55s; }

/* "Shipped slow." gets struck through by a drawn line, then recedes */
.qa-line--struck s {
  text-decoration: none;
  animation: qa-recede 0.6s ease 1.25s forwards;
}

.qa-strike {
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  top: 52%;
  height: 0.075em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--qx-red), var(--qx-purple));
  transform: scaleX(0);
  transform-origin: left;
  animation: qx-grow-x 0.55s cubic-bezier(0.65, 0, 0.35, 1) 1s forwards;
}

.qa-hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem 4rem;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--qx-line);
  opacity: 0;
  animation: qx-fade-up 0.9s var(--qx-ease) 1.95s forwards;
}

.qa-hero-lead {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  color: var(--qx-muted);
}

.qa-facts {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin: 0;
}

.qa-facts dt {
  font-family: var(--qx-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qx-faint);
}

.qa-facts dd {
  margin: 0.4rem 0 0;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

/* ---------- Team photo: inset frame opens to full bleed with scroll ---------- */

.qa-photo {
  /* --p (0..1) is the scroll progress, set by about.js; 1 = fully open */
  --p: 1;
}

.qx-js .qa-photo {
  --p: 0;
}

.qa-photo-frame {
  position: relative;
  height: min(82vh, 58vw);
  margin: 0;
  overflow: hidden;
  clip-path: inset(calc((1 - var(--p)) * 7%) calc((1 - var(--p)) * 9%) round calc((1 - var(--p)) * 28px));
}

.qa-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: scale(calc(1.14 - var(--p) * 0.14));
}

/* a soft fade into the page at the bottom edge */
.qa-photo-frame::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(to top, rgba(5, 5, 7, 0.55), transparent);
  pointer-events: none;
}

.qa-photo-caption {
  margin-top: 1rem;
  font-family: var(--qx-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qx-faint);
}

/* ---------- Story ---------- */

.qa-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.qa-story-head {
  position: sticky;
  top: 7rem;
}

.qa-story-body {
  display: grid;
  gap: 1.75rem;
}

.qa-story-body > p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--qx-muted);
}

.qa-story-body > p.qa-pull {
  margin-top: 1rem;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--qx-ink);
}

/* ledger: what usually gets deferred stays readable; an arrow moves it to day one */
.qa-ledger {
  margin-block: 0.5rem 1rem;
  border-top: 1px solid var(--qx-line);
}

.qa-ledger-head {
  display: flex;
  justify-content: space-between;
  padding-block: 0.9rem;
  font-family: var(--qx-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qx-faint);
}

.qa-ledger ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.qa-ledger-row {
  --c: var(--qx-red);
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) clamp(2.5rem, 5vw, 4.5rem) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--qx-line);
}

.qa-ledger-row--purple { --c: var(--qx-purple); }
.qa-ledger-row--blue { --c: var(--qx-blue); }

.qa-ledger-what {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.qa-ledger-was {
  line-height: 1.45;
  color: var(--qx-muted);
}

/* a thin line in the row colour with a small arrowhead */
.qa-ledger-arrow {
  position: relative;
  height: 1px;
  background: var(--c);
  transform-origin: left;
}

.qa-ledger-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--c);
  border-right: 1px solid var(--c);
  transform: translateY(-50%) rotate(45deg);
}

.qa-ledger-now {
  padding: 0.3rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  font-family: var(--qx-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* with JS: each arrow draws toward its tag, then the "Day one" tag lands */
.qx-js .qa-ledger-arrow {
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.qx-js .qa-ledger-now {
  opacity: 0;
  transform: translateX(-10px) scale(0.92);
  transition: opacity 0.4s ease, transform 0.6s var(--qx-ease);
}

.qx-js .qa-ledger.is-in .qa-ledger-arrow { transform: none; }
.qx-js .qa-ledger.is-in .qa-ledger-now { opacity: 1; transform: none; }

.qx-js .qa-ledger.is-in .qa-ledger-row:nth-child(1) .qa-ledger-arrow { transition-delay: 0.35s; }
.qx-js .qa-ledger.is-in .qa-ledger-row:nth-child(1) .qa-ledger-now { transition-delay: 0.85s; }
.qx-js .qa-ledger.is-in .qa-ledger-row:nth-child(2) .qa-ledger-arrow { transition-delay: 0.6s; }
.qx-js .qa-ledger.is-in .qa-ledger-row:nth-child(2) .qa-ledger-now { transition-delay: 1.1s; }
.qx-js .qa-ledger.is-in .qa-ledger-row:nth-child(3) .qa-ledger-arrow { transition-delay: 0.85s; }
.qx-js .qa-ledger.is-in .qa-ledger-row:nth-child(3) .qa-ledger-now { transition-delay: 1.35s; }

/* ---------- Founders ---------- */

.qa-founders {
  border-top: 1px solid var(--qx-line);
}

.qa-founder-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.qa-founder {
  position: relative;
}

/* the source photos are 288px, so the frame never renders them larger */
.qa-founder-photo {
  width: min(100%, 288px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--qx-surface);
}

.qa-founder-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.6s ease, transform 0.9s var(--qx-ease);
}

.qa-founder:hover .qa-founder-photo img {
  filter: none;
  transform: scale(1.04);
}

.qa-crop-umut { scale: 1.1; }
.qa-crop-kuzey { object-position: 50% 15%; scale: 1.05; }

.qa-founder-name {
  position: relative;
  display: inline-block;
  margin: 1.5rem 0 0;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.035em;
}

.qa-founder-name::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25em;
  height: 2px;
  background: var(--qx-spectrum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--qx-ease);
}

.qa-founder:hover .qa-founder-name::after {
  transform: scaleX(1);
}

/* photos wipe up like a curtain instead of the generic fade */
.qx-js .qx .qa-founder[data-reveal] {
  opacity: 1;
  transform: none;
}

.qx-js .qa-founder .qa-founder-photo {
  clip-path: inset(100% 0 0 0 round 1.25rem);
  transition: clip-path 1.1s var(--qx-ease) var(--d, 0ms);
}

.qx-js .qa-founder .qa-founder-name {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease, transform 1s var(--qx-ease);
  transition-delay: calc(var(--d, 0ms) + 0.35s);
}

.qx-js .qa-founder.is-in .qa-founder-photo { clip-path: inset(0 0 0 0 round 1.25rem); }
.qx-js .qa-founder.is-in .qa-founder-name { opacity: 1; transform: none; }

/* ---------- Values: pinned, one principle at a time ---------- */

.qa-values {
  border-top: 1px solid var(--qx-line);
  padding-block: clamp(6rem, 14vh, 10rem);
}

.qa-values-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.qa-v--red { --c: var(--qx-red); }
.qa-v--purple { --c: var(--qx-purple); }
.qa-v--blue { --c: var(--qx-blue); }

/* index: the five names, the current one lit, with a bar that fills while it is current */
/* link to the long version on the Our Values page */
.qa-values-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--qx-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.qa-values-more svg {
  transition: transform 0.4s var(--qx-ease);
}

.qa-values-more:hover {
  color: var(--qx-ink);
}

.qa-values-more:hover svg {
  transform: translateX(4px);
}

.qa-values-index {
  display: none;
  margin: clamp(2rem, 5vh, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.qa-vi {
  position: relative;
  padding-block: 0.85rem;
  border-top: 1px solid var(--qx-line);
  color: var(--qx-faint);
  transition: color 0.4s ease;
}

.qa-vi:last-child {
  border-bottom: 1px solid var(--qx-line);
}

.qa-vi.is-active {
  color: var(--qx-ink);
}

.qa-vi-name {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.qa-vi-bar {
  /* --fill (0..1) is set by about.js */
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--c);
  transform-origin: left;
  transform: scaleX(var(--fill, 0));
}

/* stage: the statement itself, in large type */
.qa-values-stage {
  display: grid;
  gap: 3rem;
}

.qa-vs-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  font-family: var(--qx-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qx-muted);
}

.qa-vs-label::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 14px var(--c);
}

.qa-vs-text {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 4.25rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Desktop with JS: pin the section and swap statements as you scroll */
@media (min-width: 900px) {
  .qx-js .qa-values {
    height: 440vh;
    padding-block: 0;
  }

  .qx-js .qa-values-sticky {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100vh;
    padding-top: 4rem;
  }

  .qx-js .qa-values-index {
    display: block;
  }

  /* all statements share one grid cell; each slides through its own mask */
  .qx-js .qa-values-stage {
    gap: 0;
  }

  /* each statement fills the shared cell (sized by the longest one), so
     translateY(105%) always clears the mask, whatever its own length */
  .qx-js .qa-vs {
    display: grid;
    grid-area: 1 / 1;
    overflow: hidden;
    padding-bottom: 0.15em;
  }

  .qx-js .qa-vs-inner {
    transform: translateY(105%);
    transition: transform 0.9s var(--qx-ease);
  }

  .qx-js .qa-vs.is-active .qa-vs-inner {
    transform: none;
  }

  .qx-js .qa-vs.is-past .qa-vs-inner {
    transform: translateY(-105%);
    transition-duration: 0.6s;
  }
}

/* ---------- Timeline ---------- */

.qa-timeline {
  border-top: 1px solid var(--qx-line);
}

.qa-tl {
  /* --p (0..1): scroll progress through the timeline, set by about.js */
  --p: 1;
  position: relative;
}

.qx-js .qa-tl {
  --p: 0;
}

.qa-tl-track {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  /* past: solid; beyond "Today": dashed, still being written */
  background:
    linear-gradient(90deg, var(--qx-line) 0 70%, transparent 70%),
    repeating-linear-gradient(90deg, var(--qx-line) 0 6px, transparent 6px 12px);
}

.qa-tl-track span {
  position: absolute;
  inset: 0 30% 0 0;
  background: var(--qx-spectrum);
  transform-origin: left;
  transform: scaleX(var(--p));
}

.qa-tl-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  width: 70%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qa-tl-item {
  position: relative;
  padding-top: 2.25rem;
  opacity: 0.35;
  transition: opacity 0.6s ease;
}

.qa-tl-item.is-lit,
html:not(.qx-js) .qa-tl-item {
  opacity: 1;
}

.qa-tl-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--qx-faint);
  border-radius: 50%;
  background: var(--qx-bg);
  transition: border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

.qa-tl-item.is-lit .qa-tl-dot {
  border-color: var(--qx-ink);
  background: var(--qx-ink);
}

.qa-tl-item--now.is-lit .qa-tl-dot {
  border-color: var(--qx-red);
  background: var(--qx-red);
  animation: qa-live 2s ease-out infinite;
}

.qa-tl-year {
  display: block;
  font-family: var(--qx-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--qx-faint);
}

.qa-tl-title {
  margin: 0.75rem 0 0.75rem;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.qa-tl-text {
  max-width: 32ch;
  margin: 0;
  line-height: 1.55;
  color: var(--qx-muted);
}

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

@keyframes qa-rise { to { transform: translateY(0); } }
@keyframes qa-recede { to { opacity: 0.55; } }
@keyframes qa-live {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 74, 0.55); }
  80%, 100% { box-shadow: 0 0 0 10px rgba(255, 45, 74, 0); }
}

/* ---------- Mobile ---------- */

@media (max-width: 899px) {
  .qa-hero-foot,
  .qa-story-grid,
  .qa-values-grid {
    grid-template-columns: 1fr;
  }

  .qa-story-head {
    position: static;
  }

  .qa-founder-list {
    grid-template-columns: 1fr;
  }

  .qa-founder {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: center;
  }

  .qa-founder-photo {
    border-radius: 1rem;
  }

  .qa-founder-name {
    margin-top: 0;
  }

  .qa-photo-frame {
    height: 62vw;
  }

  /* the timeline turns vertical: track down the left edge */
  .qa-tl-track {
    top: 0;
    bottom: 0;
    left: 6px;
    right: auto;
    width: 2px;
    height: auto;
    background: var(--qx-line);
  }

  .qa-tl-track span {
    inset: 0;
    transform-origin: top;
    transform: scaleY(var(--p));
  }

  .qa-tl-list {
    grid-template-columns: 1fr;
    gap: 3rem;
    width: auto;
  }

  .qa-tl-item {
    padding: 0 0 0 2.5rem;
  }

  .qa-ledger-row {
    grid-template-columns: minmax(0, 1fr) 2.5rem auto;
    row-gap: 0.4rem;
  }

  .qa-ledger-was {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
