/*
 * Yeja Studios — Marketing Surface Stylesheet
 * Consumes apps/shared/design-tokens.css directly (no local hex palette,
 * no local font stack) so the homepage and every page that links this file
 * (/, /pricing/, /about_us/, /contact_us/, /trust_and_safety/, /privacy_policy/,
 * /artists/, /collect/, /commission-work/, /galleries/) are visually the
 * same product as the authenticated shell, per the Master Design Guide's
 * binding rule that pre-auth surfaces must be "visually indistinguishable"
 * from the platform's 2026.4 language even though they don't mount the
 * app shell itself.
 *
 * Rebuilt 2026-07-18 replacing the prior bespoke system (Plus Jakarta Sans,
 * hardcoded #1e1e1e/#f7f7f4/etc, --hero background mosaic of flat color
 * divs) per memory/homepage-redesign-plan — see that plan for the full
 * rationale and phase sequencing.
 */

@import url("/apps/shared/design-tokens.css");

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

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--yeja-canvas);
  color: var(--yeja-text-primary);
  font-family: var(--font-family-base);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.15s ease-in-out, color 0.15s ease-in-out;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.mono {
  font-family: var(--font-family-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Motion tokens + reduced-motion fallback ───────────────────────── */
:root {
  --motion-default: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --motion-entrance: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--motion-entrance), transform var(--motion-entrance);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ── Focus ring (Cobalt, WCAG) ──────────────────────────────────────── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--yeja-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Type scale ─────────────────────────────────────────────────────── */
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 700; }

h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.005em; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 600; }

p { margin: 0; }

.eyebrow {
  font-family: var(--font-family-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--yeja-text-muted);
  text-transform: none; /* Title Case is applied in copy, never CSS uppercase per the guide */
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--yeja-text-muted);
  max-width: 62ch;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-family-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--yeja-text-muted);
  background: var(--yeja-hover-tertiary);
  border: 1px solid var(--yeja-border);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}
.demo-badge::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--yeja-amber);
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family-base);
  font-size: 15.5px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  cursor: pointer;
  border: none;
  transition: opacity var(--motion-default), background var(--motion-default), border-color var(--motion-default);
  white-space: nowrap;
}
.btn-compact { padding: 8px 16px; font-size: 14px; }

.btn-primary {
  background: var(--yeja-text-primary);
  color: var(--yeja-canvas);
}
.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  background: transparent;
  color: var(--yeja-text-primary);
  border: 1px solid var(--yeja-border-strong);
}
html[data-theme="dark"] .btn-ghost { border-color: var(--yeja-text-muted); }
.btn-ghost:hover { background: var(--yeja-hover-tertiary); }

/* ── Layout shells ──────────────────────────────────────────────────── */
.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  max-width: 640px;
}

section { padding: var(--space-8) 0; }

/* ── S0 — Marketing Top Bar ─────────────────────────────────────────── */
.mkt-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 16px 24px;
  background: color-mix(in srgb, var(--yeja-canvas) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--yeja-border);
}

.mkt-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15.5px;
}

/* The real Yeja brand mark — ported verbatim from apps/platform/styles.css's
 * .brand-mark (the canonical implementation, not a marketing reinterpretation):
 * a Crimson-bordered circle with three color blobs faked via offset
 * box-shadows (Cobalt, Amber, Mint), not a conic-gradient disc. */
/* The mark renders at its 56px reference size on the marketing surfaces —
 * the front page is the brand's shop window, and 20px reduced the bird to a
 * speck beside the wordmark. 1.75px is the matching stroke from the ramp. */
.brand-ring {
  width: 56px; height: 56px;
  flex: 0 0 56px;
  display: block;
}
.brand-ring > .yeja-brand-logo { width: 56px; height: 56px; --yeja-logo-stroke: 1.75px; }

.mkt-topbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--yeja-text-muted);
}
.mkt-topbar-nav a { transition: color var(--motion-default); }
.mkt-topbar-nav a:hover { color: var(--yeja-text-primary); }

