/* yasmar.app: one stylesheet for every page. Direction A, "Night Sky" (ticket 05).
 * Dark by default; follows the system scheme. No fonts, images or scripts from anywhere else.
 *
 * Shared by every page:   .wrap  .site-header .wordmark  .site-footer  .button
 * Storefront:             .intro  .apps .app-tile  .note
 * App Page:               .hero  .rail  .section  .features  .links
 * Legal Page:             .prose (with .updated for the "last updated" line)
 * 404:                    .intro (an h1, a p, and a .button back to /)
 */

:root {
  color-scheme: dark light;
  --bg: #0b1022; --bg-2: #121a33; --fg: #e9ecf5; --muted: #9aa3bd; --line: #222c4a;
  --accent: #f0bd73; --glow: rgba(240, 189, 115, .22);
  --font: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-xs: .8125rem; --t-s: 1rem; --t-m: 1.125rem; --t-l: 1.5rem; --t-xl: 2.25rem; --t-2xl: 3rem;
  --s-1: .25rem; --s-2: .5rem; --s-3: 1rem; --s-4: 1.5rem; --s-5: 2.5rem; --s-6: 4rem; --s-7: 6rem;
  --gutter: 1rem; --max: 40rem; --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef1f8; --bg-2: #ffffff; --fg: #141a2e; --muted: #5a6380; --line: #d5dbea;
    --accent: #a8661c; --glow: rgba(168, 102, 28, .14);
  }
}
@media (min-width: 40rem) { :root { --gutter: 1.5rem; } }

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg) radial-gradient(ellipse 80% 40rem at 50% -10rem, var(--glow), transparent 70%) no-repeat;
  color: var(--fg); font: 400 var(--t-s)/1.6 var(--font);
  overflow-wrap: break-word;
}
/* width: a centred flex item would otherwise grow to its widest child (the screenshot rail). */
main { flex: 1; width: 100%; }
a { color: var(--accent); text-underline-offset: .15em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header and footer, repeated in every page */
.site-header { padding: var(--s-4) 0; }
.site-header .wrap { display: flex; justify-content: center; }
.wordmark {
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: var(--t-xs);
  letter-spacing: .18em; text-transform: lowercase; opacity: .8;
}
.wordmark:hover { opacity: 1; }

.site-footer {
  margin-top: var(--s-7); padding: var(--s-5) 0; border-top: 1px solid var(--line);
  color: var(--muted); font-size: var(--t-xs); text-align: center;
}
.site-footer p { margin: var(--s-1) 0; }

.button {
  display: inline-block; margin-top: var(--s-4); padding: var(--s-3) var(--s-5);
  background: var(--accent); color: var(--bg); border-radius: 999px;
  font-weight: 700; text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

/* Storefront, and any short centred message such as the 404 */
.intro { text-align: center; padding: var(--s-6) 0 var(--s-5); }
.intro h1 { font-size: var(--t-xl); }
.intro p { color: var(--muted); font-size: var(--t-m); margin: var(--s-3) auto 0; max-width: 28rem; }

.apps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.app-tile {
  display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none;
}
.app-tile:hover { border-color: var(--accent); }
.app-tile img { width: 72px; height: 72px; border-radius: 22.5%; flex: none; box-shadow: 0 0 24px var(--glow); }
.app-tile h2 { font-size: var(--t-m); }
.app-tile p { margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--t-xs); }
.app-tile .go { margin-left: auto; color: var(--accent); font-size: var(--t-l); }

.note { text-align: center; color: var(--muted); font-size: var(--t-xs); margin-top: var(--s-4); }

/* App Page */
.hero { text-align: center; padding: var(--s-5) 0; }
.hero .icon {
  width: 128px; height: 128px; border-radius: 22.5%; margin: 0 auto var(--s-4);
  box-shadow: 0 0 60px var(--glow), 0 10px 30px rgba(0, 0, 0, .35);
}
.hero h1 { font-size: var(--t-xl); }
.hero .sub { color: var(--accent); font-weight: 600; margin: var(--s-2) 0 0; }
.hero .pitch { color: var(--muted); font-size: var(--t-m); margin: var(--s-3) auto 0; max-width: 30rem; }

/* Screenshots: a row that scrolls sideways (CSS scroll-snap), bleeding to the screen edges. */
.rail {
  display: flex; gap: var(--s-3); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: var(--s-2) var(--gutter) var(--s-4); margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: thin;
}
.rail img {
  flex: none; width: 62vw; max-width: 220px; border-radius: 18px;
  scroll-snap-align: center; border: 1px solid var(--line);
}

.section { margin-top: var(--s-6); }
.section h2 { font-size: var(--t-l); margin-bottom: var(--s-3); }
.section p { color: var(--muted); margin: 0 0 var(--s-3); }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.features li { padding: var(--s-3); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.features strong { display: block; color: var(--fg); }
.features span { color: var(--muted); font-size: var(--t-xs); }
@media (min-width: 40rem) { .features { grid-template-columns: 1fr 1fr; } }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-6); font-size: var(--t-xs); }

/* Long text: a Legal Page's body. Wrap the converted Markdown in <article class="prose">. */
.prose { padding-top: var(--s-5); }
.prose h1 { font-size: var(--t-xl); margin-bottom: var(--s-2); }
.prose .updated { color: var(--muted); font-size: var(--t-xs); margin: 0 0 var(--s-5); }
.prose h2 { font-size: var(--t-l); margin: var(--s-5) 0 var(--s-3); }
.prose h3 { font-size: var(--t-m); margin: var(--s-4) 0 var(--s-2); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table { margin: 0 0 var(--s-3); }
.prose ul, .prose ol { padding-left: var(--s-4); }
.prose li { margin: var(--s-1) 0; }
.prose li > ul, .prose li > ol { margin: var(--s-1) 0 0; }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }
.prose blockquote { padding-left: var(--s-3); border-left: 3px solid var(--line); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .875em; padding: .1em .35em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: var(--t-xs); }
.prose th, .prose td { padding: var(--s-2) var(--s-3); border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-2); font-weight: 600; }
