/* The landing page (/, src/app/Landing.tsx): the site's five tools under its name, on the page itself, each a picture,
   its name, a line on what it does and a way in (and its trailer, where it has one); Big Rat's Adventure the sixth
   card, the game's own pill and buttons on it. Three across on wide screens, two from tablets and phones on their side
   (600 px), stacked only on phones held upright (Joe, 2026-11-15: one card a row up to 900 px made an iPad's page a
   dozen screens long; 2026-11-19: no frame round the tools, Big Rat's a card the tools' size, the trailers beside). */
/* a page that scrolls (the tools' pages never do) */
.home {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg0);
}
/* (the scrollbar's gutter held from the first frame: the page nearly always scrolls, and the text would
   wrap again when it turned out to) */
.home {
  scrollbar-gutter: stable;
}
/* (where the site draws its own scrollbar, phones and tablets (src/scrollbar.ts): no gutter for it, the bar's 7 px
   added to the cards' and the foot's right padding instead, so they are as far from the bar on their right as from the
   screen's edge on their left: Joe, 2026-11-19) */
.home.vbar-host,
.home.vbar-host.vbar-on {
  padding-right: 0 !important;
}
.home.vbar-on .home-main,
.home.vbar-on .site-foot {
  padding-right: calc(1.25rem + 7px);
}
@media (max-width: 900px) {
  .home.vbar-on .home-main,
  .home.vbar-on .site-foot {
    padding-right: calc(0.875rem + 7px);
  }
}
.home-main {
  flex: 1;
  width: min(73.75rem, 100%);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
/* the cards under the site's name, on the page itself: no frame round them, its room given to the cards (Joe,
   2026-11-19: a phone's card 30 px wider) */
.home-family {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
/* its head: the line on what the site is in small capitals (the page's heading), the lockup large between two rules
   that fade out (the mark's gold on the left, the A's blue on the right), a faint glow of the mark's blue behind them
   (no gold), faded out before the head's edges */
.home-family-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.875rem;
  padding: 0.75rem 0.5rem 0.5rem;
  background: radial-gradient(closest-side, rgba(120, 183, 255, 0.08), transparent);
}
/* (one line where it fits; where it does not, the game's name and icon whole on a line of their own under "The finest
   apps for", with room between the two: Joe, 2026-11-19) */
.home-family-head h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem 0.4em;
  margin: 0;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg1);
}
.home-ruled {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  align-self: stretch;
}
.home-ruled i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 183, 66, 0.45));
}
.home-ruled i:last-child {
  background: linear-gradient(90deg, rgba(120, 183, 255, 0.45), transparent);
}
@media (max-width: 480px) {
  .home-ruled {
    gap: 0.625rem;
  }
}
.home-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  flex: none;
  line-height: 1;
  white-space: nowrap;
}
.home-lockup-mark {
  width: clamp(2.5rem, 13vw, 4.5rem);
  height: clamp(2.5rem, 13vw, 4.5rem);
  filter: drop-shadow(0 2px 8px rgba(240, 183, 66, 0.25));
}
.home-lockup-words {
  display: inline-flex;
  align-items: baseline;
  gap: 0.625rem;
}
.home-lockup .brand-name {
  font-size: clamp(1.25rem, 7vw, 3rem);
  color: var(--fg0);
  letter-spacing: 0.02em;
}
/* (ATLAS as tall as Brighter's capital B, heavier, lit top to bottom in the mark's A's blues) */
.home-lockup .brand-sub {
  font-size: clamp(1.1rem, 6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #8fd0ff, #3b8cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* (on a phone, upright or on its side, the lockup small, without its rules: the cards come up sooner; the line on
   what the site is over it, as everywhere: Joe, 2026-11-19) */
@media (max-width: 640px), (max-height: 500px) and (orientation: landscape) {
  .home-family-head {
    gap: 0.875rem;
  }
  .home-ruled {
    justify-content: center;
    gap: 0;
  }
  .home-ruled i {
    display: none;
  }
  .home-lockup {
    gap: 0.5rem;
  }
  .home-lockup-mark {
    width: 2.25rem;
    height: 2.25rem;
  }
  .home-lockup-words {
    gap: 0.375rem;
  }
  .home-lockup .brand-name {
    font-size: 1.625rem;
  }
  .home-lockup .brand-sub {
    font-size: 1.375rem;
  }
}
/* the game's name, in the brand's face (css/app.css) */
/* (a link to the game's own site, in a new tab: underlined, the arrow out of a box after it, brighter when pointed at) */
/* (kept whole: where the line must break, before the game's name) */
.home-game {
  white-space: nowrap;
  font-family: 'BA Brighter', var(--sans);
  text-decoration: underline;
  text-decoration-color: rgba(120, 183, 255, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}
.home-game .ext-icon {
  margin-left: 0.3em;
  vertical-align: -0.05em;
}
.home-game:hover,
.home-game:focus-visible {
  text-decoration-color: currentColor;
  filter: brightness(1.15);
}
/* (the game's own app icon before its name, as Brighter Pocket's page shows it, lit faintly in its gold: Joe,
   2026-11-19) */
.home-game-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  margin: 0 0.4em 0 0.1em;
  vertical-align: -0.45em;
  border-radius: 22.5%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 14px rgba(242, 196, 94, 0.35);
}
.home-tools {
  display: grid;
  gap: 1.125rem;
  /* (every card the same width and height: three a row, two a row on a small tablet, one on a phone; a short last row
     in the middle. Six columns, a card two wide; every row as tall as the tallest) */
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}
/* (a card never wider than its column: WebKit otherwise kept a card at the width it was first laid out at when the
   column narrowed after, the page's own scrollbar arriving a moment later, and the card ran 7 px into the gap before
   the bar: Joe's iPhone, 2026-11-19) */
.home-tools > .home-tool {
  min-width: 0;
}
.home-tools > .home-tool {
  grid-column: span 2;
}
.home-tools > .home-tool:nth-child(4):nth-last-child(2) {
  grid-column: 2 / span 2;
}
/* (the buttons along each row's foot, whatever the words above them) */
.home-tools .home-go {
  margin-top: auto;
}
@media (max-width: 899px) {
  .home-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .home-tools > .home-tool:nth-child(4):nth-last-child(2) {
    grid-column: span 2;
  }
  .home-tools > .home-tool:last-child:nth-child(odd) {
    grid-column: 2 / span 2;
  }
}
/* a card, with a clear edge; its button is its one link (its words can be selected) */
.home-tool {
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid #3a4252;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  color: inherit;
}
.home-shot {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--bg3);
  overflow: hidden;
  border-bottom: 1px solid #3a4252;
}
.home-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease-out;
}
.home-shot img.in {
  opacity: 1;
}
.home-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem 1rem;
  flex: 1;
}
.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  flex-wrap: wrap;
}
/* where a tool works, drawn (Landing.tsx Devices): a computer, and a phone where it works on one too, quiet beside the
   words */
