/* BountyFit project page. The app's own look (dark ink, cream text, one aura glow) inside the studio's header and footer.
   Colours come from the app: expo/constants/colors.ts. Font: Outfit (SIL Open Font License), self-hosted, Latin subset.
   Kept cheap to draw: no filters, no backdrop blur. Glows are gradients and box shadows.
   Motion is the one place this page departs from the still studio site (see the end of this file): short, quiet, and
   only on transform and opacity, apart from the aura colour fade. All of it switches off under prefers-reduced-motion. */

@font-face {
  font-family: "Outfit";
  src: url(../../assets/projects/bountyfit/fonts/outfit-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url(../../assets/projects/bountyfit/fonts/outfit-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url(../../assets/projects/bountyfit/fonts/outfit-900.woff2) format("woff2");
  font-weight: 900;
  font-display: swap;
}

.bf {
  --ink: #080a0f;
  --panel: #10131b;
  --panel-alt: #171b25;
  --line: #2b3142;
  --text: #f6f0e8;
  --muted: #a3abbd;
  --gold: #ffd166;
  --glow: #ff254f;
  --glow-soft: rgb(255 37 79 / 0.22);
  --bf-font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--ink);
  color-scheme: dark;
}
.bf[data-aura="ironclad"] {
  --glow: #b983ff;
  --glow-soft: rgb(185 131 255 / 0.22);
}
.bf[data-aura="farsight"] {
  --glow: #38bdf8;
  --glow-soft: rgb(56 189 248 / 0.22);
}
/* The studio's paper grain belongs on paper, not on the app's dark glass. */
.bf::after {
  display: none;
}

.bf main {
  background: var(--ink);
  color: var(--text);
  font-family: var(--bf-font);
  font-size: 17px;
  line-height: 1.6;
}
.bf main :focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 3px;
}
.bf-wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* ---------- Hero ---------- */

.bf-hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(48px, 8vw, 112px) clamp(56px, 8vw, 120px);
  background:
    radial-gradient(60% 70% at 78% 40%, var(--glow-soft), transparent 70%),
    radial-gradient(40% 50% at 10% 0%, rgb(255 255 255 / 0.04), transparent 70%),
    var(--ink);
}
.bf-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.bf-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.bf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #51f6b5;
  box-shadow: 0 0 0 4px rgb(81 246 181 / 0.18);
}
.bf-logo {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  margin: 0;
  font-family: var(--bf-font);
  font-weight: 900;
  font-size: clamp(48px, 8.4vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text);
}
.bf-logo img {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}
.bf-logo b {
  color: var(--glow);
  font-weight: 900;
}
.bf-lede {
  margin: 22px 0 14px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.bf-sub {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
}
.bf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}
.bf-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--glow);
  color: #0b0d12;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 30px -10px var(--glow);
}
.bf-btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.bf-btn--ghost:hover {
  border-color: var(--glow);
}