.mkt-topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Below 860px the nav drops onto its own full-width row beneath the brand and
 * actions rather than being hidden. It used to be `display: none` with no
 * hamburger and no replacement, which made For Artists / Collect / Commissions
 * / Galleries — every primary destination — unreachable on a phone. A wrapped
 * row is used in preference to a drawer because it needs no JS, no focus trap
 * and no aria-expanded state to get wrong. */
@media (max-width: 860px) {
  .mkt-topbar { flex-wrap: wrap; row-gap: 0; }
  .mkt-topbar-brand { flex: 1 1 auto; }
  .mkt-topbar-actions { flex: 0 0 auto; }
  /* space-between + an 8px floor, not a centred 24px gap: the four labels
   * measure 292px against 342px of available width at 390px, so a 24px gap
   * needs 364px and wraps "Galleries" onto a second line. 8px leaves 26px of
   * slack; flex-wrap stays on as a graceful fallback if a label is ever added. */
  .mkt-topbar-nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 var(--space-1);
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--yeja-border);
  }
  /* 44px minimum tap target (guide §6) without changing the visual type size. */
  .mkt-topbar-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
  }
}

/* ── S1 — Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-6);
  overflow: hidden;
}

.hero-masonry-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* The tile grid inside this element is deliberately wider than the viewport
   * and starts at a negative offset, so it MUST clip here. The clip used to
   * live on `.hero { overflow: hidden }` below — but page-renderer.js emits
   * `.page-hero`, not `.hero`, so that rule never matched the live homepage
   * and the tiles escaped, giving the document 424px (@961) to 1018px (@390)
   * of horizontal scroll. Clipping on the backdrop itself — rather than on
   * the section — keeps focus rings inside the hero from being clipped too. */
  overflow: hidden;
  /* 0.16 -> 0.40 (2026-08-21). Measured rather than guessed: at 0.16, under
   * the 78% scrim below, a tile landed ~1 luminance step from the canvas out
   * of 255 — genuinely below what an eye resolves, which is why the grid read
   * as absent rather than subtle. Opacity alone could not fix it; the scrim
   * was the dominant suppressor, so both moved together. Now ~5 steps: a
   * present texture, not a wash. */
  opacity: 0.40;
  pointer-events: none;
  /* The fade is a FRACTION of the hero's height, so it moved when the hero
   * grew from ~494px to ~778px for the interactive hero: 55% used to begin
   * fading at 272px, and began at 428px instead — erasing the grid from just
   * below the headline down. 78% puts the fade back below the artwork's lower
   * edge at the current height. Opacity above and the ::after scrim are
   * deliberately untouched; those are what protect copy contrast. */
  mask-image: linear-gradient(to bottom, black 0%, black 78%, transparent 100%);
}
/* Dark needs more than light for the same apparent strength: the tiles are
 * dark-on-dark there, so the same opacity yields less separation. */
html[data-theme="dark"] .hero-masonry-backdrop { opacity: 0.55; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: 0 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-actions .btn { min-width: 168px; }

/* ── S2 — Format Proof Strip ────────────────────────────────────────── */
.proof-strip {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--yeja-border);
  border-bottom: 1px solid var(--yeja-border);
}
.proof-strip-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 0;
  font-family: var(--font-family-mono);
  font-size: 12.5px;
  color: var(--yeja-text-muted);
  text-align: center;
}
.proof-strip-inner span:not(:last-child)::after {
  content: "·";
  margin: 0 14px;
  color: var(--yeja-border-strong);
}

/* ── Generic card grid ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

.tile {
  background: var(--yeja-canvas-paper);
  border: 1px solid var(--yeja-border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  transition: border-color var(--motion-default), transform var(--motion-default);
}
a.tile:hover, button.tile:hover { border-color: var(--yeja-border-strong); }

.tile-num {
  font-family: var(--font-family-mono);
  font-size: 12px;
  color: var(--yeja-text-tertiary);
}

.tile h3 { margin-top: var(--space-1); }

.tile p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--yeja-text-muted);
  line-height: 1.5;
}

/* ── S3 — Format Switcher (T3) ──────────────────────────────────────────
 * Artwork left, words right. The card leads and the copy captions it.
 *
 * This was a 50/50 grid with `align-items: center`. Because .switcher-frame
 * carries aspect-ratio 4/5, a 550px column made the card 740px tall, while the
 * copy column held ~118px of content — which `center` then floated in the
 * middle, leaving 622px of dead space (measured live at 1920px). Both fixes
 * are here: the media column is capped so it stops driving the row height, and
 * both columns start at the top. */
