/*
 * darencorp.dev: the apps index and the Omniray pages, in Omniray's Japanese washi look.
 * Colours are a copy of the Omniray skins (rays src/theme/skins/japanese.ts and japaneseNight.ts). Keep them in sync by hand.
 * Klee One is subset to Latin with `pyftsubset` (see README); add glyphs there if a page needs new characters.
 */

@font-face {
  font-family: 'Klee One';
  src: url(/fonts/KleeOne-400Regular.woff2) format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Klee One';
  src: url(/fonts/KleeOne-600SemiBold.woff2) format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* japanese.ts */
  --paper: #f3ecdc;
  --grid: rgba(128, 120, 104, 0.18);
  --ink: #1c1b1a;
  --muted: #5a544a;
  --surface: #f8f3e6;
  --border: #807868;
  --link: #1d3a5f;
  --accent: #b3261e;
  --on-accent: #f8f3e6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* japaneseNight.ts */
    --paper: #1b1916;
    --grid: rgba(122, 113, 99, 0.22);
    --ink: #ece4d2;
    --muted: #b5ab99;
    --surface: #221f1b;
    --border: #7a7163;
    --link: #6e8ab3;
    --accent: #c45c48;
    --on-accent: #141210;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Footer pinned to the bottom of short pages; long pages push it down. */
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

main,
header,
footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header {
  padding-top: 1.5rem;
}

header a.home {
  font-family: 'Klee One', serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: 'Klee One', serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.4rem;
  margin: 1.5rem 0 0.5rem;
}

h2 {
  font-size: 1.6rem;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.25rem;
}

a {
  color: var(--link);
}

.muted {
  color: var(--muted);
}

/* Landing pages */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero img {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero h1 {
  font-size: 3rem;
}

.hero p {
  font-size: 1.2rem;
}

.store {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.4rem;
  border-radius: 12px;
  font-family: 'Klee One', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--on-accent);
  text-decoration: none;
  background: var(--accent);
}

.soon {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
}

/* Apps index */
.apps {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
}

.apps a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.apps img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex: none;
}

.apps strong {
  display: block;
  font-family: 'Klee One', serif;
  font-weight: 600;
  font-size: 1.35rem;
}

.apps span {
  color: var(--muted);
}

footer {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  text-align: center;
  font-size: 0.95rem;
}

footer a {
  margin: 0 0.6rem;
}
