/* grafiki.com.pl — colours, type and status semantics follow the mobile app
   (ios/Grafiki/Assets.xcassets, App/Theme.swift). Corners stay small. */

/* Source Sans 3 (SIL OFL 1.1): humanist, easy to read in long text. One variable file per subset; latin-ext carries ą ć ę ł ń ś ź ż. */
@font-face { font-family: "Tekst"; src: url(../fonts/SourceSans3-latin.woff2) format("woff2"); font-weight: 200 900; font-display: swap; 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: "Tekst"; src: url(../fonts/SourceSans3-latin-ext.woff2) format("woff2"); font-weight: 200 900; font-display: swap; 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 {
  --tlo: #F4F6F8;
  --karta: #FFFFFF;
  --granat: #14303E;
  --granat-2: #24404D;
  --szary: #5F707B;          /* app Szary #71818C darkened for body-size contrast */
  --linia: #DCE3E8;
  --teal: #2EA68B;
  --teal-tekst: #1D7A65;     /* teal for text on white (4.9:1) */
  --teal-jasny: #DFF2EC;
  --ciemny: #0F2E28;
  --niebieski: #4A7DBD; --niebieski-jasny: #E7EFF9;
  --bursztyn: #B8701C;  --bursztyn-jasny: #FBEBD6;
  --czerwien: #D14B4B;  --czerwien-jasna: #FBE6E6;
  --r: 6px;
  --r-s: 4px;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tlo); color: var(--granat);
  font: 400 18px/1.6 "Tekst", system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-tekst); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--granat); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--granat); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 12px; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 800; }
