/* Product-specific storytelling layer for secondary Raysor project profiles.
   This file loads after project-profile-liquid-glass.css. It gives truthful
   workflow narratives their own material language and lets profile geometry
   respond to the actual main content container instead of viewport guesses. */

.project-profile-page main {
  container-type: inline-size;
  container-name: project-profile-page;
}

.project-profile-story {
  margin-top: clamp(14px, 2vw, 24px);
}

.project-profile-story-heading {
  max-inline-size: 64rem;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.project-profile-story-heading h2 {
  max-inline-size: 18ch;
  margin: 0 0 10px;
  text-wrap: balance;
}

.project-profile-story-heading .lede {
  max-inline-size: 66ch;
  margin: 0;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.project-profile-flow {
  --flow-gap: clamp(12px, 1.55vw, 18px);
  counter-reset: project-flow;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: var(--flow-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  container-type: inline-size;
  container-name: project-profile-flow;
}

.project-profile-flow > li {
  counter-increment: project-flow;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--project-profile-line);
  border-radius: clamp(22px, 2.7vw, 30px);
  background:
    radial-gradient(circle at 90% 4%, var(--project-accent-soft), transparent 11rem),
    linear-gradient(145deg, rgba(255,255,255,.07), transparent 38%),
    color-mix(in srgb, var(--project-accent) 4%, rgba(5,14,24,.76));
  box-shadow:
    0 22px 56px rgba(0,0,0,.24),
    inset 0 1px rgba(255,255,255,.095),
    inset 0 -1px rgba(255,255,255,.025);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  transition:
    transform 320ms cubic-bezier(.2,.86,.22,1),
    border-color 220ms ease,
    box-shadow 280ms ease,
    background 280ms ease;
}

.project-profile-flow > li::before {
  content: counter(project-flow, decimal-leading-zero);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--project-profile-line-strong);
  border-radius: 13px;
  color: color-mix(in srgb, var(--project-accent) 72%, white);
  background:
    radial-gradient(circle at 30% 12%, rgba(255,255,255,.18), transparent 45%),
    color-mix(in srgb, var(--project-accent) 10%, rgba(6,16,28,.82));
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 9px 24px rgba(0,0,0,.18);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .04em;
}

.project-profile-flow > li::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--project-accent) 76%, white), transparent);
  opacity: .65;
  pointer-events: none;
}

.project-profile-flow h3 {
  margin: 0 0 8px;
  color: #f5fbff;
  font-size: clamp(1.14rem, 1.5vw, 1.38rem);
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.project-profile-flow p {
  margin: 0;
  color: #a9bdcc;
  line-height: 1.58;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

/* Product-specific flow silhouettes. These remain abstract first-party material,
   not fabricated screenshots or unapproved application icons. */
.project-profile-page[data-project-profile="striveloop"] .project-profile-flow > li:nth-child(2n),
.project-profile-page[data-project-profile="ray"] .project-profile-flow > li:nth-child(2n) {
  background:
    radial-gradient(circle at 88% 6%, color-mix(in srgb, var(--project-accent-2) 13%, transparent), transparent 11rem),
    linear-gradient(145deg, rgba(255,255,255,.07), transparent 38%),
    rgba(5,16,24,.76);
}

.project-profile-page[data-project-profile="raysor-hub"] .project-profile-flow > li::before,
.project-profile-page[data-project-profile="tactical-tower"] .project-profile-flow > li::before {
  border-radius: 10px;
  transform: rotate(2deg);
}

.project-profile-page[data-project-profile="deep-file-orbit"] .project-profile-flow > li::before,
.project-profile-page[data-project-profile="backup-lab"] .project-profile-flow > li::before {
  border-radius: 50%;
  box-shadow:
    inset 0 1px rgba(255,255,255,.1),
    0 0 0 5px color-mix(in srgb, var(--project-accent) 5%, transparent),
    0 9px 24px rgba(0,0,0,.18);
}

.project-profile-page[data-project-profile="pocket-foundry"] .project-profile-flow > li::before {
  border-radius: 9px 15px 9px 15px;
  transform: rotate(-2deg);
}

.project-profile-page[data-project-profile="chat-organizer"] .project-profile-flow > li::before {
  border-radius: 12px;
  box-shadow:
    inset 0 1px rgba(255,255,255,.1),
    6px 6px 0 -2px color-mix(in srgb, var(--project-accent) 8%, transparent),
    0 9px 24px rgba(0,0,0,.18);
}

.project-profile-page[data-project-profile="serrenal-wave"] .project-profile-flow > li::before {
  border-radius: 50% 42% 54% 46% / 46% 55% 45% 54%;
  transform: rotate(-7deg);
}

@media (hover: hover) and (pointer: fine) {
  .project-profile-flow > li:hover {
    transform: translateY(-4px) scale(1.008);
    border-color: var(--project-profile-line-strong);
    box-shadow:
      0 30px 72px rgba(0,0,0,.3),
      0 0 34px var(--project-accent-soft),
      inset 0 1px rgba(255,255,255,.13);
  }
}

/* Main-content container authority supersedes the earlier viewport-only profile
   breakpoints when this later layer is present. */
@container project-profile-page (min-width: 56rem) {
  .project-profile-page .project-profile-hero h1,
  .project-profile-page .project-profile-hero .lede,
  .project-profile-page .project-profile-hero .project-profile-meta {
    max-inline-size: calc(100% - 190px);
  }
}

@container project-profile-page (max-width: 38.75rem) {
  .project-profile-page .project-profile-hero {
    padding-top: 126px !important;
    padding-bottom: 46px !important;
  }

  .project-profile-page .project-profile-hero::after {
    inset: 18px 0 0;
    border-radius: 28px;
  }

  .project-profile-page .project-profile-hero::before {
    top: 118px;
    right: 10px;
    width: 88px;
    opacity: .24;
  }

  .project-profile-page .project-profile-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-profile-page .project-profile-actions .button {
    width: 100%;
  }
}

@container project-profile-flow (max-width: 31rem) {
  .project-profile-flow {
    grid-template-columns: 1fr;
  }

  .project-profile-flow > li {
    padding: 22px;
  }
}

@media (pointer: coarse) {
  .project-profile-flow > li {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-profile-flow > li,
  .project-profile-page[data-project-profile="raysor-hub"] .project-profile-flow > li::before,
  .project-profile-page[data-project-profile="tactical-tower"] .project-profile-flow > li::before,
  .project-profile-page[data-project-profile="pocket-foundry"] .project-profile-flow > li::before,
  .project-profile-page[data-project-profile="serrenal-wave"] .project-profile-flow > li::before {
    transform: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-reduced-data: reduce) {
  .project-profile-flow > li,
  .project-profile-flow > li::before {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #07131f !important;
  }
}

@media (prefers-contrast: more) {
  .project-profile-flow > li,
  .project-profile-flow > li::before {
    border-color: color-mix(in srgb, var(--project-accent) 72%, white) !important;
  }
}

@media (forced-colors: active) {
  .project-profile-flow > li,
  .project-profile-flow > li::before {
    border-color: CanvasText !important;
    background: Canvas !important;
    color: CanvasText !important;
    box-shadow: none !important;
  }

  .project-profile-flow h3,
  .project-profile-flow p {
    color: CanvasText !important;
  }
}
