/* src/pages/About.css */
/* About page (layout spec §4 "О компании"). `main` carries no padding of
   its own (../../styles/base.css) — each section below owns its own inset,
   the same "content-box, max-width: 1320px, side padding" shape
   Header/Footer/DemoBlock use, so it stays centered and capped at the same
   width as the chrome above and below it. The "why" band additionally
   breaks out to full viewport width for its background
   (docs/site-handoff/source/About.dc.html: the band spans edge to edge
   above the 1320px container, ТЗ §4). */
.oj-about-hero {
  /* This section is a flex item of `main` (base.css, column direction), not
     a sibling of it like Header/Footer — two consequences, unlike
     Header.css's own container:
     1. An auto cross-axis margin on a flex item wins over `align-items:
        normal`'s implicit stretch, so `margin: 0 auto` would shrink the box
        to its content's width instead of filling out to `max-width`
        (verified: it collapsed to the h1's own 780px) — `align-self:
        center` instead, which only matters once `max-width` caps growth
        past 1440px viewport.
     2. `width: 100%` together with `box-sizing: content-box` sets the
        *content* to 100% of the flex container and adds padding on top,
        overflowing it (verified: 60px of horizontal scroll at 1024px) — so
        this box is `border-box` and the cap is `1320 + 2 * 60`, not
        Header's content-box `1320`. */
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 1440px;
  align-self: center;
  padding: 88px var(--oj-page-pad-desktop) 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.oj-about-hero__mark {
  display: block;
  position: absolute;
  /* Measured from the section's own padding edge (About.dc.html /
     About1024.dc.html): 60px in from the right, i.e. flush with the content
     edge, not bleeding into the side gutter. */
  right: var(--oj-page-pad-desktop);
  top: 50%;
  width: 400px;
  height: 400px;
  margin-top: -200px;
}

.oj-about-hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: 96px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.oj-about-hero__slogan {
  margin: -4px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--oj-font-display);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--oj-navy);
}

.oj-about-hero__slogan-mark {
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--oj-amber);
  transform: rotate(45deg);
}

.oj-about-hero__lede {
  margin: 0;
  max-width: 640px;
  font-size: 24px;
  line-height: 1.55;
  color: var(--oj-text);
}

.oj-about-why {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--oj-navy);
}

.oj-about-why__inner {
  /* content-box: see ../../components/Header/Header.css for why — same
     container bug (border-box would cap padding *and* content together,
     doubling the inset to 120px instead of the mockup's 60). */
  box-sizing: content-box;
  max-width: 1320px;
  margin: 0 auto;
  padding: 96px var(--oj-page-pad-desktop);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.oj-about-why__inner h2 {
  margin: 0;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: #fff;
}

.oj-about-why__accent {
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--oj-cyan);
  text-decoration-thickness: 4px;
  text-underline-offset: 10px;
}

.oj-about-why__body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* the compare line takes the first paragraph's size at every width */
.oj-about-why__body1,
.oj-about-why__compare {
  margin: 0;
  font-size: 22px;
  line-height: 1.55;
  color: rgb(255 255 255 / 78%);
}