.home-devices {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--fg1);
}
.home-devices svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-devices-dot {
  stroke-width: 2.6;
}
.home-devices-hand {
  fill: currentColor;
  stroke: var(--devices-gap, var(--bg2));
  stroke-width: 1.6;
  paint-order: stroke;
}
.home-desc {
  color: var(--fg1);
  font-size: 1rem;
  line-height: 1.5;
  flex: 1;
}
/* the way in: the card's one call to action and link, a button the card's width filled in its tool's own colour, lit
   as it is pointed at */
.home-tool[data-tool='fashion'] {
  --tc: var(--fashion);
}
.home-tool[data-tool='maps'] {
  --tc: var(--maps);
}
.home-tool[data-tool='data'] {
  --tc: var(--data);
}
.home-tool[data-tool='pocket'] {
  --tc: var(--pocket);
}
/* (Brighter Merchant's red, lightened, between its own and a soft rose, under the same dark words as the other
   tools' buttons: Joe, 2026-11-17) */
.home-tool[data-tool='merchant'] {
  --tc: color-mix(in srgb, var(--merchant) 85%, #fff);
}
.home-go {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.6875rem 1rem;
  border-radius: 0.625rem;
  color: #0d0f13;
  font-weight: 600;
  font-size: 0.9375rem;
  background: var(--tc);
  border: 1px solid var(--tc);
  transition: filter 0.15s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* (Apple's logo after Brighter Pocket's name, in the button's dark ink, the button's own gap from it; raised so it
   stands on the words' baseline, its body the capitals' height and its leaf above them: centred in the line, it hung
   below it; 2 px up, its body stood above the capitals; measured, Joe 2026-11-17) */
.home-go .apple-icon {
  position: relative;
  top: -0.0625rem;
  margin-left: 0;
  color: currentColor;
}
.home-go:hover,
.home-go:active {
  text-decoration: none;
}
.home-go:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (hover: hover) {
  .home-go:hover {
    filter: brightness(1.12);
  }
}
.home-go:focus-visible {
  filter: brightness(1.12);
}
/* a card's trailer: a badge in the lower left of its picture, YouTube's icon and the trailer's length, dark glass over the
   picture's empty ground (Joe, 2026-11-19: the way in below it the card's full width again, "Open Brighter Merchant") */
.home-shot {
  position: relative;
}
.home-clip {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.6rem 0.32rem 0.5rem;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .home-clip:hover {
    background: rgba(8, 10, 14, 0.88);
    border-color: rgba(255, 255, 255, 0.4);
  }
}
.home-clip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.home-clip-icon {
  width: 1.3125rem;
  height: 0.9375rem;
  flex: none;
}
/* Big Rat's Adventure, the last card of the grid and the tools' size (Joe, 2026-11-19): a card as the tools' are (their
   edge, radius and ground), the game's own in it: its title pill on the card's top edge and raised buttons, pictures
   (landing/game-*.png, 2 px to a CSS px) laid out as nine-slices, the buttons lit when pointed at and pressed in when
   clicked */
.home-game-card {
  position: relative;
  overflow: visible;
}
.home-pill {
  position: absolute;
  z-index: 2;
  top: -12px;
  left: 50%;
  width: 244px;
  height: 28.8px;
  transform: translateX(-50%);
  background: url('/landing/game-pill.png') center / 100% 100% no-repeat;
  font-size: 0;
  color: transparent;
}
/* (the card shows its pill over its edge, so its picture keeps the card's corners itself) */
.home-game-card .home-shot {
  border-radius: calc(0.75rem - 1px) calc(0.75rem - 1px) 0 0;
  background: #0b0908;
}
/* (a pixel more above and below than the tools' buttons, which have a border: the same height) */
:is(.home-game-card, .home-trailer-foot) .home-go {
  padding-top: calc(0.6875rem + 1px);
  padding-bottom: calc(0.6875rem + 1px);
  border: 0;
  border-radius: 0;
  color: #fff;
  font-size: 0.9375rem;
  /* (the lit and pressed pictures loaded with the page, drawn at no size: there at the first touch) */
  background:
    url('/landing/game-button-hover.png') 0 0 / 0 0 no-repeat,
    url('/landing/game-button-pressed.png') 0 0 / 0 0 no-repeat;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  border-image: url('/landing/game-button.png') 52 fill / 21px stretch;
}
@media (hover: hover) {
  :is(.home-game-card, .home-trailer-foot) .home-go:hover {
    background: none;
    color: #fff;
    border-image-source: url('/landing/game-button-hover.png');
  }
}
:is(.home-game-card, .home-trailer-foot) .home-go:focus-visible {
  outline: 2px solid #e9dfb7;
  outline-offset: 3px;
  background: none;
  color: #fff;
  border-image-source: url('/landing/game-button-hover.png');
}
/* (pressed: the game's own pressed button, a picture; a transform here put the button on a layer of its own at each
   touch, and phones flickered the frame over it) */
:is(.home-game-card, .home-trailer-foot) .home-go:active {
  border-image-source: url('/landing/game-button-pressed.png');
}
/* (and never the tools' brightening: a filter, a layer of its own too) */
:is(.home-game-card, .home-trailer-foot) .home-go,
:is(.home-game-card, .home-trailer-foot) .home-go:hover,
:is(.home-game-card, .home-trailer-foot) .home-go:focus-visible {
  filter: none;
  transition: none;
}

/* (Big Rat's trailer window's frame and close button loaded with its badge, drawn at no size: there the moment the
   window opens) */
.home-game-card .home-clip {
  background-image: url('/landing/game-frame.png'), url('/landing/game-frame-line-close.png'),
    url('/landing/game-close.png');
  background-size: 0 0;
  background-repeat: no-repeat;
}
/* ... and the trailer over the page, the page dimmed, in one of the game's windows: its body behind, its gold (with
   the ring of a window that closes) over the player's edge, the red close button on its ring (24 units in from the
   right, 10 above the top, as the game places it) and Play Now under the player; no title pill, the video first (Joe,
   2026-11-19); the picture 16:9, as large as fits */
.home-trailer-box {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: calc(1rem + 14px);
  background: rgba(5, 6, 8, 0.86);
}
.home-trailer-in {
  position: relative;
  isolation: isolate;
  width: min(100%, calc((100dvh - 2rem - 28px - 4.75rem) * 16 / 9), 70rem);
  padding: 3px;
}
/* (Play Now under the player, inside the window, as the tools' Open is under theirs: the player's width, but never
   wider than a card's own button, 23rem less its padding and border, centred: Joe, 2026-11-19) */
.home-trailer-foot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  /* (clear of the ring and its corners) */
  padding: 0.75rem 0.875rem 0.875rem;
}
.home-trailer-foot .home-go {
  flex: 1;
  max-width: calc(21rem - 2px);
  margin-top: 0;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.home-trailer-frame,
.home-trailer-ring {
  position: absolute;
  inset: -14px;
  z-index: -1;
  pointer-events: none;
  border: 63px solid transparent;
  border-image: url('/landing/game-frame.png') 126 fill / 63px stretch;
}
/* (the ring a layer of its own: iOS draws the player over anything that is not, Joe's iPhone, 2026-11-19) */
.home-trailer-ring {
  z-index: 1;
  border-image-source: url('/landing/game-frame-line-close.png');
  transform: translateZ(0);
}
.home-trailer-in iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}
.home-trailer-close {
  position: absolute;
  z-index: 2;
  top: -10px;
  right: -10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: url('/landing/game-close.png') center / 100% 100% no-repeat;
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .home-trailer-close:hover {
    background-image: url('/landing/game-close-hover.png');
  }
}
.home-trailer-close:focus-visible {
  background-image: url('/landing/game-close-hover.png');
  outline: 2px solid #e9dfb7;
  outline-offset: 2px;
  border-radius: 50%;
}
.home-trailer-close:active {
  background-image: url('/landing/game-close-pressed.png');
}

/* a tool's trailer over the page (Joe, 2026-11-19: the site's own panel, not the game's window): the page dimmed, the
   player first, its way in under it, so the next step is there when the video ends; the picture 16:9, as large as
   fits; closed by its button, the backdrop or Escape */
.home-watch-box {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(5, 6, 8, 0.86);
}
.home-watch-box[data-tool='merchant'] {
  --tn: var(--merchant);
  --tc: color-mix(in srgb, var(--merchant) 85%, #fff);
}
.home-watch-box[data-tool='pocket'] {
  --tn: var(--pocket);
  --tc: var(--pocket);
}
.home-watch-in {
  position: relative;
  width: min(100%, 60rem, calc((100dvh - 2rem - 6.5rem) * 16 / 9));
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 1rem;
  background: var(--bg1);
  border: 1px solid #3a4252;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
/* (its close button on the panel's corner, the video the first thing in it: Joe, 2026-11-19) */
.home-watch-x {
  position: absolute;
  z-index: 1;
  top: -0.875rem;
  right: -0.875rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #3a4252;
  background: var(--bg3);
  color: var(--fg0);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
}
.home-watch-x svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.home-watch-x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (hover: hover) {
  .home-watch-x:hover {
    filter: brightness(1.3);
  }
}
.home-watch-in iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0.625rem;
  background: #000;
}
/* (the tool's Open under the player, no words beside it: the player's width, but never wider than the card's own
   button, centred, as Big Rat's Play Now: Joe, 2026-11-19) */
.home-watch-foot {
  display: flex;
  justify-content: center;
}
.home-watch-foot .home-go {
  flex: 1;
  max-width: calc(21rem - 2px);
  align-self: auto;
  margin-top: 0;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
/* (a phone on its side: the window no taller than the screen) */
@media (max-height: 560px) {
  .home-watch-box {
    padding: 1.25rem;
  }
  .home-watch-in {
    width: min(100%, 60rem, calc((100dvh - 2.5rem - 4rem) * 16 / 9));
    gap: 0.5rem;
    padding: 0.5rem;
  }
}
@media (max-width: 599px) {
  .home-watch-box {
    padding: 1.125rem 1rem;
  }
  .home-watch-in {
    gap: 0.625rem;
    padding: 0.5rem;
  }
}

/* (narrower, less room round the cards) */
@media (max-width: 900px) {
  .home-main {
    padding: 0.875rem 0.875rem 1.25rem;
    gap: 1.25rem;
  }
  .home-tools {
    gap: 0.875rem;
  }
  .home-family-head h1 {
    letter-spacing: 0.08em;
  }
}
/* (phones held upright: one card a row) */
@media (max-width: 599px) {
  .home-tools {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-tools > .home-tool,
  .home-tools > .home-tool:nth-child(4):nth-last-child(2),
  .home-tools > .home-tool:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .home-family-head h1 {
    font-size: 0.75rem;
  }
}
/* (and on narrow phones the line's letters a little closer, so it stays one line from 375 px) */
@media (max-width: 380px) {
  .home-family-head h1 {
    letter-spacing: 0.04em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-go {
    transition: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-shot img {
    transition: none;
  }
}
