/* ==========================================================================
   About + Contact pages
   Figma 1680 frame: header 80px tall, page content starts at y=160.
   ========================================================================== */
.page { padding-top: clamp(48px, 4.762vw, 80px); }


/* ---------- About ---------- */
.about {
  container-type: inline-size;              /* 100cqw = full content width */
  display: flex; align-items: stretch; gap: var(--g);
}
.about .prose { display: flex; flex-direction: column; gap: 24px; }
.about__text {
  flex: 1 0 0; min-width: 1px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.about__bar {
  width: calc((100cqw - 5 * var(--g)) / 3 + var(--g));   /* same 2 columns as the photo */
  height: 10px;
  background: var(--accent);
}
.about__photo { flex: none; align-self: flex-start; aspect-ratio: 1; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }

/* Body → footer: 120px, then the home-style footer (rule, 80px, Let’s connect) */
.site-footer--about { margin-top: clamp(72px, 7.143vw, 120px); }

/* One column: text → photo (no bar) */
@media (max-width: 899px) {
  .about { flex-direction: column; gap: 32px; }
  .about__text { display: contents; }
  .about .prose { order: 1; }
  .about__photo { order: 2; width: min(373px, 100%); }
  .about__bar { display: none; }   /* only aligns the two columns on desktop */
}

/* Bar sweep — same marker stroke as the homepage highlight.
   main.js adds .is-in once fonts are ready and the bar is in view. */
/* The colour is drawn by ::after so the observed element itself is never
   clipped or scaled (a zero-area target never counts as "in view"). */
.js .about__bar { position: relative; background: none; }
.js .about__bar::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
}
.js .about__bar.is-in::after { transform: scaleX(1); transition: transform 0.9s var(--ease-inout) 0.35s; }
.js .contact__list::before { transform: scaleY(0); transform-origin: center top; }
.js .contact__list.is-in::before { transform: scaleY(1); transition: transform 0.9s var(--ease-inout) 0.35s; }

/* ---------- Contact ---------- */
.contact { display: flex; flex-direction: column; align-items: center; gap: 80px; text-align: center; }
.contact__titles { display: flex; flex-direction: column; gap: 16px; }
.contact__title { font-size: 72px; line-height: 88px; font-weight: 500; }
.contact__lead { font-size: 24px; line-height: 38px; }

.contact__list { display: flex; align-items: stretch; gap: 24px; text-align: left; }
.contact__list::before { content: ""; flex: none; width: 10px; background: var(--accent); }
.contact__links {
  display: flex; flex-direction: column; align-items: flex-start; gap: 32px;
  font-size: 32px; line-height: 42px; font-weight: 500; white-space: nowrap;
}
.contact__links a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  transition: text-decoration-color 0.2s ease;
}
.contact__links a:hover { text-decoration-color: currentColor; }

/* Footer: rule · 40 · “Selected projects” · 80 · three project links */
.site-footer--contact { margin-top: var(--section-gap); }
.selected { display: flex; flex-direction: column; gap: 80px; margin-top: 40px; }
.selected__label { text-align: center; font-size: 18px; line-height: 32px; font-weight: 400; }
.selected__list { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--g); }
/* Hover matches the case-study pager: bar grows 24 → 40, title lifts 16px.
   Bar is absolute (bottom) so the hover never changes the row height. */
.selected__item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: 44px;                     /* 20 gap + 24 bar */
  width: min(360px, (100% - 2 * var(--g)) / 3);
  text-align: center;
}
.selected__title {
  font-size: 24px; line-height: 32px; font-weight: 500;
  transition: transform 0.35s var(--ease-out);
}
.selected__item--narrow .selected__title { max-width: 280px; }
.selected__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 24px; background: var(--c);
  transition: height 0.35s var(--ease-out);
}
.selected__item:hover .selected__bar { height: 40px; }
.selected__item:hover .selected__title { transform: translateY(-16px); }

@media (max-width: 1199px) {
  .contact__title { font-size: 60px; line-height: 72px; }
  .contact__lead { font-size: 21px; line-height: 33px; }
  .selected__title { font-size: 20px; line-height: 28px; }
}
@media (max-width: 899px) {
  .contact { gap: 56px; }
  .contact__title { font-size: 44px; line-height: 52px; }
  .contact__lead { font-size: 18px; line-height: 29px; }
  .contact__links { font-size: 24px; line-height: 32px; gap: 24px; }
  .contact__list { gap: 20px; }
  /* Same as the mobile menu: colour bar to the left of the title */
  .selected { gap: 8px; margin-top: 40px; }   /* label → list as in the menu */
  .selected__label { text-align: left; font-size: 14px; line-height: 24px; font-weight: 600; color: var(--muted); }
  .selected__list { flex-direction: column; align-items: stretch; gap: 4px; }
  .selected__item {
    width: 100%; padding: 10px 0;
    flex-direction: row; align-items: flex-start; gap: 14px; text-align: left;
  }
  .selected__bar { position: static; order: -1; flex: none; width: 8px; height: 22px; margin-top: 4px; }
  .selected__title { font-size: 22px; line-height: 30px; }
  .selected__item:hover .selected__bar { height: 22px; }
  .selected__item:hover .selected__title { transform: none; }
  .selected__item--narrow .selected__title { max-width: none; }
}
