/* Layout: clean white page, one centred column; Outfit throughout, blue as the single accent */
:root {
  --paper: #FFFFFF;
  --surface: #F6F7F9;
  --ink: #111418;
  --ink-soft: #4A5260;
  --line: #E3E6EB;
  --accent: #2F80ED;
  --accent-strong: #1B66D6;
  --accent-text: #1B66D6;
  --accent-wash: #EAF2FD;
  --on-accent: #FFFFFF;
  --font: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1116; --surface: #171B22; --ink: #F2F4F7; --ink-soft: #A7B0BE; --line: #2A303A;
    --accent: #5AA2FF; --accent-strong: #5AA2FF; --accent-text: #7DB6FF; --accent-wash: #1A2A44; --on-accent: #0E1116;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1116; --surface: #171B22; --ink: #F2F4F7; --ink-soft: #A7B0BE; --line: #2A303A;
  --accent: #5AA2FF; --accent-strong: #5AA2FF; --accent-text: #7DB6FF; --accent-wash: #1A2A44; --on-accent: #0E1116;
  color-scheme: dark;
}

/* Language switch: show only the active language */
:root[data-lang="en"] [lang="hr"],
:root[data-lang="hr"] [lang="en"] { display: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }
main { flex: 1; padding-block: 56px 88px; }

/* Wordmark: blue O, black "t", glasses for "oo", black "ly" */
.wm { font-family: var(--font); font-weight: 700; line-height: 1; letter-spacing: -0.025em; display: inline-flex; align-items: baseline; color: var(--ink); }
.wm-o { color: var(--accent); }
.wm-glasses { width: 1.26em; height: 0.56em; margin: 0 0.01em -0.015em; color: var(--ink); overflow: visible; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-block: 12px; }
.brand { color: var(--ink); text-decoration: none; font-size: 32px; display: inline-flex; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; padding: 8px 14px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center; }
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-wash); }
.lang-switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-switch button { font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; background: transparent; color: var(--ink-soft); border: 0; padding: 0 12px; min-height: 34px; border-radius: 999px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) {
  .site-nav { order: 3; flex-basis: 100%; gap: 0; margin-inline: -10px; }
  .bar { justify-content: space-between; }
  .site-nav a { padding: 8px 10px; font-size: 16px; }
}

/* Type helpers */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.page-title { font-size: clamp(38px, 6vw, 58px); letter-spacing: -0.03em; }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 60ch; }
.page-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }

/* Buttons and pills */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { font-family: var(--font); font-weight: 600; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent; }
.btn-primary { background: var(--accent-strong); color: var(--on-accent); }
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--surface); }
.pill { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-wash); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }

/* Home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero .wm { font-size: clamp(72px, 12vw, 128px); }
.hero .tagline { font-size: 15px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.hero .intro { font-size: 20px; max-width: 44ch; }
@media (max-width: 820px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

.plot { background: var(--surface); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.plot svg { width: 100%; max-width: 380px; height: auto; align-self: center; }
.plot .axis { stroke: var(--ink-soft); stroke-width: 1.5; }
.plot .curve-f { stroke: var(--accent); stroke-width: 3; fill: none; }
.plot .curve-g { stroke: var(--ink); stroke-width: 2.5; fill: none; }
.plot .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.plot .lbl { font-family: var(--font); font-size: 15px; fill: var(--ink); }
.plot .lbl-f { fill: var(--accent-text); }
.plot figcaption { font-size: 14px; color: var(--ink-soft); text-wrap: pretty; }

/* Cards */
.section { margin-top: 80px; display: flex; flex-direction: column; gap: 20px; }
.section h2 { font-size: 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1.5px solid transparent; border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
a.card { color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--accent); background: var(--paper); }
a.card .more { margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 600; color: var(--accent-text); }
.card h3 { font-size: 22px; }
.card p { color: var(--ink-soft); }

/* App + subject tiles */
.item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.tile { width: 88px; height: 88px; border-radius: 24px; background: var(--accent-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile svg { width: 60px; height: 60px; }
.tile .t-axis { fill: none; stroke: var(--on-accent); stroke-opacity: 0.6; stroke-width: 2; }
.tile .t-ink { stroke: var(--on-accent); stroke-width: 3; fill: none; stroke-linecap: round; }
.tile .t-accent { stroke: var(--on-accent); stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tile .t-dot { fill: var(--on-accent); }
.tile-text { font-weight: 700; font-size: 28px; color: var(--on-accent); letter-spacing: -0.02em; }
.item-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.item-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.item-head h2, .item-head h3 { font-size: 28px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.note { font-size: 15px; color: var(--ink-soft); }
.brand-hero { font-weight: 700; }
@media (max-width: 480px) { .item { grid-template-columns: minmax(0, 1fr); } }

/* About */
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 62ch; font-size: 19px; }
.support { margin-top: 56px; background: var(--accent-wash); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.support h2 { font-size: 28px; }
.support p { color: var(--ink-soft); max-width: 56ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding-block: 24px; font-size: 15px; color: var(--ink-soft); }
.site-footer .wm { font-size: 22px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer nav a { color: var(--ink-soft); }
.contact-address { font-size: 22px; font-weight: 600; }
.contact-address a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