.switcher {
  display: grid;
  /* Media is capped rather than an equal half — the copy column carries the
   * heading, lede, five options and a caption, and needs the wider share. */
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

/* One column below the fold-out width. The copy comes FIRST here: on a phone
 * the heading has to lead, or the section opens on an unexplained gradient.
 * DOM order is media-first, so this is the one place order is overridden. */
@media (max-width: 780px) {
  .switcher { grid-template-columns: 1fr; gap: var(--space-4); }
  .switcher-media { order: 2; }
  .switcher-copy { order: 1; }
}

.switcher-media { min-width: 0; }

/* The copy column centres its own children now that the option box is
 * content-width. Left-aligning a 172px box under a 602px heading read as a
 * misalignment rather than a deliberate shape — the box looked stranded
 * against the left edge with a void beside it (caught in a screenshot; every
 * width measured correctly). The text blocks keep their own left alignment
 * via .switcher-copy > h2/.lede below; only the box and caption centre. */
.switcher-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  text-align: center;
}
/* Prose stays left-aligned and full-width: a centred multi-line paragraph is
 * harder to read, and the guide caps measure rather than centring body copy. */
.switcher-copy h2,
.switcher-copy .lede {
  align-self: stretch;
  text-align: start;
}
/* The heading sits inside the column now, so it takes the section-header's
 * spacing role. Its size still comes from the shared .section-header h2 scale
 * below — this only removes the default margins. */
/* balance keeps the two-line heading from breaking mid-clause — it read
 * "List a Piece Once. Sell / It Any Way You Want." before. */
.switcher-copy h2 { margin: 0; text-wrap: balance; }
.switcher-copy .lede { margin: 0; }

/* The option list, stacked. It was a horizontal pill row inside a 24px-radius
 * capsule; at 550px the five labels wrapped to two rows and the capsule shape
 * stopped making sense. Vertical, full-width rows read as a list of formats,
 * which is what they are. */
.switcher-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  /* Fits its widest label ("Gallery Placement") instead of spanning the copy
   * column, and centres in it. The rows inside keep text-align:start so the
   * list still reads as a column of options rather than centred captions. */
  width: fit-content;
  max-width: 100%;
  margin-top: var(--space-1);
  margin-inline: auto;
  padding: var(--space-1);
  background: var(--yeja-hover-tertiary);
  /* Card radius, not pill: a stacked list is a panel, not a capsule. */
  border-radius: var(--radius-card);
  border: 1px solid var(--yeja-border);
}

.switcher-controls button {
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  /* The pointer-target floor. Padding alone gave 41px, because the button's
   * line-height is its only intrinsic height and 14px text does not reach it. */
  min-height: 44px;
  display: flex;
  align-items: center;
  text-align: start;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--yeja-text-muted);
  cursor: pointer;
  transition: background var(--motion-default), color var(--motion-default);
}
.switcher-controls button:hover:not(.is-active) {
  background: var(--yeja-canvas-paper);
  color: var(--yeja-text-primary);
}
.switcher-controls button:focus-visible {
  outline: 2px solid var(--yeja-focus);
  outline-offset: 2px;
}
/* The ink inversion: selected is ink fill with paper text, in every theme. */
.switcher-controls button.is-active {
  background: var(--yeja-text-primary);
  color: var(--yeja-canvas);
}

.switcher-caption {
  margin: 0;
  font-size: 0.875rem;
  color: var(--yeja-text-muted);
}

