/* Home page: highlights gallery, photo bento, the divisions stage, the "where do you fit in" cards, the timeline constellation, the marquee. */

/* ---------- highlights: a row of large cards that scrolls sideways and snaps, with arrow buttons ---------- */

.highlights {
  padding: var(--section-space) var(--gutter);
}

.highlights-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.highlights-head .section-title {
  margin-bottom: 0;
}

.paddles {
  display: flex;
  flex: none;
  gap: 12px;
}

.paddle {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(201, 167, 255, 0.45);
  border-radius: 50%;
  background: rgba(14, 8, 32, 0.7);
  color: #fff;
  cursor: pointer;
  place-items: center;
  transition:
    background-color 0.3s,
    opacity 0.3s;
}

.paddle:hover {
  background: rgba(116, 21, 201, 0.5);
}

.paddle:disabled {
  cursor: default;
  opacity: 0.3;
}

.paddle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* full-bleed, so cards run off the edge of the screen and invite a swipe */
.gallery {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden; /* sideways only: without this the row can also be nudged up and down */
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 20px;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.highlight {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  width: clamp(280px, 80vw, 520px);
  min-height: clamp(340px, 50vh, 440px);
  flex: none;
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  scroll-snap-align: start;
  transition: border-color 0.4s;
}

.highlight:hover {
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
}

.highlight h3 {
  position: relative;
  z-index: 1;
  max-width: 22ch;
  font-size: clamp(1.4rem, 2.1vw, 1.9rem);
  line-height: 1.24;
  text-wrap: pretty;
}

@media (max-width: 720px) {
  .paddles {
    display: none;
  }
}

/* ---------- how our work comes together: bento of photo cards ---------- */

.work {
  padding: var(--section-space) var(--gutter);
}

/* 6 x 2 grid: the lead card takes 4 x 2, the other two take 2 x 1 each, so no cell is left empty */
.bento {
  display: grid;
  max-width: 1280px;
  grid-auto-flow: dense;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, minmax(250px, auto));
  gap: 16px;
  margin-bottom: 44px;
}

.bento-card {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  grid-column: span 2;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.4s;
}

.bento-card--lead {
  grid-column: span 4;
  grid-row: span 2;
}

.bento-card:hover {
  border-color: rgba(201, 167, 255, 0.5);
}

.bento-card h3 {
  position: relative;
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
}

.bento-card--lead h3 {
  max-width: 14ch;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.bento-card p {
  position: relative;
  max-width: 46ch;
  color: rgba(246, 240, 255, 0.82);
}

/* a photo shot on a white backdrop needs pulling down to sit on the dark page */
.bento-card--bright .card-photo img {
  filter: saturate(0.92) contrast(1.04) brightness(0.62);
}

@media (max-width: 800px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .bento-card,
  .bento-card--lead {
    min-height: 260px;
    grid-column: auto;
    grid-row: auto;
  }
}

/* ---------- divisions stage: the shared scroll stage (site.css) with a canvas drawn by ring.js ---------- */

.stage {
  height: 620vh;
}

#ring {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- where do you fit in: four photo cards, everything on show ---------- */

.fit {
  padding: var(--section-space) var(--gutter);
}

.fit-grid {
  display: grid;
  max-width: 1280px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.fit-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: clamp(340px, 46vh, 440px);
  align-items: flex-end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.4s;
}

.fit-card:hover {
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
}

.fit-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: saturate(0.92) contrast(1.04);
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.fit-card:hover img {
  transform: scale(1.05);
}

.fit-card::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(7, 4, 15, 0.97) 0%, rgba(7, 4, 15, 0.78) 42%, rgba(7, 4, 15, 0.08) 78%),
    linear-gradient(135deg, color-mix(in srgb, var(--c) 26%, transparent), transparent 62%);
  content: "";
}

.fit-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 24px;
}

.fit-body h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.6rem);
}

.fit-body p {
  color: rgba(246, 240, 255, 0.82);
  font-size: 0.97rem;
}

@media (max-width: 1100px) {
  .fit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fit-card {
    min-height: 340px;
  }
}

@media (max-width: 600px) {
  .fit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fit-card {
    min-height: 300px;
  }
}

/* ---------- timeline: the shared scroll stage (site.css) with a constellation drawn by constellation.js ---------- */

.timeline {
  height: 760vh;
  scroll-margin-top: -96px; /* cancels the page's scroll padding, which is for ordinary sections */
}

/* a photograph for the moment in view, above its caption */
.timeline .copy {
  height: 540px;
}

.step-photo {
  width: 100%;
  height: 210px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  filter: saturate(0.92) contrast(1.04);
  object-fit: cover;
}

@media (max-width: 720px) {
  .timeline .copy {
    height: 360px;
  }

  .step-photo {
    height: 84px;
    margin-bottom: 12px;
    border-radius: 14px;
  }
}

.sky {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* keeps the caption readable where the constellation passes behind it */
.timeline .sticky::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7, 4, 15, 0.9) 0%,
    rgba(7, 4, 15, 0.55) 30%,
    transparent 52%
  );
  content: "";
  pointer-events: none;
}

.sky-dust circle {
  fill: #e2d6ff;
}

.sky-dust .twinkle {
  animation: twinkle 3.6s ease-in-out infinite;
}

@keyframes twinkle {
  50% {
    opacity: 0.1;
  }
}

/* stroke width and label size are set by the script, so they hold steady as the camera zooms */
.sky-lines {
  stroke: rgba(201, 167, 255, 0.75);
  stroke-linecap: round;
}

.sky-star path {
  fill: #fff;
}

.sky-star--goal path {
  fill: #ffd9f6;
}

/* the dark outline lets a name sit over a line without the two tangling */
.sky-labels text {
  fill: var(--ink);
  stroke: var(--bg);
  stroke-linejoin: round;
  stroke-width: 0.5em;
  dominant-baseline: middle;
  font-family: var(--font-body);
  paint-order: stroke;
}

@media (max-width: 720px) {
  .timeline .sticky::after {
    background: linear-gradient(
      0deg,
      rgba(7, 4, 15, 0.92) 0%,
      rgba(7, 4, 15, 0.6) 44%,
      transparent 60%
    );
  }
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  padding: var(--section-space) 0;
}

.marquee .section-title {
  margin-bottom: 40px;
  padding: 0 var(--gutter);
}