/* The wanted poster: parchment, ink and the bounty in gold-black. */
.bf-poster {
  margin: 0;
  justify-self: center;
  width: min(100%, 380px);
}
.bf-poster__paper {
  padding: 18px 18px 22px;
  background: linear-gradient(160deg, #f3e6c8, #e2cfa4);
  color: #2a1c10;
  text-align: center;
  border-radius: 4px;
  rotate: 2.5deg;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.25),
    0 30px 60px -20px rgb(0 0 0 / 0.8),
    0 0 90px -10px var(--glow-soft);
}
.bf-poster__wanted {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bf-poster img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid #2a1c10;
}
.bf-poster__name {
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bf-poster__bounty {
  margin: 4px 0 0;
  font-family: var(--bf-font);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.bf-poster__bounty span {
  margin-right: 6px;
  font-weight: 600;
}
.bf-poster__foot {
  margin: 8px 0 0;
  font-size: 13px;
  font-style: italic;
  opacity: 0.75;
}
.bf-poster figcaption {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Bands ---------- */

.bf-band {
  padding-block: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--line);
}
.bf-band--alt {
  background: var(--panel);
}
.bf-h2 {
  margin: 0 0 clamp(28px, 4vw, 48px);
  font-family: var(--bf-font);
  font-weight: 900;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
}
.bf-h2 small {
  display: block;
  margin-bottom: 10px;
  color: var(--glow);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bf-p {
  max-width: 48ch;
  margin: -16px 0 0;
  color: var(--muted);
}
.bf h3 {
  margin: 0 0 8px;
  font-family: var(--bf-font);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
.bf-band p,
.bf-band li {
  color: var(--muted);
}

/* The loop: three numbered steps. */
.bf-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.bf-steps li {
  padding-top: 22px;
  border-top: 2px solid var(--glow);
}
.bf-steps__n {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}
.bf-steps p {
  margin: 0;
}

/* Feature cards. */
.bf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bf-card {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-alt);
}
.bf-card p {
  margin: 0;
}

/* Auras and portraits. */
.bf-aura {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.bf-aura__pick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.bf-aura__pick button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  font: 600 16px/1 var(--bf-font);
  cursor: pointer;
}
.bf-aura__pick button i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.bf-aura__pick [data-aura="ironclad"] i {
  background: #b983ff;
}
.bf-aura__pick [data-aura="farsight"] i {
  background: #38bdf8;
}
.bf-aura__pick [data-aura="dread"] i {
  background: #ff254f;
}
.bf-aura__pick [aria-checked="true"] {
  border-color: var(--glow);
  box-shadow: 0 0 0 1px var(--glow) inset;
}
.bf-cast {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.bf-cast img {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px -18px var(--glow);
}

/* Plans. */
.bf-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.bf-plan {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--ink);
}
.bf-plan--pro {
  border-color: var(--glow);
  background: linear-gradient(180deg, var(--glow-soft), transparent 55%), var(--ink);
}
.bf-plan ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.bf-plan li {
  position: relative;
  padding: 9px 0 9px 28px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.bf-plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--glow);
  border-bottom: 2px solid var(--glow);
  rotate: -45deg;
}
.bf-small {
  margin: 18px 0 0;
  font-size: 14px;
}

/* Details and privacy. */
.bf-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 88px);
}
.bf-rows {
  margin: 0;
}
.bf-rows div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.bf-rows dt {
  color: var(--muted);
}
.bf-rows dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}
.bf-privacy ul {
  margin: 0;
  padding-left: 1.1em;
}
.bf-privacy li {
  margin-bottom: 8px;
}
.bf-privacy li::marker {
  color: var(--glow);
}
.bf-privacy strong {
  color: var(--text);
}

