/* =========================================================================
   Reliever website v4 · Our Story · loads after /styles.css
   Founding story in a reading column with Jason in the margin beside the
   paragraph that introduces him (O3, O4, G6) · a wide dusk photo band that
   wipes in once · Security & trust on black under the prism band (O5, Q7)
   · Follow · From the blog (O6).
   ========================================================================= */

/* ------------------------------------------------------- founding story -- */
.story {
  --story-rail: 260px;
  --story-gap: clamp(40px, 5vw, 72px);
  --story-body: #333333;
}
.story__head .h1 {
  max-width: 18ch;
}

.story__problem,
.story__close {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.story__problem {
  margin-top: clamp(48px, 6vw, 88px);
}
.story__problem p,
.story__close p,
.founder__intro {
  max-width: 62ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--story-body);
  text-wrap: pretty;
}

/* Jason: portrait in the margin, his paragraph and quote in the column */
.founder {
  margin-top: clamp(56px, 7vw, 104px);
}
.founder__portrait {
  margin: 0;
  width: 100%;
  max-width: var(--story-rail);
}
.founder__portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--hairline);
  background: #d9d4cc;
}

/* the pull quote (O4): his words at display size, framed by the two drawn
   brackets of the [R] mark, attribution set like an eyebrow */
.pullquote {
  position: relative;
  margin: clamp(40px, 4.5vw, 64px) 0 0;
  padding: clamp(26px, 3vw, 36px) clamp(22px, 2.4vw, 32px)
    clamp(14px, 1.6vw, 20px) clamp(26px, 3vw, 40px);
  max-width: 50em;
}
.pullquote__text p {
  font-size: clamp(1.3rem, 2.15vw, 1.8rem);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -0.016em;
  color: var(--ink);
  text-wrap: pretty;
}
.pullquote__by {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 22px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pullquote__by::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.4em;
  background: var(--purple);
}
.pullquote .pullquote__bracket {
  position: absolute;
  width: 30px;
  height: 30px;
  color: var(--purple);
}
.pullquote__bracket--tl {
  top: 0;
  left: 0;
}
.pullquote__bracket--br {
  right: 0;
  bottom: 0;
  transform: rotate(180deg);
}

.story__close {
  margin-top: clamp(56px, 7vw, 96px);
}
.story__close .story__bullpen {
  padding-left: clamp(18px, 2vw, 26px);
  border-left: 2px solid var(--purple);
  max-width: 60ch;
}
.story__link {
  margin-top: -4px;
}

/* Desktop: a margin rail and a reading column. The H1 spans both; the
   portrait is the only thing in the rail, beside the paragraph that
   introduces him, and it stays in view while his quote scrolls past. */
@media (min-width: 960px) {
  .story > .wrap {
    display: grid;
    grid-template-columns: minmax(0, var(--story-rail)) minmax(0, 1fr);
    column-gap: var(--story-gap);
  }
  .story__head {
    grid-column: 1 / -1;
  }
  .story__problem,
  .story__close {
    grid-column: 2;
  }
  .founder {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, var(--story-rail)) minmax(0, 1fr);
    column-gap: var(--story-gap);
    align-items: start;
  }
  .founder__portrait {
    position: sticky;
    top: 100px;
    margin-top: 6px;
  }
  .pullquote {
    margin-left: calc(var(--story-gap) * -0.5);
  }
}
@media (max-width: 959px) {
  .founder__portrait {
    max-width: 220px;
    margin-bottom: 28px;
  }
}

/* ------------------------------------------------------------ photo band -- */
/* 21:9 across the full viewport; a taller crop on phones so it still
   reads as a place, not a strip. */
.photo-band {
  background: var(--paper);
}
.photo-band__frame {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  max-height: 82vh;
  width: 100%;
  background: #1c1f24;
}
.photo-band__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
@media (max-width: 640px) {
  .photo-band__frame {
    aspect-ratio: 16 / 10;
  }
  .photo-band__frame img {
    object-position: 38% 60%;
  }
}

