/* Bear Poppa Studios — site styles
 *
 * Derived from the studio ident: a black frame, line art reading as a
 * pale-blue hologram, a soft bloom behind it, and one specular sheen sweep.
 * Quiet and confident — no strobing, no shake. See the bear-poppa-ident skill.
 */

:root {
  /* The ident's black frame, with two barely-lifted surfaces above it. */
  --frame: #000000;
  --surface: #070a0f;
  --surface-raised: #0b1017;
  --border: #17212f;
  --border-bright: #24344a;

  /* Color(0.65, 0.8, 1.0) from the ident, and its quieter relations. */
  --holo: #a6ccff;
  --holo-dim: #7899bd;
  --text: #dfe8f5;
  --text-muted: #8496ab;

  --max-width: 66rem;
  --radius: 4px;

  /* Ident timings, reused so the page opens on the same cadence. */
  --wipe-in: 1.8s;
  --sweep-at: 2.1s;
  --sweep-len: 1.2s;
  --bloom-len: 2.2s;

  /* The wordmark is heavy and widely tracked; echo it on labels. */
  --track-wide: 0.22em;
  --track-mid: 0.12em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--frame);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--holo);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #cfe3ff;
}

:focus-visible {
  outline: 2px solid var(--holo);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--frame);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}

/* The studio bear mark alongside the wordmark. Painted as a CSS mask rather
 * than an <img> so it inherits currentColor — which means it picks up the
 * hover state, and one file serves every page without inlining the artwork. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand::before {
  content: "";
  flex: none;
  /* The mark is 1000 x 1118, so keep the box on that ratio or mask-size:contain
   * letterboxes it and the wordmark drifts away from the art. */
  width: 26px;
  height: 29px;
  background: currentColor;
  -webkit-mask: url("assets/brand/bear-mark.svg?v=7") center / contain no-repeat;
  mask: url("assets/brand/bear-mark.svg?v=7") center / contain no-repeat;
}

.brand:hover {
  color: var(--holo);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--holo);
}

/* ---------- Hero: the ident, replayed ---------- */

.hero {
  padding: 4.5rem 0 5rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

@media (max-width: 54rem) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* The ident stack: bloom behind, artwork, sheen masked to the artwork, and a
 * black cover that wipes upward to reveal it all. */
.ident {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 22rem;
}

.ident__art {
  display: block;
  width: 100%;
  height: auto;
}

/* Faint blue bloom: the same texture, 3.5% oversized, behind the art. */
.ident__glow {
  position: absolute;
  top: -1.75%;
  left: -1.75%;
  width: 103.5%;
  height: 103.5%;
  filter: blur(20px);
  opacity: 0.3;
  animation: ident-bloom var(--bloom-len) ease-out 0.3s 1 backwards;
  pointer-events: none;
}

@keyframes ident-bloom {
  from {
    opacity: 0;
  }
}

/* One specular pass. Masked by the artwork's alpha so only drawn pixels
 * brighten — the black frame stays black. */
.ident__sheen {
  position: absolute;
  inset: 0;
  -webkit-mask-image: url("assets/brand/splash_studio.png");
  mask-image: url("assets/brand/splash_studio.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background-image: linear-gradient(
    105deg,
    transparent 42%,
    rgba(230, 242, 255, 0.85) 50%,
    transparent 58%
  );
  background-repeat: no-repeat;
  background-size: 260% 100%;
  /* Resting position is off-canvas, so with no animation nothing shows. */
  background-position: -120% 0;
  mix-blend-mode: screen;
  animation: ident-sheen var(--sweep-len) ease-in-out var(--sweep-at) 1 backwards;
  pointer-events: none;
}

@keyframes ident-sheen {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -120% 0;
  }
}

/* Soft-edged wipe, rising bottom to top on a slight diagonal.
 *
 * The diagonal comes from the gradient angle rather than a skew transform, so
 * the element stays within its own bounds (inset: 0) and never relies on an
 * ancestor's overflow to clip it. The gradient image is 260% tall with the
 * opaque band at its top: sliding it from 0% to 100% brings the transparent
 * region in from the bottom, so the artwork appears bottom-first and the edge
 * travels upward.
 *
 * Rests fully revealed — if animations don't run, the hero is simply visible.
 */
