/* kleinod.studio – one stylesheet for the whole site. No external fonts or services. */

:root {
  --violet: #4B3F9E;
  --ink: #2A2550;
  --muted: #6A6590;
  --lavender: #ECEAF7;
  --line: #DEDBF0;
  --bg: #FFFFFF;
  --card: #F7F6FC;
  --code: #F2F0FA;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --violet: #A99CF5;
    --ink: #F1EFFA;
    --muted: #B9B4D8;
    --lavender: #2C2944;
    --line: #34314D;
    --bg: #17161F;
    --card: #1F1E2B;
    --code: #24223A;
  }
}

/* Light or dark logo, following the system style */
.site-header .brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .site-header .brand .logo-light { display: none; }
  .site-header .brand .logo-dark { display: block; }
}

* { box-sizing: border-box; }

html {
  font-family: "Adwaita Sans", "Inter", "Cantarell", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

a { color: var(--violet); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.site-header .brand img { display: block; height: 30px; width: auto; }
.site-header nav { display: flex; gap: 20px; font-size: 15px; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--violet); }

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--muted); }

/* Text */
h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: 26px; line-height: 1.25; font-weight: 650; margin: 64px 0 12px; }
h3 { font-size: 19px; font-weight: 650; margin: 32px 0 8px; }
p, li { max-width: 68ch; }
.lead { font-size: 21px; color: var(--muted); max-width: 40ch; }
.muted { color: var(--muted); }

code { font-family: "Adwaita Mono", "JetBrains Mono", ui-monospace, monospace; font-size: 0.88em; background: var(--code); padding: 0.1em 0.35em; border-radius: 5px; }
pre { background: var(--code); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
pre code { background: none; padding: 0; }

table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; }

/* Building blocks */
.hero { padding: 72px 0 16px; }
.hero-app { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding: 64px 0 8px; }
.hero-app img { width: 128px; height: 128px; flex: none; }

.button { display: inline-block; background: var(--violet); color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 16px; }
@media (prefers-color-scheme: dark) { .button { color: #17161F; } }
.button.secondary { background: var(--lavender); color: var(--ink); }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }
.card p { margin: 6px 0 0; color: var(--muted); }

.app-card { display: flex; gap: 20px; align-items: center; text-decoration: none; color: inherit; }
.app-card img { width: 72px; height: 72px; flex: none; }
.app-card:hover h3 { color: var(--violet); }

.shot { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(42, 37, 80, 0.12); margin: 32px 0 8px; }
.shot-dark { display: none; }
@media (prefers-color-scheme: dark) { .shot-light { display: none; } .shot-dark { display: block; } }

.note { background: var(--lavender); border-radius: 10px; padding: 14px 18px; }
.prose h2:first-child { margin-top: 32px; }

@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; padding: 16px; gap: 8px; }
  .hero { padding-top: 40px; }
  h2 { margin-top: 48px; }
}
