/* ROSINT homepage project sections.
 *
 * One short hero per project below the eagle. Each is a mark + a few lines
 * of what the thing actually is; the rail buttons scroll here.
 */

.projects {
  border-top: 1px solid rgb(81 255 13 / 0.18);
}

.project {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  /* Top-aligned: centring floated the mark mid-paragraph on long ledes. */
  align-items: start;
  gap: clamp(1.2rem, 4vw, 3rem);
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(2.6rem, 8vmin, 5rem) clamp(1.1rem, 5vw, 3rem);
}

.project + .project {
  border-top: 1px solid rgb(81 255 13 / 0.18);
}

/* Scroll anchors land clear of the sticky rail. */
.project {
  scroll-margin-top: var(--rail-h);
}

.project__mark {
  display: grid;
  place-items: center;
  width: clamp(3.4rem, 9vw, 5.4rem);
  height: clamp(3.4rem, 9vw, 5.4rem);
  flex: 0 0 auto;
  /* Drop past the eyebrow so the mark reads level with the project name. */
  margin-top: 1.4rem;
}

.project__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Text mark for a project with no logo asset yet. */
.project__mark--text {
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.project__eyebrow {
  font-size: clamp(0.62rem, 1.4vmin, 0.72rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
}

.project__title {
  font-size: clamp(1.5rem, 4.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  margin: 0.45rem 0 0.7rem;
}

.project--redstring .project__title {
  color: var(--redstring);
}

.project__lede {
  font-size: clamp(0.9rem, 1.9vmin, 1.02rem);
  line-height: 1.6;
  max-width: 48ch;
  opacity: 0.9;
}

.project__link {
  display: inline-block;
  margin-top: 1rem;
  font-size: clamp(0.72rem, 1.5vmin, 0.84rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgb(81 255 13 / 0.4);
}

.project__link:hover,
.project__link:focus-visible {
  border-bottom-color: currentColor;
}

/* ---- hero scroll cue ---------------------------------------------------- */

.hero__scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(1rem, 3vh, 2rem);
  color: inherit;
  text-decoration: none;
  font-size: clamp(0.62rem, 1.4vmin, 0.74rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 140ms linear;
}

.hero__scroll:hover,
.hero__scroll:focus-visible {
  opacity: 1;
}

.hero__chevron {
  width: 0.62em;
  height: 0.62em;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: hero-nudge 2.4s ease-in-out infinite;
}

@keyframes hero-nudge {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(2px, 2px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__chevron { animation: none; }
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 40rem) {
  .project {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: clamp(0.9rem, 3vw, 1.4rem);
  }

  /* Stacked: the mark sits above the copy, so no title-alignment offset. */
  .project__mark {
    margin-top: 0;
  }
}
