/* Shared design for the flxbrgr.com project pages (/petanque, /logobundle).
   Same world as the front page (src/style.css, DESIGN.md "Colour Rooms"): each page is its app's
   room, one flat field of the app's colour. Black ink on both rooms here: Pétanque's tape yellow
   takes black, and coral holds only 3:1 with white, too little for body copy.
   Features are flat ink fields inside the room; contact is a paper panel. Fonts are linked per page. */

:root {
  --ink: #111111;
  --paper: #ffffff;
  --font: 'Be Vietnam Pro', system-ui, sans-serif;
  --pad: clamp(16px, 3.5vw, 48px);
  --room: #1534b8;
  --room-ink: var(--paper);
}

[data-app='petanque'] { --room: #f6c400; --room-ink: var(--ink); }
[data-app='logobundle'] { --room: #fd5d4c; --room-ink: var(--ink); }

* { box-sizing: border-box; }
html { background: var(--ink); }

body {
  margin: 0;
  overflow-wrap: break-word;
  font-family: var(--font);
  font-weight: 500;
  background: var(--room);
  color: var(--room-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--room-ink); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--ink); color: var(--room); }

h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(44px, 6.6vw, 104px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.card h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }

/* Read by screen readers, not shown */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Masthead: wordmark home, language tabs ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; }
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

.lang-switch { display: inline-flex; gap: 4px; font-size: 19px; font-weight: 700; }
.lang-switch button {
  min-width: 44px; min-height: 44px; padding: 0 6px; border: 0; background: none;
  color: inherit; font: inherit; cursor: pointer;
}
.lang-switch button:hover { text-decoration: underline; text-underline-offset: 5px; }
.lang-switch button[aria-pressed='true'] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

.app-head { display: flex; align-items: center; gap: 14px; margin: 32px 0 20px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.app-head img { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; }

/* ---------- The page: hero beside the real screen, then features, help, contact ---------- */
.pl main { padding-bottom: clamp(56px, 8vw, 104px); }

.pl .page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); column-gap: clamp(32px, 5vw, 88px); align-items: start; }
.pl .page[hidden] { display: none; }
.pl .page > * { grid-column: 1 / -1; }
.pl .page > h1, .pl .page > .subtitle, .pl .page > .cta, .pl .page > .cta-links, .pl .page > .cta-note { grid-column: 1; }
.pl .page > .shot, .pl .page > .duo { grid-column: 2; grid-row: 1 / span 5; justify-self: center; }

.pl .subtitle { margin: 24px 0 0; max-width: 38rem; font-size: clamp(19px, 1.7vw, 24px); font-weight: 600; line-height: 1.35; }
.pl .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 36px 0 14px; }
.pl .cta-note { margin: 0; max-width: 38rem; font-size: 16px; }

/* Buttons: outlined in the room's ink, filled on hover; the primary one is filled */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  border: 2px solid currentColor;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.btn:hover, .btn-primary { background: var(--room-ink); color: var(--room); border-color: var(--room-ink); }
.btn-primary:hover { background: transparent; color: var(--room-ink); }

/* The Google Play PNG carries its own transparent padding; trim it so the badge lines up with the buttons */
.pl .badge-link { display: inline-flex; align-items: center; height: 52px; }
.pl .badge-svg { display: block; height: 52px; width: auto; }

/* Secondary routes under the buttons: plain links, never styled like an install button */
.pl .cta-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.pl .cta-links a { display: inline-flex; align-items: center; min-height: 44px; }
.pl .badge-google { height: 76px; width: auto; display: block; margin: -12px -11px; }

/* Real screens sit in a white frame, as in the rooms */
.shot, .pl .duo img { border: 6px solid var(--paper); border-radius: 22px; background: var(--paper); }
.pl .shot { width: min(100%, 300px); }
.pl .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 440px); }
.pl .duo img { width: 100%; }

/* Features: flat ink fields inside the room */
.pl .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: clamp(48px, 7vw, 96px); }
@media (min-width: 900px) { .pl .grid { grid-template-columns: repeat(3, 1fr); } } /* six cards: two even rows */
.pl .card { padding: 28px 24px; border-radius: 9px; background: var(--ink); color: var(--paper); }
.pl .card h3 { margin-bottom: 10px; }
.pl .card p { margin: 0; font-size: 16px; color: #c8c8c8; text-wrap: pretty; }

/* Help */
.pl .section-label { margin: clamp(56px, 8vw, 104px) 0 20px; }
.pl section p { margin: 0 0 12px; }
.pl details { border-top: 2px solid var(--room-ink); padding: 18px 0; }
.pl details:last-of-type { border-bottom: 2px solid var(--room-ink); }
.pl summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 28px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.pl summary::-webkit-details-marker { display: none; }
/* Drawn plus that loses its vertical bar when open */
.pl summary::after {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  background:
    linear-gradient(currentColor, currentColor) center / 18px 3px no-repeat,
    linear-gradient(currentColor, currentColor) center / 3px 18px no-repeat;
}
.pl details[open] summary::after { background: linear-gradient(currentColor, currentColor) center / 18px 3px no-repeat; }
.pl summary:hover { text-decoration: underline; text-underline-offset: 5px; }
.pl details p { margin: 10px 0 0; max-width: 46rem; font-size: 17px; }

/* Contact: a paper panel */
.pl .contact { margin-top: clamp(48px, 6vw, 80px); padding: clamp(24px, 3vw, 40px); border-radius: 9px; background: var(--paper); color: var(--ink); }
.pl .contact h2 { margin: 0 0 12px; text-wrap: balance; }
.pl .contact p { margin: 0; font-size: 18px; }
.pl .contact :focus-visible { outline-color: var(--ink); }

/* ---------- Footer: an ink band ---------- */
/* The shared footer (same markup as the front page, injected at build time from src/home-view.ts) */
.foot { padding: 72px var(--pad) 40px; background: var(--ink); color: var(--paper); }
.foot-variant { display: flex; flex-direction: column; gap: 16px; max-width: 1440px; margin: 0 auto; }
.foot-variant[hidden] { display: none; }
.foot :focus-visible { outline-color: var(--paper); }
.foot-lead { margin: 0; font-size: 19px; font-weight: 700; text-wrap: pretty; }
.mail { align-self: flex-start; padding: 6px 0; font-size: clamp(22px, 2.6vw, 40px); font-weight: 800; letter-spacing: -0.02em; text-decoration-thickness: 2px; text-underline-offset: 8px; overflow-wrap: anywhere; }
.nobr { white-space: nowrap; }
.foot-apps { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 16px 0 0; padding: 0; list-style: none; }
.foot-apps a { display: inline-flex; align-items: center; min-height: 44px; font-size: 19px; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.foot-apps a:hover { text-decoration-thickness: 4px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 24px 0 0; color: #c8c8c8; font-size: 15px; }
.legal-links span, .legal-links a { display: inline-flex; align-items: center; min-height: 44px; }
.legal-links a { text-decoration: none; }
.legal-links a:hover { color: var(--paper); text-decoration: underline; }

@media (max-width: 760px) {
  .pl .page { grid-template-columns: 1fr; }
  .pl .page > .shot, .pl .page > .duo { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 40px; }
  .pl .shot { width: min(78%, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