.switcher-card {
  background: var(--yeja-canvas-paper);
  border: 1px solid var(--yeja-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.switcher-frame {
  position: relative;
  /* 4/5 kept: it is the card's shape, and with the column now capped it no
   * longer dictates the whole section's height. */
  aspect-ratio: 4 / 5;
  background: var(--yeja-hover-tertiary);
  border-radius: var(--radius-media);
  margin: var(--space-2);
  overflow: hidden;
}

/* The per-state image layer. Sits over the placeholder gradient and under the
 * overlay pill, hidden when a state has no image so the gradient shows through
 * rather than the previously-selected state's picture. */
.switcher-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.switcher-frame-img[hidden] { display: none; }

.switcher-overlay-pill {
  position: absolute;
  bottom: 8px;
  /* Logical, not `left`: the price chip has to follow the reading direction
   * or it detaches from the layout it belongs to under dir="rtl". */
  inset-inline-start: 8px;
  /* Scrim over imagery is a color-mix over a ramp token, never rgba() or a
   * raw hex — guide §1. Was `#000 65%` / `#fff`. */
  background: color-mix(in oklch, var(--yeja-gray-1000) 65%, transparent);
  color: var(--yeja-gray-0);
  font-family: var(--font-family-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.switcher-overlay-pill.is-mint {
  background: color-mix(in oklch, var(--yeja-mint) 80%, var(--yeja-gray-1000));
}

.switcher-meta {
  padding: 0 var(--space-2) var(--space-2);
}
.switcher-meta .title { font-weight: 600; font-size: 15px; }
/* Attribution, between the title and the status line (2026-08-22). Sits
 * closer to the title than the sub does, so it reads as part of the naming
 * rather than as a second status. Hidden via [hidden] when the bound entity
 * names no artist — a campaign or a gallery placement — so the card does not
 * carry an empty row. */
.switcher-meta .artist { font-size: 13px; color: var(--yeja-text-muted); margin-top: 1px; }
.switcher-meta .artist[hidden] { display: none; }
.switcher-meta .sub { font-size: 13px; color: var(--yeja-text-muted); margin-top: 2px; }
.switcher-meta .sub[hidden] { display: none; }
/* Per-kind detail line (2026-08-22): an auction's countdown or end date, a
 * fundraiser's cause, a commission's or gallery's location. Mono for the
 * auction case — a countdown whose digits change every minute must not
 * reflow the line as glyph widths change. Hidden via [hidden] for states
 * that configure no detail. */
.switcher-meta .detail {
  font-size: 12px;
  color: var(--yeja-text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.switcher-meta .detail[hidden] { display: none; }

/* ── S5 — Commissions stepper (T4) ──────────────────────────────────── */

/* ── S6 — My Studio seeded demo (T5) ───────────────────────────────── */

/* ── S7 — Repeat-collector module (T6) ─────────────────────────────── */

/* ── S8 — Persona router ────────────────────────────────────────────── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.persona-card {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-2);
  border-radius: var(--radius-card);
  border: 1px solid var(--yeja-border);
  background: var(--yeja-canvas-paper);
  transition: border-color var(--motion-default);
}
.persona-card:hover { border-color: var(--yeja-border-strong); }
.persona-card .k { font-family: var(--font-family-mono); font-size: 11px; color: var(--yeja-text-muted); }
.persona-card h3 { margin-top: 2px; }

/* Optional background image, set per card as --persona-card-image by the
 * renderer. Everything here is scoped to .has-image, so a card with no image
 * keeps the paper-and-border treatment above completely untouched — that is
 * the state these ship in until real images exist.
 *
 * The scrim is a color-mix over a ramp token, never rgba() and never element
 * opacity: opacity would dim the kicker and heading along with the picture,
 * which is the whole thing the text needs protecting from. Guide §1. */
.persona-card.has-image {
  position: relative;
  overflow: hidden;
  background-image: var(--persona-card-image);
  background-size: cover;
  background-position: center;
  border-color: transparent;
}
.persona-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Bottom-weighted: the copy sits at the bottom of the card, so the top of
   * the image stays legible while the text end is protected hardest. */
  background: linear-gradient(
    to bottom,
    color-mix(in oklch, var(--yeja-gray-1000) 15%, transparent),
    color-mix(in oklch, var(--yeja-gray-1000) 78%, transparent)
  );
  pointer-events: none;
}
/* Above the scrim, and pinned to the ramp rather than the theme's text token:
 * the card is dark in BOTH themes once an image is under it, so a themed ink
 * colour would go black-on-dark in light mode. */
.persona-card.has-image .k,
.persona-card.has-image h3 {
  position: relative;
  z-index: 1;
  color: var(--yeja-gray-0);
}

/* ── S9 — Trust strip ───────────────────────────────────────────────── */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  text-align: center;
}
.trust-item { max-width: 260px; }
.trust-item .k {
  font-family: var(--font-family-mono);
  font-size: 11px;
  color: var(--yeja-text-muted);
}
.trust-item p { font-size: 13.5px; margin-top: 4px; color: var(--yeja-text-muted); }

/* ── S10 — Final CTA ────────────────────────────────────────────────── */
.final-cta {
  text-align: center;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--yeja-border);
}
.final-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
/* Expectation-setting microcopy (homepage rewrite, tracker 9728e268):
 * one quiet line under the CTA pairs saying the buttons lead to a
 * waitlist, and a supporting line between the closing title and its
 * buttons. Rendered only when the CMS field is non-empty. */
.final-cta-lede {
  margin-top: var(--space-2);
  color: var(--yeja-text-muted);
  max-width: 52ch;
  margin-inline: auto;
}
.page-hero-note,
.final-cta-note {
  margin-top: var(--space-2);
  font-size: 0.875rem;
  color: var(--yeja-text-muted);
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--yeja-border);
  padding: var(--space-4) 0 var(--space-3);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-brand { max-width: 260px; }
.footer-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: var(--yeja-text-muted); margin-top: 6px; }

.footer-nav { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; min-width: 130px; }
.footer-col strong { font-size: 12px; color: var(--yeja-text-tertiary); font-weight: 600; margin-bottom: 4px; }
.footer-col a { font-size: 13.5px; color: var(--yeja-text-muted); transition: color var(--motion-default); }
.footer-col a:hover { color: var(--yeja-text-primary); }

.footer-bottom {
  max-width: 1180px;
  margin: var(--space-3) auto 0;
  padding: var(--space-2) 24px 0;
  border-top: 1px solid var(--yeja-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--yeja-text-tertiary);
}

/* Footer language selector. `.footer-bottom` is already a space-between
 * flex row holding only the copyright, so the picker becomes its second
 * item and lands hard against the inline-end edge with no extra wrapper.
 * Logical properties throughout — `fa` ships RTL, and this sits in the
 * footer of every marketing page. */
.footer-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* `display` on a class beats the [hidden] attribute's UA `display:none`, so
 * without this the picker renders EMPTY and inert whenever the script does
 * not run (JS off, a load failure, the CDN i18next libs blocked). Verified:
 * before this rule, [hidden] left it at display:flex and fully visible. */
.footer-lang[hidden] { display: none; }
.footer-lang-label { color: var(--yeja-text-tertiary); }
.footer-lang-select {
  font: inherit;
  color: var(--yeja-text-muted);
  background: transparent;
  border: 1px solid var(--yeja-border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  transition: color var(--motion-default), border-color var(--motion-default);
}
.footer-lang-select:hover {
  color: var(--yeja-text-primary);
  border-color: var(--yeja-border-strong);
}
/* The option list is painted by the OS, not this stylesheet, so it does not
 * inherit `background: transparent` — an unset color there renders white-on-
 * white in dark mode. Both are stated explicitly. */
.footer-lang-select option {
  background: var(--yeja-canvas);
  color: var(--yeja-text-primary);
}

/* ── Page-header pattern (peripheral pages: pricing, about, contact, trust) ──
 * NOTE: page-renderer.js also emits `.page-hero` for the HOMEPAGE hero, where
 * it carries `.hero-masonry-backdrop` (an `position:absolute; inset:0` child).
 * Without a positioned ancestor that backdrop resolves `inset:0` against the
 * initial containing block instead of the hero. `position: relative` is inert
 * for the peripheral pages, which have no positioned children. */
/* .page-hero is the PERIPHERAL-PAGE header pattern (pricing, about,
 * contact, trust): padding plus a border-bottom, nothing else. It stays
 * exactly that for those pages — they legitimately want a quiet header.
 * position:relative is load-bearing (7fb289d): .hero-masonry-backdrop's
 * inset:0 resolves against it. Do not remove. */
.page-hero {
  position: relative;
  padding: var(--space-6) 0 var(--space-4);
  border-bottom: 1px solid var(--yeja-border);
}
.page-eyebrow { font-family: var(--font-family-mono); font-size: 11px; color: var(--yeja-text-muted); }
.page-heading { margin-top: var(--space-1); }
.page-lede { margin-top: var(--space-2); font-size: 1.0625rem; color: var(--yeja-text-muted); max-width: 62ch; }

/* ── Homepage hero (backlog a64affe9) ────────────────────────────────────
 * The homepage was wearing the peripheral-page header above — which is why
 * it stood only ~320px tall with a quiet bottom border, the same treatment
 * as the Privacy Policy page. It gets its own treatment here, scoped to the
 * page that actually has a backdrop behind it, so peripheral pages are
 * untouched.
 *
 * The boldness is MOTION, DEPTH and LAYOUT only — tokens, type scale and
 * accessibility rules are unchanged, per the programme's standing decision.
 * A gallery is a white cube: quiet chrome makes the ART the loud thing. */
.page-hero:has(.hero-masonry-backdrop) {
  padding: clamp(var(--space-8), 11vh, 128px) 0 clamp(var(--space-6), 8vh, 96px);
  border-bottom: none;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 58vh, 640px);
}
/* Depth instead of colour: the backdrop sits behind a legibility scrim so
 * the hero copy holds contrast over arbitrary artwork. color-mix over a
 * token, never rgba() — guide §1. */
/* Editorial asymmetry, not a centred stack: the copy column is capped and
 * offset rather than filling the 1180px container, so the backdrop stays
 * visible beside it instead of being a full-width wash behind text. The
 * screenshot is what caught this — computed styles all "passed" while the
 * hero read as a left-aligned block with a large dead right side. */
.page-hero:has(.hero-masonry-backdrop) .section-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
}
.page-hero:has(.hero-masonry-backdrop) .page-eyebrow,
.page-hero:has(.hero-masonry-backdrop) .page-heading,
.page-hero:has(.hero-masonry-backdrop) .page-lede,
.page-hero:has(.hero-masonry-backdrop) .page-hero-actions,
.page-hero:has(.hero-masonry-backdrop) .page-hero-note {
  max-width: 46rem;
}
.page-hero:has(.hero-masonry-backdrop) .page-hero-actions {
  margin-top: var(--space-4);
}
.page-hero:has(.hero-masonry-backdrop)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* 78/92 -> 55/78. This scrim, not the backdrop's opacity, was what made the
   * grid invisible: it repaints 78% of the canvas back over the tiles at the
   * top of the hero and 92% at the bottom. Lifted enough for the texture to
   * survive while still protecting the copy — the heading and lede sit on
   * .section-inner at z-index 1, ABOVE this layer, so their contrast is set by
   * the canvas token and is unaffected by either number. */
  background: linear-gradient(
    to bottom,
    color-mix(in oklch, var(--yeja-canvas) 55%, transparent),
    color-mix(in oklch, var(--yeja-canvas) 78%, transparent)
  );
  pointer-events: none;
}
/* One orchestrated reveal, not scattered effects — scattered motion is what
 * makes a page read as machine-generated. */