.ident__cover {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    190deg,
    var(--frame) 0 52%,
    rgba(0, 0, 0, 0) 72% 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 260%;
  background-position: 0 100%;
  animation: ident-wipe var(--wipe-in) cubic-bezier(0.35, 0, 0.15, 1) 1 backwards;
  pointer-events: none;
}

@keyframes ident-wipe {
  from {
    background-position: 0 0;
  }
}

.hero h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(2rem, 5.5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero .tagline {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: clamp(1.02rem, 2.2vw, 1.15rem);
  color: var(--text-muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--holo);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--holo);
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

.btn-primary {
  background: var(--holo);
  color: var(--frame);
}

.btn-primary:hover {
  background: #cfe3ff;
  color: var(--frame);
}

.btn-secondary {
  border-color: var(--border-bright);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--holo);
  color: var(--holo);
}

/* ---------- Sections ---------- */

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  margin: 0 0 1.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

p {
  max-width: 46rem;
}

.lede {
  font-size: 1.06rem;
}

.muted {
  color: var(--text-muted);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.card {
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  transition: border-color 0.18s ease;
}

.card:hover {
  border-color: var(--border-bright);
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.card .status {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--holo-dim);
}

/* ---------- Definition list ---------- */

.info-list {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.65rem 2rem;
  font-size: 0.98rem;
}

.info-list dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.28rem;
}

.info-list dd {
  margin: 0;
}

@media (max-width: 32rem) {
  .info-list {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .info-list dd {
    margin-bottom: 1rem;
  }
}

/* ---------- Prose pages ---------- */

.prose {
  padding: 3.5rem 0 5rem;
}

.prose h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  letter-spacing: -0.02em;
}

.prose h2 {
  margin-top: 2.75rem;
}

.prose ul {
  max-width: 46rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose li::marker {
  color: var(--holo-dim);
}

.updated {
  margin-bottom: 2.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 3rem 0 3.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer .legal-name {
  color: var(--text);
  font-weight: 600;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--holo);
}

/* ---------- Press kit ----------
 * The marks are single-colour and filled with currentColor, so they are
 * painted as masks here for the same reason as .brand::before: an <img> has
 * no colour to inherit and would render the artwork black on a black page. */

.assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.asset {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.asset__art {
  display: grid;
  place-items: center;
  min-height: 9rem;
  padding: 1.25rem;
  background: var(--frame);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.asset__art img {
  max-height: 7rem;
  width: auto;
}

.mark {
  background: currentColor;
  color: var(--text);
}

.mark--bear {
  width: 5.6rem;
  height: 6.3rem;
  -webkit-mask: url("assets/brand/bear-mark.svg?v=7") center / contain no-repeat;
  mask: url("assets/brand/bear-mark.svg?v=7") center / contain no-repeat;
}

.mark--paw {
  width: 6rem;
  height: 6rem;
  -webkit-mask: url("assets/brand/paw-mark.svg") center / contain no-repeat;
  mask: url("assets/brand/paw-mark.svg") center / contain no-repeat;
}

.asset h3 {
  margin: 0;
}

.asset__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.asset__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
}

/* Boilerplate a journalist is meant to copy, so it reads as a quoted block. */
.prose blockquote {
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.4rem;
  max-width: 46rem;
  border-left: 2px solid var(--holo-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface-raised);
}

.prose blockquote p {
  margin: 0;
}

/* Two columns of short rules — what to do, and what not to. */
.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.rules ul {
  margin: 0.6rem 0 0;
  padding-left: 1.15rem;
}

.rules li {
  margin: 0.35rem 0;
}

.rules li::marker {
  color: var(--holo-dim);
}

.rules h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--holo);
}

/* ---------- Reduced motion ----------
 * The ident is decorative. Honour the preference by showing its end state. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ident__cover,
  .ident__sheen {
    display: none;
  }

  .ident__glow {
    animation: none;
    opacity: 0.3;
  }

  .btn {
    transition: none;
  }
}
