/* ============================================================
   R&P Co — page layout. Colour tokens are the original BYQ dark
   palette (byq-brand.css), so both gems keep their stock colours.
   ============================================================ */

:root {
  --byq-bg: #070708;
  --byq-fg: #f6f3ec;
  --byq-card: #18191a;
  --byq-depth: #2a2b2c;

  --byq-accent-solar: #ffcd33;
  --byq-accent-lime: #c5ef57;
  --byq-on-accent: #040404;

  --byq-radius: 0.5rem;
  --byq-radius-lg: 1rem;

  --byq-font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --byq-font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --byq-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --muted: color-mix(in srgb, var(--byq-fg) 52%, transparent);
  --rule: color-mix(in srgb, var(--byq-fg) 12%, transparent);
  --gutter: clamp(16px, 4vw, 56px);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--byq-bg);
  color: var(--byq-fg);
  font-family: var(--byq-font-sans);
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

/* ---------- headline (floats above the cards, inside the gem stage) ---------- */
.hero__title {
  margin: 0;
  font-family: var(--byq-font-display);
  font-weight: 700;
  font-size: clamp(0.85rem, 3.58vw, 3.2rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-align: center;
  color: var(--byq-fg);
}

.hero__amp {
  font-size: 0.75em;
  font-weight: 500;
}

.hero__rp {
  letter-spacing: 0.02em;
}

.hero__co {
  opacity: 0.5;
}

.hero__line {
  display: block;
  white-space: nowrap;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4svh, 26px);
  padding: 0 var(--gutter);
}

.hero__desc {
  margin: 0;
  max-width: 36rem;
  font-family: var(--byq-font-sans);
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
  color: color-mix(in srgb, var(--byq-fg) 64%, transparent);
}

/* ---------- legal footer (pinned to the bottom of the stage) ---------- */
.legal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 14px;
  padding: 14px var(--gutter) max(16px, env(safe-area-inset-bottom));
  font-family: var(--byq-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--byq-fg) 40%, transparent);
  pointer-events: none;
}

.legal__name {
  color: color-mix(in srgb, var(--byq-fg) 62%, transparent);
}

.legal__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--byq-fg) 28%, transparent);
}

/* Keep the legal line clear of the cards on short viewports */
.byq-gem--circle-expand-card-01__stage {
  padding-bottom: calc(var(--cec-pad) + 40px);
}

@media (max-width: 480px) {
  .legal {
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
  }
  .legal__sep {
    display: none;
  }
}

/* ---------- work section ---------- */
/* Headline + card row share one full-screen stage, so the detail view
   floods the whole thing. */
.byq-gem--circle-expand-card-01__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6svh, 72px);
}

/* ---------- "View website" button ----------
   White pill with black label; on light detail views it inverts.
   Simple hover: slight tint + arrow nudge. */
.cta {
  --cta-bg: #ffffff;
  --cta-fg: #040404;
  --cta-hover: #e9e9e9;
  align-self: flex-start;
  border-radius: 999px;
  color: var(--cta-fg);
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

[data-tone="white"] .cta,
[data-tone="fg"] .cta {
  --cta-bg: #040404;
  --cta-fg: #ffffff;
  --cta-hover: #2a2a2a;
}

.cta__label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  height: 60px;
  padding: 0 2rem;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-family: var(--byq-font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta__arrow {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 0.3s ease;
}

.cta:hover .cta__label,
.cta:focus-visible .cta__label {
  background: var(--cta-hover);
}

.cta:hover .cta__arrow,
.cta:focus-visible .cta__arrow {
  transform: translateX(3px);
}

.cta:active .cta__label {
  transform: scale(0.97);
}

.cta:focus-visible .cta__label {
  outline: 2px solid var(--cta-bg);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .cta__label,
  .cta__arrow {
    transition-duration: 0.001ms;
  }
}

/* Year rule spans the same width as the paragraph above */
.byq-gem--circle-expand-card-01__lede,
.byq-gem--circle-expand-card-01__facts {
  max-width: 30rem;
}
.byq-gem--circle-expand-card-01__facts {
  grid-template-columns: minmax(0, 1fr);
}

/* Per-project flood colours */
.byq-gem--circle-expand-card-01 [data-tone="piri"] {
  --cec-flood: #16382f;
  --cec-ink: #f6f3ec;
}
.byq-gem--circle-expand-card-01 [data-tone="black"] {
  --cec-flood: #000000;
  --cec-ink: #f6f3ec;
}
.byq-gem--circle-expand-card-01 [data-tone="white"] {
  --cec-flood: #ffffff;
  --cec-ink: #040404;
}

/* Hover "View" disc is always white; only the expanded view uses the card colour */
.byq-gem--circle-expand-card-01__bloom-disc {
  background: #ffffff;
  color: #040404;
}
.byq-gem--circle-expand-card-01__bloom-disc::after {
  border-color: color-mix(in srgb, #ffffff 55%, transparent);
}

/* Long names on narrow two-column cards */
@media (max-width: 480px) {
  .byq-gem--circle-expand-card-01__title {
    font-size: 18px;
  }
  .byq-gem--circle-expand-card-01__tag {
    font-size: 11px;
  }
}