.page-hero:has(.hero-masonry-backdrop) .page-heading,
.page-hero:has(.hero-masonry-backdrop) .page-lede,
.page-hero:has(.hero-masonry-backdrop) .page-hero-actions {
  animation: hero-rise var(--motion-entrance) both;
}
.page-hero:has(.hero-masonry-backdrop) .page-lede { animation-delay: 60ms; }
.page-hero:has(.hero-masonry-backdrop) .page-hero-actions { animation-delay: 120ms; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Reduced motion must keep information VISIBLE, not merely still. */
@media (prefers-reduced-motion: reduce) {
  .page-hero:has(.hero-masonry-backdrop) .page-heading,
  .page-hero:has(.hero-masonry-backdrop) .page-lede,
  .page-hero:has(.hero-masonry-backdrop) .page-hero-actions {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── Type hierarchy (backlog a64affe9) ──────────────────────────────────
 * Measured on the live homepage 2026-08-09: H1 48px and EVERY H2 32px, one
 * single distinct H2 size across the whole page, so nothing signalled
 * relative importance. Section headings now sit a step below the hero and
 * above sub-heads, using the guide's existing scale rather than new values.
 * (The row cited 24.99px; the real measured value was 32px. Corrected.) */
.page-content h2,
.final-cta h2,
.showcase-collection h2 {
  font-size: clamp(1.375rem, 1.9vw, 1.75rem);
}
.section-header h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }

.page-content { padding: var(--space-6) 0; }
.page-content h2 { margin-top: var(--space-4); margin-bottom: var(--space-2); }
/* Measure cap (backlog a64affe9): the longest rendered line measured 78ch
 * at 1440 — comfortable is 45-75. Measured with a Range over the text node,
 * not the element's box: a block element's rect is its CONTAINER's width,
 * so reading the box would have reported 1132px and hidden the problem. */
.page-content p { color: var(--yeja-text-muted); max-width: 68ch; line-height: 1.6; }
.page-lede,
.final-cta-lede,
.lede { max-width: 68ch; }

.page-placeholder-note {
  display: block;
  font-family: var(--font-family-mono);
  font-size: 12px;
  color: var(--yeja-text-muted);
  background: var(--yeja-warning-bg);
  border: 1px solid var(--yeja-border);
  border-radius: var(--radius-control);
  padding: 8px 12px;
  margin-bottom: var(--space-3);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-4);
}
.pricing-card {
  border: 1px solid var(--yeja-border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  background: var(--yeja-canvas-paper);
}
.pricing-tier-name { font-family: var(--font-family-mono); font-size: 12px; color: var(--yeja-text-muted); }
.pricing-price { font-size: 1.75rem; font-weight: 700; margin: 6px 0 var(--space-2); font-variant-numeric: tabular-nums; }
.pricing-price span { font-size: 0.875rem; font-weight: 400; color: var(--yeja-text-muted); }
.pricing-card ul { margin: 0; padding-inline-start: 18px; font-size: 13.5px; color: var(--yeja-text-muted); display: flex; flex-direction: column; gap: 6px; }

/* Lateral internal-link row used at the bottom of peripheral pages (§7.2:
 * "every peripheral page ends with its persona-correct intent CTA plus
 * two lateral links, so no page is a dead end") */
.lateral-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--yeja-border);
}
.lateral-links a { font-size: 13.5px; color: var(--yeja-cobalt); }