.oj-about-why__body2 {
  margin: 0;
  font-family: var(--oj-font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #fff;
}

/* `.oj-wordmark` (base.css, shared — not ours to edit) fixes its text to
   `--oj-navy` for its usual light-background spots (header, footer). On this
   band's dark navy background that text would be invisible; this selector's
   extra specificity overrides just the color, here, without touching the
   shared component. */
.oj-about-why__body2 .oj-wordmark,
.oj-about-why__compare .oj-wordmark {
  color: inherit;
}

.oj-about-why__compare a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.oj-about-team {
  /* border-box + width/align-self, not content-box + margin: auto — see
     `.oj-about-hero` above, same flex-item-of-`main` issue. */
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  align-self: center;
  padding: 96px var(--oj-page-pad-desktop);
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.oj-about-team h2 {
  margin: 0;
  font-size: 56px;
  letter-spacing: -0.045em;
}

.oj-about-team__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.oj-about-team__card {
  box-sizing: border-box;
  padding: 36px;
  border-radius: var(--oj-r-xl);
  background: var(--oj-surface);
  display: grid;
  gap: 28px;
  align-items: start;
}

.oj-about-team__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.oj-about-team__heading {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.oj-about-team__name {
  container: oj-founder-name / inline-size;
  font-family: var(--oj-font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.025em;
  color: var(--oj-navy);
}

/* Both cards are always the same width, so one threshold breaks both names
   at once: the moment the longest name stops fitting its line, every family
   name moves to a line of its own. The threshold is that longest name's
   width in its own font size (em), measured: "Александр Нигматуллин"
   11.70em, "Alexander Nigmatullin" 10.17em — re-measure if a name changes. */
@container oj-founder-name (max-width: 11.75em) {
  :lang(ru) .oj-about-team__namePart {
    display: block;
  }
}

@container oj-founder-name (max-width: 10.2em) {
  :lang(en) .oj-about-team__namePart {
    display: block;
  }
}

.oj-about-team__role {
  font-family: var(--oj-font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--oj-blue);
}

.oj-about-team__bio {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--oj-text-2);
}

@media (max-width: 1279px) {
  .oj-about-hero__mark {
    width: 260px;
    height: 260px;
    margin-top: -130px;
  }

  .oj-about-hero h1 {
    max-width: 600px;
    font-size: 84px;
  }

  .oj-about-hero__slogan {
    font-size: 32px;
  }

  .oj-about-hero__slogan-mark {
    width: 12px;
    height: 12px;
    border-radius: 3px;
  }

  .oj-about-hero__lede {
    max-width: 600px;
    font-size: 22px;
  }

  .oj-about-why__inner {
    gap: 48px;
  }

  .oj-about-why__inner h2 {
    font-size: 46px;
  }

  .oj-about-why__accent {
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
  }

  .oj-about-why__body1,
  .oj-about-why__compare {
    font-size: 19px;
  }

  .oj-about-why__body2 {
    font-size: 26px;
  }

  .oj-about-team h2 {
    font-size: 46px;
  }

  .oj-about-team__grid {
    gap: 24px;
  }

  .oj-about-team__card {
    padding: 28px;
    border-radius: 24px;
    gap: 20px;
  }

  .oj-about-team__name {
    font-size: 24px;
  }

  .oj-about-team__role {
    font-size: 16px;
  }

  .oj-about-team__bio {
    font-size: 17px;
  }
}

/* Below the 1024 artboard the mark has no room beside the text: at 768-944
   it ran over the slogan and the paragraph (and, narrower, the H1 itself
   would not fit the space left of it). It goes, as on phones. */
@media (max-width: 1023px) {
  .oj-about-hero__mark {
    display: none;
  }
}

@media (max-width: 767px) {
  .oj-about-hero {
    padding: 40px 20px 40px;
    gap: 24px;
  }

  .oj-about-hero h1 {
    max-width: none;
    font-size: 42px;
    line-height: 1.03;
    letter-spacing: -0.045em;
  }

  .oj-about-hero__slogan {
    margin-top: -6px;
    font-size: 22px;
  }

  .oj-about-hero__slogan-mark {
    width: 10px;
    height: 10px;
    border-radius: 2px;
  }

  .oj-about-hero__lede {
    max-width: none;
    font-size: 18px;
    line-height: 1.5;
  }

  .oj-about-why__inner {
    padding: 48px 20px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .oj-about-why__inner h2 {
    font-size: 32px;
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .oj-about-why__accent {
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
  }

  .oj-about-why__body {
    gap: 20px;
  }

  .oj-about-why__body1,
  .oj-about-why__compare {
    font-size: 18px;
    line-height: 1.5;
  }

  .oj-about-why__body2 {
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.02em;
  }

  .oj-about-team {
    padding: 48px 20px 48px;
    gap: 24px;
  }

  .oj-about-team h2 {
    font-size: 30px;
    letter-spacing: -0.04em;
  }
}

@media (max-width: 599px) {
  /* one under the other, the cards still share one height: the taller's */
  .oj-about-team__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
    gap: 16px;
  }

  .oj-about-team__card {
    padding: 24px;
    border-radius: 22px;
    gap: 16px;
  }

  .oj-about-team__info {
    gap: 4px;
  }
}

/* The page's top space: one value for every inner page (`--oj-page-top`,
   base.css; owner's call, 09.11). Last in the file so it outranks the
   breakpoint rules above. */
.oj-about-hero {
  padding-top: var(--oj-page-top);
}


/* the page's own style attributes, moved here by scripts/build/inlineStyles.mjs */

