/* ŁSSE QR — styles of the public card page (shared with the panel preview).
   Light theme: brandbook (warm paper, graphite). Dark theme: tokens of sse.lodz.pl.
   Colour pairs are verified by tools/contrast-check.php — keep both in sync. */

/* ---------- Fonts (OFL, self-hosted) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/inter-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/inter-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: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/inter-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/inter-latin-ext-600-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: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/bricolage-grotesque-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/bricolage-grotesque-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; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/jetbrains-mono-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; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --font-heading: "Bricolage Grotesque", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  /* light — brandbook */
  --bg: #F5EFE6;            /* warm paper */
  --surface: #FFFFFF;
  --surface-2: #EEF1F5;
  --text-1: #262E3E;        /* graphite */
  --text-2: #4A5568;
  --text-3: #5B6577;
  --line: #DCE3EA;          /* cool mist — decorative only */
  --line-strong: #7A8494;   /* ≥ 3:1 for UI boundaries */
  --focus: #1D4F91;
  --on-accent: #FFFFFF;
  --shadow: 0 1px 2px rgb(38 46 62 / .06), 0 8px 24px rgb(38 46 62 / .06);
  --panel-bg: var(--surface);
  --panel-border: var(--line);
  --radius: .6875rem;
  --radius-lg: 1.25rem;
  --wash-strength: 14%;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* dark — sse.lodz.pl */
    --bg: #0A0E15;
    --surface: #12161D;
    --surface-2: #1A2130;
    --text-1: #F4F6F8;
    --text-2: #C7C7C7;
    --text-3: #A3A9B1;
    --line: #FFFFFF21;
    --line-strong: #6B7280;
    --focus: #8DB8F2;
    --on-accent: #0A0E15;
    --shadow: none;
    --panel-bg: linear-gradient(155deg, #c1d8ff0f, #4a6fab1a), #12161Dcc;
    --panel-border: #FFFFFF21;
    --wash-strength: 22%;
  }
}