/* ── Showcase Collection (backlog ff179449) ──────────────────────────────
 * Design guide §5 masonry anatomy: .masonry__frame owns the image and any
 * overlays and CLIPS them; .masonry__meta sits outside and below the frame
 * so its text is never clipped by the frame's own overflow. That split is
 * the whole reason the markup has two elements per card instead of one. */
.showcase-collection .masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* The card is the link: one large hit target, one focus stop per card. */
.masonry__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
  /* min-width:0 lets a long title shrink inside the grid track instead of
   * forcing the column wider and pushing the page into horizontal scroll —
   * the exact failure mode that shipped 1018px of overflow at 390px. */
  min-width: 0;
}
.masonry__item:focus-visible {
  outline: 2px solid var(--yeja-focus);
  outline-offset: 2px;
  border-radius: var(--radius-card);
}

.masonry__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--yeja-canvas-paper);
  border: 1px solid var(--yeja-border);
  aspect-ratio: 4 / 5;
}
.masonry__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 240ms ease;
}
.masonry__item:hover .masonry__image { transform: scale(1.03); }
.masonry__image--empty { background: var(--yeja-canvas-paper); }

/* Overlay pill, bottom-start INSIDE the frame. Logical inset property so
 * it mirrors correctly under dir="rtl" rather than being pinned left. */