h1 { font-size: clamp(40px, 5.6vw, 66px); letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: 20px; line-height: 1.55; color: var(--granat-2); max-width: 36em; }
.label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-tekst); }
.muted { color: var(--szary); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: var(--r-s); font: 700 16px/1 "Tekst", sans-serif; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-tekst); color: #fff; }
.btn-ghost { border-color: var(--granat); color: var(--granat); background: transparent; }
.btn-ghost:hover { background: var(--granat); color: #fff; }
.btn-light { background: #fff; color: var(--granat); }
.btn-light:hover { background: var(--teal-jasny); color: var(--granat); }

/* ---------- header ---------- */
.top { background: var(--tlo); border-bottom: 1px solid var(--linia); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--granat); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { color: var(--granat-2); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--granat); border-bottom-color: var(--teal); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.top-actions .panel { font-weight: 600; font-size: 15px; color: var(--granat-2); text-decoration: none; }
.top-actions .panel:hover { color: var(--granat); text-decoration: underline; }
.top-actions .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--linia); border-radius: var(--r-s); width: 44px; height: 40px; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--granat); margin: 0 auto; position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; } .menu-btn span::after { position: absolute; top: 6px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 88px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero h1 .q { color: var(--teal-tekst); }
.hero .lead { margin-top: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .stores { margin-top: 20px; font-size: 14px; color: var(--szary); }

/* The signature: a clinic's printed weekly duty board, with one doctor's row
   lifted into the phone. */
.board-stage { position: relative; padding: 28px 96px 40px 0; min-height: 500px; }
.board { background: var(--karta); border: 1px solid var(--linia); border-radius: var(--r); font-size: 13px; }
.board-head { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--linia); }
.board-head strong { font-size: 14px; }
.board-head span { color: var(--szary); }
.board table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board th, .board td { border-bottom: 1px solid var(--linia); border-right: 1px solid var(--linia); padding: 8px 8px; text-align: left; vertical-align: top; }
.board tr > :last-child { border-right: 0; }
.board tbody tr:last-child > * { border-bottom: 0; }
.board thead th { font-weight: 700; color: var(--szary); font-size: 12px; }
.board thead th:first-child { width: 136px; }
.board thead th b { color: var(--granat); font-size: 13px; }
.board tbody th { font-weight: 600; width: 136px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot { display: block; padding: 4px 6px; border-left: 3px solid var(--teal); background: #F6FAF9; line-height: 1.3; font-variant-numeric: tabular-nums; }
.slot small { display: block; color: var(--szary); font-size: 11.5px; }
.slot + .slot { margin-top: 4px; }
.slot.urlop { border-color: var(--niebieski); background: var(--niebieski-jasny); color: var(--niebieski); font-weight: 700; }
.slot.wstepnie { border-color: var(--bursztyn); background: var(--bursztyn-jasny); }
.slot.odwolane { border-color: var(--czerwien); color: var(--czerwien); text-decoration: line-through;
  background: repeating-linear-gradient(135deg, var(--czerwien-jasna) 0 6px, #fff 6px 12px); }
.board tr.me > * { background: var(--teal-jasny); }
.board tr.me th { box-shadow: inset 3px 0 0 var(--teal); }
.board tr.me .slot { background: #fff; }
.board-phone {
  position: absolute; right: 0; top: 0; width: 210px;
  border: 8px solid #0d1f1c; border-radius: 34px; overflow: hidden; background: #0d1f1c;
  box-shadow: 0 30px 60px -24px rgba(20, 48, 62, .45);
}
.board-phone img { border-radius: 26px; }
.board-note { margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--granat-2); padding-left: 14px; border-left: 2px solid var(--teal); max-width: 260px; }

@media (prefers-reduced-motion: no-preference) {
  .board tr.me > * { animation: lift 1.2s .4s both; }
  @keyframes lift { from { background: var(--karta); } to { background: var(--teal-jasny); } }
  .board-phone { animation: rise .8s .2s both cubic-bezier(.2, .7, .2, 1); }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
}

/* ---------- sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--linia); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: end; margin-bottom: 48px; }
.section-head .label { display: block; margin-bottom: 14px; }
.white { background: var(--karta); }

/* "instead of" strip */
.instead { padding: 36px 0; border-top: 1px solid var(--linia); background: var(--karta); }
.instead .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; }
.instead p { font-weight: 700; color: var(--szary); }
.instead s { color: var(--granat-2); text-decoration-color: var(--czerwien); text-decoration-thickness: 2px; font-weight: 700; font-size: 19px; }
.instead strong { font-size: 19px; color: var(--teal-tekst); }

/* feature + phone */
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.split.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.split.flip .phone-col { order: -1; }
.features { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--linia); }
.features li { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--linia); }
.features b { font-weight: 700; }
.features span { color: var(--granat-2); }
.phone { border: 8px solid #0d1f1c; border-radius: 38px; overflow: hidden; background: #0d1f1c; max-width: 320px; margin-inline: auto;
  box-shadow: 0 30px 60px -28px rgba(20, 48, 62, .4); }
.phone img { border-radius: 30px; }
.phone-col figcaption { text-align: center; margin-top: 16px; font-size: 14px; color: var(--szary); }
.coordinator { margin-top: 96px; }
.after-label { margin-top: 14px; }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.phones .phone { max-width: 260px; }

/* status legend — the same meanings the app uses */
.legend { margin-top: 64px; }
.legend h3 { margin-bottom: 20px; }
.legend dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--linia); border-left: 1px solid var(--linia); }
.legend div { padding: 18px 20px; border-right: 1px solid var(--linia); border-bottom: 1px solid var(--linia); background: var(--karta); }
.legend dt { margin-bottom: 8px; }
.legend dd { margin: 0; font-size: 15px; color: var(--granat-2); }
.chip { display: inline-block; padding: 3px 9px; border-radius: var(--r-s); font-size: 13px; font-weight: 700; border: 1px solid transparent; }
.chip.ok { color: var(--teal-tekst); border-color: var(--teal); background: #fff; }
.chip.draft { color: var(--szary); background: var(--tlo); border-color: var(--linia); }
.chip.leave { color: #fff; background: var(--niebieski); }
.chip.part { color: var(--niebieski); background: var(--niebieski-jasny); }
.chip.room { color: var(--bursztyn); background: var(--bursztyn-jasny); }
.chip.cancel { color: var(--czerwien); background: var(--czerwien-jasna); text-decoration: line-through; }

/* landscape */
.landscape { margin-top: 8px; }
.landscape .frame { border: 8px solid #0d1f1c; border-radius: 30px; overflow: hidden; background: #0d1f1c; max-width: 900px; margin-inline: auto;
  box-shadow: 0 30px 60px -30px rgba(20, 48, 62, .4); }
.landscape .frame img { border-radius: 22px; }

/* joining steps — a real sequence, hence numbers */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--granat); }
.steps li { padding: 22px 24px 0 0; position: relative; }
.steps li::before { content: counter(step); counter-increment: step; display: block; font-weight: 800; font-size: 15px; color: var(--teal-tekst); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.steps { counter-reset: step; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--granat-2); font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 56px; border: 1px solid var(--linia); background: var(--karta); border-radius: var(--r); }
.facts div { padding: 22px 24px; }
.facts div + div { border-left: 1px solid var(--linia); }
.facts b { display: block; font-size: 28px; letter-spacing: -0.02em; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.facts span { color: var(--granat-2); font-size: 15px; }

/* security list */
.secure { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 0; }
.secure div { padding: 20px 0; border-top: 1px solid var(--linia); }
.secure dt { font-weight: 700; margin-bottom: 4px; }
.secure dd { margin: 0; color: var(--granat-2); }

/* call to action band */
.band { background: var(--ciemny); color: #fff; padding: 80px 0; }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.band h2 { max-width: 16em; }
.band p { color: rgba(255,255,255,.75); margin-top: 12px; max-width: 34em; }

/* ---------- text pages ---------- */
.page-head { padding: 64px 0 40px; }
.page-head .lead { margin-top: 18px; }
.prose { max-width: 760px; padding-bottom: 96px; }
.prose h2 { font-size: 24px; margin: 44px 0 12px; letter-spacing: -0.015em; scroll-margin-top: 90px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--granat-2); }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose .meta { font-size: 15px; color: var(--szary); }
.prose .todo { background: var(--bursztyn-jasny); padding: 0 4px; }
.toc { border: 1px solid var(--linia); background: var(--karta); border-radius: var(--r); padding: 18px 22px; margin-bottom: 8px; }
.toc ol { margin: 8px 0 0; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; }
.prose-wide { padding-bottom: 96px; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: start; }
.aside { position: sticky; top: 92px; border-left: 2px solid var(--teal); padding-left: 20px; font-size: 15px; }
.aside p + p { margin-top: 10px; }

/* FAQ */
.faq details { border-top: 1px solid var(--linia); }
.faq details:last-child { border-bottom: 1px solid var(--linia); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; font-weight: 600; color: var(--teal-tekst); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 22px; color: var(--granat-2); max-width: 44em; }
.faq .answer p + p { margin-top: 10px; }

/* ---------- form ---------- */
.form { background: var(--karta); border: 1px solid var(--linia); border-radius: var(--r); padding: 32px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.form legend, .form label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 8px; }
.form .opt { font-weight: 500; color: var(--szary); }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea {
  width: 100%; font: 500 16px/1.4 "Tekst", sans-serif; color: var(--granat); background: #fff;
  border: 1px solid #C5D0D7; border-radius: var(--r-s); padding: 11px 12px;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,166,139,.2); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .field { margin-bottom: 20px; }
.radios { display: grid; gap: 8px; }
.radios label { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 0; padding: 10px 12px; border: 1px solid var(--linia); border-radius: var(--r-s); cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--teal); background: var(--teal-jasny); }
.radios input, .consent input { accent-color: var(--teal); width: 18px; height: 18px; }
.consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; font-size: 15px !important; color: var(--granat-2); }
.err { color: var(--czerwien); font-size: 14px; font-weight: 600; margin-top: 6px; }
.field.bad input, .field.bad textarea, .field.bad select { border-color: var(--czerwien); }
.alert { padding: 14px 16px; border-radius: var(--r-s); margin-bottom: 22px; font-weight: 600; }
.alert.ok { background: var(--teal-jasny); color: var(--teal-tekst); border-left: 4px solid var(--teal); }
.alert.bad { background: var(--czerwien-jasna); color: var(--czerwien); border-left: 4px solid var(--czerwien); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.foot { background: var(--granat); color: rgba(255,255,255,.78); padding: 56px 0 32px; font-size: 15px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; color: #fff; }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 12px; color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li + li { margin-top: 8px; }
.foot .brand { color: #fff; margin-bottom: 12px; }
.foot .legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero .wrap, .section-head, .split, .split.flip, .layout-aside { grid-template-columns: 1fr; }
  .section-head { gap: 18px; }
  .split.flip .phone-col { order: 0; }
  .aside { position: static; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .legend dl { grid-template-columns: 1fr 1fr; }
  .foot .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1020px) and (min-width: 641px) {
  .board-stage { max-width: 760px; }
}
@media (max-width: 860px) {
  .nav, .top-actions { display: none; }
  .menu-btn { display: block; }
  .top.open .nav, .top.open .top-actions { display: flex; }
  .top.open .wrap { flex-wrap: wrap; padding-bottom: 16px; }
  .top.open .nav { flex-direction: column; order: 3; width: 100%; margin: 0; gap: 4px; }
  .top.open .top-actions { order: 4; width: 100%; margin: 0; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero { padding: 40px 0 64px; }
  .section { padding: 64px 0; }
  .lead { font-size: 18px; }
  .board .hide-sm { display: none; }
  .board thead th:first-child { width: 96px; }
  .board-phone { position: relative; right: auto; top: auto; margin: 20px auto 0; width: 200px; }
  .board-stage { padding: 0; }
  .board-note { display: none; }
  .features li { grid-template-columns: 1fr; gap: 4px; }
  .steps, .legend dl, .facts, .secure, .phones { grid-template-columns: 1fr; }
  .facts div + div { border-left: 0; border-top: 1px solid var(--linia); }
  .form { padding: 22px; }
  .form .row { grid-template-columns: 1fr; gap: 0; }
  .toc ol { columns: 1; }
  .foot .cols { grid-template-columns: 1fr; }
}
