/* Sunshine IT — shared stylesheet for sunshine-it.eu
   Plain CSS, no build step. Colors adapt to the visitor's light or dark appearance. */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --bg-elevated: #ffffff;
  --text: #1d1d1f;
  --text-muted: #5c5c61;
  --rule: #e4e2dc;
  --link: #0b57d0;
  --accent: #d98e04;
  --accent-soft: #fff3d6;
  --focus: #0b57d0;
  --radius: 14px;
  --max: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --bg-elevated: #1e1e21;
    --text: #f2f2f4;
    --text-muted: #a4a4ab;
    --rule: #2d2d31;
    --link: #8ab4f8;
    --accent: #f0b429;
    --accent-soft: #2b2415;
    --focus: #8ab4f8;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--bg-elevated); padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { left: 8px; z-index: 10; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 16px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--text); letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand .sun {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffd966, var(--accent) 70%);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
nav.primary { display: flex; gap: 20px; flex-wrap: wrap; }
nav.primary a { color: var(--text-muted); font-weight: 500; }
nav.primary a[aria-current="page"] { color: var(--text); }

main { padding: 48px 0 64px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: 2.4rem; font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 650; margin-top: 2.2em; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.6em; }
p, ul, ol, dl { margin: 0 0 1em; }
.lead { font-size: 1.25rem; color: var(--text-muted); max-width: 42em; }
.muted { color: var(--text-muted); }
small, .small { font-size: 0.9rem; }
code, kbd {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em;
  background: var(--bg-elevated); border: 1px solid var(--rule); border-radius: 6px; padding: 1px 6px;
}

/* Hero */
.hero { display: grid; grid-template-columns: 128px 1fr; gap: 28px; align-items: center; }
.hero img { width: 128px; height: 128px; border-radius: 28px; }
.hero h1 { margin-bottom: 0.2em; }
@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; }
  .hero img { width: 96px; height: 96px; }
  h1 { font-size: 2rem; }
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.button {
  display: inline-block; padding: 10px 18px; border-radius: 999px; font-weight: 600;
  background: var(--text); color: var(--bg); border: 1px solid transparent;
}
.button:hover { text-decoration: none; opacity: 0.9; }
.button.secondary { background: transparent; color: var(--text); border-color: var(--rule); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.card {
  background: var(--bg-elevated); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card.app { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; }
.card.app img { width: 72px; height: 72px; border-radius: 16px; }
.card.app .meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }

/* Facts list */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .facts dt { margin-top: 8px; } }

/* Notice box */
.notice {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0;
}

/* Table of contents */
.toc { padding-left: 1.2em; columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .toc { columns: 1; } }

footer.site {
  border-top: 1px solid var(--rule); padding: 24px 0 40px;
  color: var(--text-muted); font-size: 0.9rem;
}
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.site a { color: var(--text-muted); }
footer.site .langs { flex-basis: 100%; margin: 0; }
footer.site .langs a + a::before { content: " · "; color: var(--text-muted); }
footer.site .langs a[aria-current] { font-weight: 600; text-decoration: none; }
