/* Readex Pro — warm humanist sans, self-hosted, Latin subset.
   display:optional avoids swap/layout-shift on the preloaded weights. */
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(fonts/readex-pro-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(fonts/readex-pro-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url(fonts/readex-pro-latin-700-normal.woff2) format("woff2");
}

/* Latin Extended subset — covers Croatian č ć đ š ž and friends. */
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(fonts/readex-pro-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(fonts/readex-pro-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url(fonts/readex-pro-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Bright, lighthearted canvas — soft mint-cream with a cheerful magenta
     accent and a violet link, playful without being loud. */
  --bg: #f6fbf7;
  --surface: #eef7ff;
  --border: #dbe9f5;
  --text: #26233a;
  --text-muted: #5f5b7a;
  --accent: #ff5da2;
  --accent-soft: #ffe1ef;
  --accent-ink: #c2306e;
  --link: #7b5cff;
  --link-hover: #5b3ce0;
  --radius: 14px;
  --font: "Readex Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 1.25rem 3rem;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.6em;
  text-wrap: balance;
}

h1 .accent { box-shadow: inset 0 -0.14em 0 var(--accent-soft); }

h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.55rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.5rem;
  padding-left: 0.6em;
  border-left: 0.22em solid var(--accent);
}

p { margin: 1.15rem 0; text-wrap: pretty; }

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.key {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 0 0.25em;
  border-radius: 0.35em;
  font-weight: 500;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.08em;
}
a:hover { color: var(--link-hover); }

/* Landing-page link cards */
.links {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.link-card {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
}
.link-card .flag { font-size: 1.2em; }
.link-card .arrow { margin-left: auto; color: var(--accent); font-weight: 700; }

/* Each card gets its own cheerful tint. */
.link-card:nth-child(1) { background: #fff0f6; border-color: #ffd0e4; }
.link-card:nth-child(1) .arrow { color: #ff5da2; }
.link-card:nth-child(2) { background: #eef0ff; border-color: #d6dbff; }
.link-card:nth-child(2) .arrow { color: #7b5cff; }
.link-card:nth-child(1):hover { border-color: #ff5da2; }
.link-card:nth-child(2):hover { border-color: #7b5cff; }

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151f;
    --surface: #201e2e;
    --border: #322f45;
    --text: #f3f0ff;
    --text-muted: #b4aecb;
    --accent: #ff79b6;
    --accent-soft: #3a1f2e;
    --accent-ink: #ffb3d4;
    --link: #a894ff;
    --link-hover: #c3b5ff;
  }

  .link-card:nth-child(1) { background: #2a1c26; border-color: #4a2a3b; }
  .link-card:nth-child(2) { background: #201f33; border-color: #37345a; }
  .link-card:nth-child(1) .arrow { color: #ff79b6; }
  .link-card:nth-child(2) .arrow { color: #a894ff; }
}