.masonry__badge {
  position: absolute;
  inset-block-end: var(--space-2);
  inset-inline-start: var(--space-2);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-family: var(--font-family-mono);
  /* Guide §1: a literal that must not theme is still not a raw hex. */
  background: color-mix(in oklch, var(--yeja-gray-1000) 65%, transparent);
  color: var(--yeja-canvas);
  backdrop-filter: blur(4px);
}

.masonry__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.masonry__title {
  font-weight: 500;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.masonry__subtitle {
  font-size: 13px;
  color: var(--yeja-text-muted);
  overflow-wrap: anywhere;
}

.showcase-collection__cta { margin-top: var(--space-4); }

/* Rail / carousel: one scrolling row. overflow-x on the track itself, never
 * the page — a wide track must scroll inside its own container. */
.showcase-collection--rail .masonry,
.showcase-collection--carousel .masonry {
  grid-auto-flow: column;
  grid-template-columns: none;
  grid-auto-columns: minmax(240px, 280px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-2);
}
.showcase-collection--rail .masonry__item,
.showcase-collection--carousel .masonry__item { scroll-snap-align: start; }

/* Editorial: first card leads at double width on wide viewports. */
@media (min-width: 861px) {
  .showcase-collection--editorial .masonry__item:first-child { grid-column: span 2; }
  .showcase-collection--editorial .masonry__item:first-child .masonry__frame { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep information visible, not merely still: the hover zoom is pure
   * decoration, so removing it loses nothing. */
  .masonry__image { transition: none; }
  .masonry__item:hover .masonry__image { transform: none; }
  .showcase-collection--rail .masonry,
  .showcase-collection--carousel .masonry { scroll-snap-type: none; }
}

/* ── RTL (2026-08-09, Farsi is the platform's first RTL locale) ──────────
 * Found by looking at an actual RTL screenshot, not by a computed-style
 * read: with <html dir="rtl">, an English sentence renders its trailing
 * period at the LEFT edge — ".One Studio. Every Way to Sell" — because the
 * period is a bidi-neutral character and the Unicode bidi algorithm places
 * neutrals according to the PARAGRAPH direction. Correct for Farsi text,
 * visibly broken for the English copy that shows wherever a translation
 * has not landed yet (which, per the per-field fallback rule, is a normal
 * and expected state of a live CMS).
 *
 * unicode-bidi: plaintext resolves each element's direction from its own
 * first strong character instead of inheriting the page's. Farsi content
 * stays RTL; untranslated English content lays out LTR with its punctuation
 * in the right place. This is why the rule targets TEXT-BEARING elements
 * rather than <html> — the page chrome (nav order, logo side, button
 * order) must genuinely mirror, and it does. */
[dir="rtl"] .page-heading,
[dir="rtl"] .page-lede,
[dir="rtl"] .page-eyebrow,
[dir="rtl"] .page-hero-note,
[dir="rtl"] .section-inner h2,
[dir="rtl"] .section-inner p,
[dir="rtl"] .final-cta-lede,
[dir="rtl"] .final-cta-note,
[dir="rtl"] .footer-col a,
[dir="rtl"] .tile,
/* .proof-strip, NOT .label-strip: the block TYPE is label_strip but the
 * renderer emits class="proof-strip" (page-renderer.js:185). Caught by
 * lint-class-contract — the same name-mismatch class of bug that shipped
 * the .hero / .page-hero overflow failure. */
[dir="rtl"] .proof-strip,
/* The format switcher's card text is in <div>s, not <p>s, so it fell through
 * the .section-inner p rule above and kept its punctuation on the wrong side
 * under dir="rtl". Same reason as the showcase titles below: this is a work's
 * title sitting in whatever direction the page happens to be. */
[dir="rtl"] .switcher-meta .title,
[dir="rtl"] .switcher-meta .sub,
[dir="rtl"] .switcher-caption,
/* Showcase card text is REAL USER CONTENT — an artwork title or artist
 * name in any script, sitting inside whatever page direction the visitor
 * has. plaintext is what keeps a Latin title readable on a Farsi page and
 * an Arabic-script title readable on an English one. */
[dir="rtl"] .masonry__title,
[dir="rtl"] .masonry__subtitle,
[dir="rtl"] .showcase-collection h2 {
  unicode-bidi: plaintext;
}

/* Logical properties so mirrored spacing follows the writing direction
 * rather than being pinned to physical left/right. */
[dir="rtl"] .pricing-card ul { padding-inline-start: 18px; }