/* Closing call to action. */
.bf-cta {
  padding-block: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--line);
  text-align: center;
  background: radial-gradient(50% 80% at 50% 100%, var(--glow-soft), transparent 70%), var(--ink);
}
.bf-cta img {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 22px;
  box-shadow: 0 20px 50px -20px var(--glow);
}
.bf-cta h2 {
  margin: 0 0 12px;
  font-family: var(--bf-font);
  font-weight: 900;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.bf-cta p {
  max-width: 48ch;
  margin-inline: auto;
  color: var(--muted);
}
.bf-cta .bf-actions {
  justify-content: center;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .bf-hero__grid,
  .bf-aura,
  .bf-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .bf-steps,
  .bf-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bf-grid {
    gap: 12px;
  }
}
@media (max-width: 640px) {
  .bf-plans {
    grid-template-columns: minmax(0, 1fr);
  }
  .bf-cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bf-rows div {
    flex-direction: column;
    gap: 2px;
  }
  .bf-rows dd {
    text-align: left;
  }
}


/* ---------- Motion ----------
   A little flair, kept quiet: one entrance on load, a bounty that counts up, sections that rise into view once,
   soft hovers, and the aura recolouring with a fade rather than a snap. Nothing loops except the status dot. */

/* Registered so the aura colours can fade between values instead of jumping. */
@property --glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff254f;
}
@property --glow-soft {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(255 37 79 / 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .bf main {
    transition:
      --glow 0.6s ease,
      --glow-soft 0.6s ease;
  }

  /* Hero entrance: copy rises in sequence, the poster drops and settles at its tilt. */
  .bf-hero__copy > * {
    animation: bf-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  .bf-hero__copy > :nth-child(2) { animation-delay: 0.06s; }
  .bf-hero__copy > :nth-child(3) { animation-delay: 0.14s; }
  .bf-hero__copy > :nth-child(4) { animation-delay: 0.2s; }
  .bf-hero__copy > :nth-child(5) { animation-delay: 0.26s; }

  .bf-poster__paper {
    animation: bf-pin 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s backwards;
    transition:
      rotate 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
      translate 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .bf-poster:hover .bf-poster__paper {
    rotate: 0.5deg;
    translate: 0 -4px;
  }
  .bf-poster figcaption {
    animation: bf-fade 0.6s ease 0.9s backwards;
  }

  /* The hero glow breathes, slowly. Opacity on its own layer, so it costs nothing to draw. */
  .bf-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(45% 55% at 78% 42%, var(--glow-soft), transparent 70%);
    pointer-events: none;
    animation: bf-breathe 7s ease-in-out infinite alternate;
  }
  .bf-hero > .bf-wrap {
    position: relative;
  }

  /* "In testing now" dot: a soft ping. */
  .bf-dot {
    position: relative;
  }
  .bf-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #51f6b5;
    animation: bf-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
  }

  /* Buttons, cards, portraits: small lifts on hover. */
  .bf-btn {
    transition:
      translate 0.2s ease,
      box-shadow 0.2s ease,
      border-color 0.2s ease;
  }
  .bf-btn:hover {
    translate: 0 -2px;
    box-shadow: 0 14px 34px -10px var(--glow);
  }
  .bf-btn--ghost:hover {
    box-shadow: none;
  }
  .bf-btn:active {
    translate: 0 0;
  }
  .bf-card {
    transition:
      translate 0.25s ease,
      border-color 0.25s ease;
  }
  .bf-card:hover {
    translate: 0 -3px;
    border-color: color-mix(in srgb, var(--glow) 55%, var(--line));
  }
  .bf-cast img {
    transition: translate 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .bf-cast li:hover img {
    translate: 0 -4px;
  }
  .bf-aura__pick button {
    transition: border-color 0.2s ease;
  }
  .bf-aura__pick button:hover {
    border-color: var(--glow);
  }
  .bf-aura__pick button i {
    transition: scale 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
  }
  .bf-aura__pick [aria-checked="true"] i {
    scale: 1.25;
  }

  /* Scroll reveal. Only hides anything once the script has said it will reveal it (html.bf-js). */
  .bf-js .bf-reveal {
    opacity: 0;
    translate: 0 18px;
    transition:
      opacity 0.7s ease,
      translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .bf-js .bf-reveal.is-in {
    opacity: 1;
    translate: 0 0;
  }
  /* Cards keep their quick hover once they have arrived. */
  .bf-js .bf-card.bf-reveal.is-in {
    transition:
      opacity 0.7s ease,
      translate 0.25s ease,
      border-color 0.25s ease;
  }

  /* The loop's rule lines draw left to right as the steps arrive. */
  .bf-js .bf-steps li {
    border-top-color: transparent;
    position: relative;
  }
  .bf-js .bf-steps li::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--glow);
    transform-origin: left;
    scale: 0 1;
    transition: scale 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 70ms + 0.15s);
  }
  .bf-js .bf-steps li.is-in::before {
    scale: 1 1;
  }
}

@keyframes bf-rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}
@keyframes bf-fade {
  from {
    opacity: 0;
  }
}
@keyframes bf-pin {
  from {
    opacity: 0;
    rotate: 7deg;
    translate: 0 -28px;
    scale: 1.04;
  }
}
@keyframes bf-breathe {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}
@keyframes bf-ping {
  0% {
    opacity: 0.7;
    scale: 1;
  }
  80%,
  100% {
    opacity: 0;
    scale: 2.6;
  }
}

/* Keeps the poster steady while the bounty counts up. */
.bf-poster__bounty b {
  display: inline-block;
  min-width: 6ch;
  font-weight: inherit;
  text-align: left;
}