/* ----------------------------------------------------- security & trust -- */
/* Pure black. Prism band removed (V2, v5): prism now lives only in closing
   bands, so this section opens on the default section padding instead. */
.trust.section--ink {
  background: #000000;
}
.trust__head {
  text-align: center;
}
.trust__head .eyebrow {
  justify-content: center;
}
.trust__head .h2 {
  margin-inline: auto;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #262626;
  border: 1px solid #262626;
  border-radius: var(--radius-l);
  overflow: hidden;
}
.trust-item {
  background: #000000;
  padding: clamp(22px, 2.4vw, 32px);
}
.trust-item--wide {
  grid-column: span 2;
}
.trust-item--wide p {
  max-width: 68ch;
}
.trust-item h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.trust-item p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}
@media (max-width: 860px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .trust-item--wide {
    grid-column: auto;
  }
}

/* --------------------------------------------------------------- follow -- */
.follow {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: clamp(8px, 1vw, 16px);
}
.follow__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.follow__mark {
  width: 104px;
  height: auto;
}
.follow__icons {
  display: flex;
  gap: 8px;
}
.follow__icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: var(--pill);
  color: var(--muted);
  transition:
    color 140ms ease,
    border-color 140ms ease;
}
.follow__icons a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.follow__icons svg {
  width: 18px;
  height: 18px;
}

/* ----------------------------------------------------------------- blog -- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(24px, 2.8vw, 32px);
  border-radius: var(--radius-l);
}
.blog-card__date {
  margin: 0;
}
.blog-card p:not(.eyebrow) {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}
.blog-more {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* the live card (O6): the heading link stretches over the whole card. The
   hover ring is a pseudo-element so the reveal stagger's transition and
   inline delay on the card never slow it down. */
.blog-card__link {
  color: inherit;
  text-decoration: none;
}
.blog-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.blog-card--link {
  cursor: pointer;
}
.blog-card--link::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--ink);
  border-radius: inherit;
  box-shadow: var(--float);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.blog-card--link:hover::before,
.blog-card--link:has(.blog-card__link:focus-visible)::before {
  opacity: 1;
}
.blog-card--link .blog-more {
  color: var(--purple);
  transition: color 140ms ease;
}
.blog-card--link:hover .blog-more {
  color: var(--ink);
}
.blog-card__link:focus-visible {
  outline: none;
}
.blog-card--link:has(.blog-card__link:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Motion · every final state lives above
   ========================================================================= */

/* Jason's portrait uncovers from its bottom edge (v3); the radius rides
   along so the corners never square off mid-wipe. */
.founder__portrait img[data-wipe] {
  --wipe-radius: var(--radius-m);
}

@media (prefers-reduced-motion: no-preference) {
  /* The dusk band opens left to right, slowly, once, while the picture
     settles from a slight zoom. motion.js only adds .is-wiped. */
  .js .photo-band [data-wipe] {
    clip-path: inset(0 100% 0 0);
  }
  .js .photo-band [data-wipe] img {
    transform: scale(1.08);
    transform-origin: 30% 60%;
  }
  .js .photo-band [data-wipe].is-wiped {
    clip-path: inset(0 0 0 0);
    transition: clip-path 1800ms cubic-bezier(0.65, 0, 0.35, 1);
  }
  .js .photo-band [data-wipe].is-wiped img {
    transform: none;
    transition: transform 2600ms var(--ease);
  }

  /* the security grid's 1px rule ground would otherwise sit there as a
     solid slab while its items are still at opacity 0, so it holds black
     until they have landed (v3) */
  .js .trust-grid[data-stagger] {
    background: #000000;
  }
  .js .trust-grid[data-stagger].is-in {
    background: #262626;
    transition: background 500ms var(--ease) 240ms;
  }
}
