/* Sillagio Studio. Values from the studio design system (tokens.json). */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --surface: #faf8f5;
  --text: #1f1b17;
  --muted: #6b635a;
  --rule: #e4ddd3;
  --focus: #1c1714;
  --mark: #1c1714;           /* studio-ink on light grounds */
  --accent: #6b635a;         /* link underlines; an app's pages use its own accent */
  --serif: "Newsreader", "New York", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 32px;
  --space-4: 48px;
  --space-5: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #161412;
    --text: #f1ece6;
    --muted: #a99f94;
    --rule: #2e2a26;
    --focus: #fbeac9;
    --mark: #fbeac9;         /* studio-cream on dark grounds */
    --accent: #a99f94;
  }
}
/* Sillagio's pages: its bronze on link underlines only, since the light bronze is under 4.5:1 for text. */
.app-sillagio { --accent: #9a6b2f; }
@media (prefers-color-scheme: dark) { .app-sillagio { --accent: #d9a85b; } }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}
main {
  max-width: 680px;
  margin: 0 auto;
  padding-block: var(--space-4) var(--space-5);
  padding-left: max(var(--space-2), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-2), env(safe-area-inset-right, 0px));
}
a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.25; text-wrap: balance; }
h1 { font-size: 34px; font-weight: 600; margin: 0; }
h2 { font-size: 22px; font-weight: 600; margin: 0 0 var(--space-1); }
h3 { font-size: 22px; font-weight: 600; margin: 0; }
p, li { margin: 0 0 12px; }
ul { padding-left: 22px; }
.muted { color: var(--muted); }

.mark, .wordmark { display: block; fill: var(--mark); color: var(--mark); }

/* Studio home */
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.hero .mark { width: 88px; height: 88px; }
.hero .wordmark { width: 220px; height: auto; }
.hero h1 { font-size: clamp(36px, 7vw, 52px); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }
.hero .lede { margin: 0; max-width: 34em; color: var(--muted); }

section { border-top: 1px solid var(--rule); padding-top: var(--space-3); margin-top: var(--space-4); }

.app { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-2); align-items: start; margin-top: var(--space-2); }
.app img { width: 72px; height: 72px; border-radius: 22.37%; }
.app p { margin: 4px 0 var(--space-1); }
.links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }

/* App pages */
.studio-bar { display: inline-block; margin-bottom: var(--space-4); }
.studio-bar .wordmark { width: 168px; height: auto; }
.app-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.app-head img { width: 64px; height: 64px; border-radius: 22.37%; }
.app-head p { margin: 2px 0 0; }
.app-page h2 { margin-top: 36px; }

footer {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) 20px;
}
footer a { color: var(--muted); }