/* Accent pairs (Shared\Accents) — light value first, dark second */
.accent-graphite     { --accent-light: #262E3E; --accent-dark: #DCE3EA; }
.accent-red-brick    { --accent-light: #B5401C; --accent-dark: #E36D49; }
.accent-green        { --accent-light: #007760; --accent-dark: #00A888; }
.accent-bright-red   { --accent-light: #C82E16; --accent-dark: #EC6550; }
.accent-tech-mint    { --accent-light: #1D7470; --accent-dark: #2EB5AF; }
.accent-bright-green { --accent-light: #457432; --accent-dark: #7DBC63; }
.accent-gold-sand    { --accent-light: #8E602C; --accent-dark: #C78C4A; }
.accent-ocean        { --accent-light: #2D6BAE; --accent-dark: #5994D4; }
.accent-violet       { --accent-light: #6C5BA7; --accent-dark: #9589C0; }
.accent-berry        { --accent-light: #A63A6B; --accent-dark: #CE739C; }

body { --accent: var(--accent-light, #B5401C); }
@media (prefers-color-scheme: dark) {
  body { --accent: var(--accent-dark, #E36D49); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-1);
  background-color: var(--bg);
  background-image:
    radial-gradient(min(55rem, 140vw) 28rem at 50% -6rem, color-mix(in srgb, var(--accent) var(--wash-strength), transparent), transparent 70%);
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.1; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .02em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--surface); color: var(--text-1);
  padding: .75rem 1rem; border-radius: var(--radius); border: 2px solid var(--focus);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Top bar ---------- */
.topbar {
  width: 100%; max-width: 36rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem .5rem;
}
.topbar__brand { display: inline-flex; color: var(--text-1); min-height: 44px; align-items: center; }
.topbar__brand .logo { height: 40px; width: auto; display: block; }
.topbar__lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 .75rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  text-decoration: none; color: var(--text-1); font-size: .875rem;
}
.topbar__lang:hover { background: var(--surface-2); }

main { flex: 1; width: 100%; max-width: 36rem; margin: 0 auto; padding: .5rem 1.25rem 2rem; }

/* ---------- Card ---------- */
.card { display: flex; flex-direction: column; gap: 1rem; }
.card__hero { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1rem 0 .5rem; }
.card__photo {
  width: 8rem; height: 8rem; border-radius: var(--radius-lg); object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
  margin-bottom: .75rem;
}
.card__photo--initials {
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-heading); font-weight: 700; font-size: 2.75rem; letter-spacing: -.02em;
}
.card__eyebrow { color: var(--accent); font-size: .8125rem; text-transform: uppercase; line-height: 1.35; }
.card__name { font-size: clamp(2.125rem, 9vw, 3rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
.card__name--small { font-size: clamp(1.75rem, 7vw, 2.25rem); }
.card__title { color: var(--text-2); font-size: 1.0625rem; max-width: 32rem; }

/* ---------- Buttons ---------- */
.actions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
.actions > li:first-child { grid-column: 1 / -1; }
.actions > li:only-child, .actions > li:last-child:nth-child(2) { grid-column: 1 / -1; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .75rem 1.125rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-1);
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, border-color .15s ease;
  box-shadow: var(--shadow);
}
.btn .icon { width: 1.375rem; height: 1.375rem; flex: none; color: var(--accent); }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary .icon { color: currentColor; }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text-1)); }
.btn--wide { width: 100%; justify-content: flex-start; }
.btn__hint { margin-left: auto; font-size: .8125rem; color: var(--text-2); font-weight: 500; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) {
  .panel { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
.panel__label { font-size: .8125rem; text-transform: uppercase; color: var(--text-2); font-weight: 500; margin-bottom: .625rem; }

.navigate { display: flex; flex-direction: column; gap: .75rem; }
.navigate .panel__label { margin-bottom: 0; }
.navigate__place { font-size: 1.0625rem; }

details > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: .5rem;
  min-height: 44px; font-weight: 600;
}
details > summary::-webkit-details-marker { display: none; }
.icon--chevron { width: 1.25rem; height: 1.25rem; margin-left: auto; transition: transform .2s ease; }
details[open] > summary .icon--chevron { transform: rotate(180deg); }
.navigate__choose summary { color: var(--text-1); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.navigate__apps { list-style: none; margin: .25rem 0 .5rem; padding: 0; display: grid; gap: .5rem; }
.navigate__apps a {
  display: flex; align-items: center; min-height: 44px; padding: .5rem .875rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
}
.navigate__apps a[aria-current="true"] { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.navigate__apps a[aria-current="true"]::after { content: "✓"; margin-left: auto; color: var(--accent); }
.navigate__note { color: var(--text-2); font-size: .875rem; }

.details { margin: 0; display: grid; gap: .75rem; }
.details > div { display: grid; gap: .125rem; }
.details dt { color: var(--text-2); font-size: .875rem; }
.details dd { margin: 0; font-size: 1.0625rem; overflow-wrap: anywhere; }
.details dd a { display: inline-block; min-height: 24px; }

.links { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .5rem 1rem;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-1);
  font: 600 .9375rem/1 var(--font-body); text-decoration: none; cursor: pointer;
}
.chip .icon { width: 1.25rem; height: 1.25rem; color: var(--accent); }
.chip:hover { border-color: var(--accent); }
.status:empty { display: none; }
.status { margin-top: .75rem; color: var(--text-1); font-weight: 600; }

.bio { color: var(--text-1); }

.qr-share summary .icon:first-child { color: var(--accent); }
.qr-share__img { display: block; margin: 1rem auto .5rem; width: min(240px, 100%); height: auto; background: #fff; padding: 12px; border-radius: var(--radius); }
.qr-share__url { text-align: center; color: var(--text-2); font-size: .875rem; overflow-wrap: anywhere; }

.card--notice .card__title { font-size: 1.125rem; }

/* ---------- Prose (accessibility statement) ---------- */
.prose { padding-top: 1rem; }
.prose h1 { font-size: clamp(1.875rem, 7vw, 2.5rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.25rem; margin: 1.75rem 0 .5rem; }
.prose p, .prose ul { margin: 0 0 .75rem; }
.prose a { color: var(--text-1); }

/* ---------- Footer ---------- */
.site-footer {
  width: 100%; max-width: 36rem; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-2); font-size: .875rem; display: grid; gap: .25rem;
}
.site-footer__org { color: var(--text-1); font-weight: 600; }
.site-footer__links { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer a { display: inline-block; min-height: 24px; color: var(--text-1); }

/* ---------- Wider screens ---------- */
@media (min-width: 40rem) {
  .card__hero { padding-top: 2rem; }
  .actions { grid-template-columns: repeat(3, 1fr); }
  .actions > li:first-child { grid-column: auto; }
  .actions > li:only-child { grid-column: 1 / -1; }
  .actions > li:last-child:nth-child(2) { grid-column: auto; }
}

/* ---------- User preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .chip, .panel, .navigate__apps a, .topbar__lang { border: 1px solid ButtonText; }
  .btn--primary { forced-color-adjust: none; background: ButtonText; color: ButtonFace; }
  .card__photo--initials { forced-color-adjust: none; background: CanvasText; color: Canvas; }
  :focus-visible { outline-color: Highlight; }
  body { background-image: none; }
}
@media print {
  body { background: #fff; color: #000; }
  .actions, .navigate__choose, .links, .skip-link, .topbar__lang { display: none; }
}
