/* LMBS Apps
   A quiet page for loud banners: neutral ground, one typeface, and every colour on the
   site comes from the apps themselves. Text colours are checked for WCAG AA on --bg. */

:root {
  --bg:       #FAFAFB;
  --surface:  #F0F1F3;
  --line:     #E4E5E8;
  --ink:      #101114;   /* 18.4:1 */
  --body:     #3D4047;   /*  10.6:1 */
  --muted:    #686C75;   /*   5.0:1 */
  --live:     #1F9D55;
  --accent:   #101114;
  --on-accent:#FFFFFF;

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0D0E10;
    --surface:  #17181B;
    --line:     #26282C;
    --ink:      #F2F3F5;   /* 17.1:1 */
    --body:     #C3C6CC;   /* 11.0:1 */
    --muted:    #9094A0;   /*  5.9:1 */
    --live:     #3DD17F;
    --accent:   #F2F3F5;
    --on-accent:#0D0E10;
  }
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- inner-page bar ---------- */

.bar { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 20px var(--gutter) 0; }
.who { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 500; letter-spacing: -0.01em; }
.who img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.who:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- home ---------- */

.profile {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(40px, 8vw, 88px) 0 clamp(36px, 6vw, 64px);
}
.portrait {
  width: 96px; height: 96px; flex: none;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line);
}
.profile h1 { font-size: clamp(30px, 4.4vw, 44px); }
.profile p { color: var(--muted); margin-top: 6px; }
.profile-mail { margin-left: auto; color: var(--muted); text-decoration: none; }
.profile-mail:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.group + .group { margin-top: clamp(48px, 7vw, 80px); }
.group h2 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 20px; }
.group { padding-bottom: 8px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }

.card { display: block; text-decoration: none; color: inherit; }
.banner {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(128, 128, 140, 0.18);
  aspect-ratio: 1024 / 500;
}
.banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(0.2, 0, 0, 1); }
.card:hover .banner img { transform: scale(1.025); }
.card:focus-visible { outline-offset: 6px; border-radius: var(--radius); }

.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 16px; }
.card-name { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.card-line { display: block; margin-top: 4px; color: var(--muted); max-width: 46ch; }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: 0.55; }
.status.is-live::before { background: var(--live); opacity: 1; }

/* ---------- footer ---------- */

.foot {
  max-width: var(--measure);
  width: calc(100% - 2 * var(--gutter));
  margin: clamp(64px, 10vw, 120px) auto 0;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-size: 14px; color: var(--muted);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.foot span { margin-left: auto; }

/* ---------- detail pages ---------- */

.page { padding-top: 12px; }

.back { display: inline-block; padding: 10px 0; color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--ink); }

.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 0 40px; max-width: 68ch; }
.page-head h1 { font-size: clamp(36px, 5.4vw, 56px); letter-spacing: -0.04em; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: var(--body); }
.updated { color: var(--muted); font-size: 15px; }
.tags { display: flex; gap: 10px; align-items: center; }
.tags span:first-child {
  font-size: 14px; color: var(--body); padding: 3px 12px; border-radius: 99px; background: var(--surface);
}

.app-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 0 0 1px rgba(128,128,140,.18); }

.button {
  display: inline-flex; align-items: center; margin-top: 8px;
  padding: 13px 24px; border-radius: 99px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 500; text-decoration: none;
  transition: transform 160ms ease, opacity 160ms ease;
}
.button:hover { opacity: 0.88; }
.button:active { transform: scale(0.98); }

.film {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  border-radius: var(--radius); background: var(--surface);
  box-shadow: 0 0 0 1px rgba(128,128,140,.18);
  margin-bottom: 20px;
}

/* Screenshots: one strip, scrolling sideways when the window is narrower than five. */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px; margin-bottom: 56px;
}
.shots img {
  width: 100%; height: auto; border-radius: 18px; background: var(--surface);
  box-shadow: 0 0 0 1px rgba(128,128,140,.18);
  scroll-snap-align: start;
}

/* ---------- prose ---------- */

.prose { max-width: 68ch; font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 24px; letter-spacing: -0.025em; margin-top: 2.3em; }
.prose h3 { font-size: 18px; margin-top: 1.9em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.5em; }
.prose li::marker { color: var(--muted); }
.prose code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.88em; background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--surface); padding: 18px 20px; overflow-x: auto; border-radius: 14px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 2px solid var(--line); padding-left: 20px; color: var(--muted); margin-left: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; }
.prose-tight { font-size: 16px; line-height: 1.6; }
.prose-tight h2 { font-size: 17px; margin-top: 1.8em; }

/* ---------- navigation ---------- */

@view-transition { navigation: auto; }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
::view-transition-old(root) { animation: vt-out 160ms ease both; }
::view-transition-new(root) { animation: vt-in 300ms cubic-bezier(0.2, 0, 0, 1) both; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .banner img, .button { transition: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; gap: 36px; }
  .profile { gap: 16px; flex-wrap: wrap; }
  .portrait { width: 72px; height: 72px; }
  .profile-mail { margin-left: 0; flex-basis: 100%; }
  .foot span { margin-left: 0; flex-basis: 100%; }
}
