:root {
  --ink: #12332D;
  --ink-2: #1A443C;
  --ink-3: #2B5B51;
  --paper: #EDF0EA;
  --paper-2: #E1E6DD;
  --card: #F7F8F4;
  --brass: #A9834A;
  --brass-2: #D0B27A;
  --brass-ink: #6F5428;
  --text: #1B2321;
  --muted: #55625D;
  --line: #C8D0C5;
  --on-ink: #EEF2EC;
  --on-ink-muted: #A8BDB5;
  --up: #2E6A4E;
  --down: #9B3D2F;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(2rem, 3.4vw, 2.75rem);
  --step-3: clamp(2.7rem, 4.6vw, 4.5rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius-control: 999px;
  --radius-panel: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--sans);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
address { font-style: normal; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 6px;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- komunikat od kantoru ---------- */
.notice {
  background: var(--brass-2); color: var(--ink);
  font-size: var(--step--1); font-weight: 500; text-align: center;
  padding: 10px var(--gutter);
}

/* ---------- nagłówek ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 22px; padding-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--ink); color: var(--brass-2); padding: 3px;
}
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; letter-spacing: 0; }
.brand-text span { font-size: var(--step--1); color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 18px; }

.status { font-family: var(--sans); font-weight: 400; letter-spacing: 0; line-height: 1.4; display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); color: var(--muted); }
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--down); flex: none;
}
.status.is-open::before { background: var(--up); box-shadow: 0 0 0 4px rgb(46 106 78 / .15); }
.status:empty { display: none; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-control);
  font: 500 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-3); }
.btn-secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--ink); color: var(--on-ink); }
.btn-quiet { border-color: var(--line); color: var(--ink); background: transparent; min-height: 40px; padding: 0 16px; }
.btn-quiet:hover { border-color: var(--ink); }

/* ---------- pierwszy ekran ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(28px, 5vw, 72px); align-items: start;
  padding-top: clamp(16px, 4vw, 56px); padding-bottom: clamp(56px, 8vw, 112px);
}
.hero-copy { padding-top: clamp(8px, 3vw, 40px); }
.hero h1 { font-size: var(--step-3); font-weight: 600; color: var(--ink); max-width: 9ch; }
.lede { margin-top: 24px; font-size: var(--step-1); line-height: 1.5; color: var(--text); max-width: 32ch; }
.hero-address {
  margin-top: 32px; padding-left: 18px; border-left: 2px solid var(--brass);
  font-size: var(--step-0); line-height: 1.5;
}
.hero-address span { color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-status { margin-top: 18px; }

/* ---------- tablica kursów ---------- */
.board {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--on-ink);
  border-radius: var(--radius-panel);
  padding: 0 clamp(18px, 3vw, 40px);
  box-shadow: 0 1px 0 rgb(255 255 255 / .06) inset, 0 30px 60px -30px rgb(18 51 45 / .55);
}
.board::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none; z-index: -1;
  border: 1px solid rgb(208 178 122 / .28); border-radius: 2px;
}
.board-band { color: var(--brass-2); opacity: .38; height: 28px; margin: 18px -4px 0; }
.board-band svg { width: 100%; height: 100%; }
.board-band.is-bottom { margin: 6px -4px 18px; }
.board-rosette {
  position: absolute; z-index: -1; width: 560px; height: 560px;
  right: -190px; top: -150px; color: var(--brass-2); opacity: .2;
}
.board-rosette path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js-anim .board-rosette path { animation: draw 2.6s cubic-bezier(.4, 0, .2, 1) both; }
.js-anim .board-rosette path:nth-child(3n) { animation-delay: .15s; }
.js-anim .board-rosette path:nth-child(3n+1) { animation-delay: .3s; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js-anim .board-rosette path { animation: none; } }

.board-head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 20px;
  padding: 22px 0 14px;
}
.board-head h2 { font-size: var(--step-2); color: var(--on-ink); }
.board-head p { font-size: var(--step--1); color: var(--on-ink-muted); }

.rates { width: 100%; border-collapse: collapse; }
.rates th, .rates td { padding: 13px 0; text-align: left; vertical-align: middle; }
.rates thead th {
  font: 500 var(--step--1)/1.3 var(--sans); color: var(--on-ink-muted);
  padding-top: 6px; padding-bottom: 10px; border-bottom: 1px solid rgb(208 178 122 / .35);
}
.rates tbody tr + tr th, .rates tbody tr + tr td { border-top: 1px solid rgb(238 242 236 / .09); }
.rates .num { text-align: right; padding-left: 12px; }
.rates td.num { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.r-frac { display: inline-block; width: 2.6em; text-align: left; }
.rates td.sell { color: var(--brass-2); }
.rates .trend-col { text-align: right; padding-left: 20px; width: 1%; white-space: nowrap; }
.rates .trend {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  color: var(--on-ink-muted); font-size: var(--step--1);
}
.rates .trend .spark { color: var(--brass-2); opacity: .9; }
.rates .trend .chg { min-width: 4.4em; text-align: right; }

.cur-cell { display: flex; align-items: center; gap: 14px; }
.cur-name { display: grid; line-height: 1.2; }
.cur-name strong { font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; }
.cur-name span { font-size: var(--step--1); color: var(--on-ink-muted); font-weight: 400; }

.coin {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 1.35rem/1 var(--serif); color: var(--brass-2);
  border: 1px solid rgb(208 178 122 / .55);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px rgb(208 178 122 / .3);
}
.coin-sm { font-size: 1rem; }

tr.flash td, tr.flash th { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: rgb(208 178 122 / .22); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.flash td, tr.flash th { animation: none; } }

.board-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px;
  padding: 16px 0 4px; margin-top: 4px; border-top: 1px solid rgb(208 178 122 / .35);
  font-size: var(--step--1); color: var(--on-ink-muted); line-height: 1.45;
}
.board-foot b { color: var(--on-ink); font-weight: 500; }
.board-demo { grid-column: 1 / -1; color: var(--brass-2); }
.board-msg { padding: 32px 0; color: var(--on-ink-muted); }
.board-msg a { color: var(--brass-2); }

/* ---------- sekcje ---------- */
.section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.section-head h2 { font-size: var(--step-2); color: var(--ink); }
.section-head p { margin-top: 14px; color: var(--muted); max-width: 46ch; }

/* ---------- kalkulator ---------- */
.calc-band { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calc { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.calc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: clamp(20px, 3vw, 36px); }

.seg { display: inline-flex; padding: 4px; border-radius: var(--radius-control); background: var(--paper-2); border: 1px solid var(--line); }
.seg button {
  font: 500 0.95rem/1 var(--sans); color: var(--muted); background: transparent; border: 0;
  min-height: 40px; padding: 0 18px; border-radius: var(--radius-control); cursor: pointer;
}
.seg button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }

.calc-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: end; margin-top: 26px; }
.field { min-width: 0; }
.field label { display: block; font-size: var(--step--1); color: var(--muted); margin-bottom: 8px; }
.field-box {
  display: flex; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; min-height: 64px; padding: 0 6px 0 16px;
}
.field-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(18 51 45 / .12); }
.field-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 500 1.6rem/1 var(--sans); color: var(--text); letter-spacing: -0.01em; padding: 12px 0;
}
.field-box select, .field-box .unit {
  font: 600 1rem/1 var(--sans); color: var(--ink); border: 0; background-color: var(--paper-2);
  border-radius: 8px; padding: 12px 12px; letter-spacing: .02em;
}
.field-box select { cursor: pointer; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2312332D' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.calc-swap {
  width: 48px; height: 48px; margin-bottom: 8px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.calc-swap:hover { border-color: var(--ink); }
.calc-swap svg { width: 20px; height: 20px; }
.calc-rate { margin-top: 18px; color: var(--muted); font-size: var(--step--1); }
.calc-rate b { color: var(--text); font-weight: 600; }
.calc-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
}
.calc-foot p { font-size: var(--step--1); color: var(--muted); max-width: 40ch; }

/* ---------- dojazd ---------- */
.visit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); }
.visit-address { margin-top: 0; font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; color: var(--ink); }
.visit-hint { margin-top: 10px; color: var(--muted); }
.contact { margin: 30px 0 0; display: grid; gap: 0; }
.contact div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.contact div:last-child { border-bottom: 1px solid var(--line); }
.contact dt { color: var(--muted); font-size: var(--step--1); padding-top: 2px; }
.contact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.contact a { text-decoration-color: var(--brass); text-underline-offset: 4px; }
.contact a:hover { color: var(--ink-3); }

.hours-title { margin-top: 40px; font-size: 1.6rem; color: var(--ink); display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hours { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: var(--step-0); }
.hours th, .hours td { padding: 7px 0; text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr.today th, .hours tr.today td { font-weight: 600; color: var(--ink); }
.hours tr.today th::after { content: " (dziś)"; font-weight: 400; color: var(--muted); }
.hours .closed { color: var(--muted); }

.map {
  position: relative; display: block; min-height: 460px; height: 100%;
  border-radius: var(--radius-panel); overflow: hidden; text-decoration: none;
  background: var(--paper-2); border: 1px solid var(--line);
}
.map iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none;
  filter: grayscale(1) sepia(.18) hue-rotate(95deg) saturate(.9) contrast(.95);
}
.map-pin { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; transform: translate(-50%, -50%); color: var(--ink); pointer-events: none; }
.map-pin::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgb(237 240 234 / .55); }
.map-pin svg { position: relative; }
.map-cta {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--on-ink); padding: 16px 20px; border-radius: 10px;
  font-weight: 500;
}
.map-cta small { display: block; color: var(--on-ink-muted); font-weight: 400; font-size: var(--step--1); }
.map:hover .map-cta, .map:focus-visible .map-cta { background: var(--ink-3); }

/* ---------- zdjęcia: droga do okienka ---------- */
.find {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr);
  gap: clamp(20px, 3vw, 40px); align-items: start;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.find-intro { align-self: start; }
.find-intro p { max-width: 34ch; }
.photo { margin: 0; }
.photo-open {
  display: block; width: 100%; padding: 0; border: 0; background: var(--paper-2);
  border-radius: var(--radius-panel); overflow: hidden; cursor: zoom-in; position: relative;
  aspect-ratio: 3 / 4;
}
.photo-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
/* ramka jak na banknocie: cienka linia mosiądzu wewnątrz zdjęcia */
.photo-open::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid rgb(208 178 122 / .75); border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(18 51 45 / .12) inset;
}
.photo-open:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .photo-open img { transition: none; } .photo-open:hover img { transform: none; } }
.photo figcaption { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; }
.photo figcaption b { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.photo figcaption span:last-child { font-size: var(--step--1); color: var(--muted); line-height: 1.45; }
.photo-step {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 600 1rem/1 var(--serif); color: var(--brass-ink); border: 1px solid var(--brass);
  margin-top: 1px;
}

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 820px); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgb(12 30 26 / .86); }
.lightbox img { display: block; max-width: 100%; max-height: 88vh; width: auto; height: auto; border-radius: var(--radius-panel); box-shadow: 0 0 0 1px rgb(208 178 122 / .45), 0 30px 80px rgb(0 0 0 / .45); }
.lightbox[open] { animation: lb-in .22s ease-out; }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }
.lightbox-close {
  position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgb(208 178 122 / .6); background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center; cursor: pointer;
}

/* ---------- stopka ---------- */
.foot { background: var(--ink); color: var(--on-ink-muted); font-size: var(--step--1); }
.foot-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding-top: 36px; padding-bottom: 36px; }
.foot-seal { width: 72px; height: 72px; color: var(--brass-2); opacity: .7; }
.foot strong { color: var(--on-ink); font-family: var(--serif); font-size: 1.3rem; font-weight: 600; display: block; }
.foot a { color: var(--on-ink); text-decoration-color: rgb(208 178 122 / .6); text-underline-offset: 3px; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- pasek akcji na telefonie ---------- */
.dock { display: none; }

@media (max-width: 1120px) {
  .hero, .calc, .visit { grid-template-columns: 1fr; }
  .find { grid-template-columns: 1fr 1fr; }
  .find-intro { grid-column: 1 / -1; }
  .hero h1 { max-width: 12ch; }
  .map { min-height: 380px; }
}

@media (max-width: 640px) {
  body { padding-bottom: 76px; }
  .top { padding-top: 14px; padding-bottom: 14px; }
  .top-right .btn { display: none; }
  .brand-text span { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
  .top-right .status { display: none; }
  .board { padding: 0 16px; margin: 0 calc(var(--gutter) * -1); border-radius: 0; box-shadow: none; }
  .board::after { inset: 6px; }
  .board-rosette { width: 420px; height: 420px; right: -170px; top: -120px; }
  .rates .trend-col, .rates .trend-cell { display: none; }
  .coin { width: 32px; height: 32px; font-size: 1.05rem; }
  .coin-sm { font-size: .9rem; }
  .cur-cell { gap: 10px; }
  .rates td.num { font-size: 1.08rem; }
  .r-frac { width: 2.3em; }
  .cur-name span { font-size: .78rem; }
  .board-foot { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; gap: 10px; }
  .calc-swap { margin: 0 auto; transform: rotate(90deg); }
  .seg { display: flex; } .seg button { flex: 1; padding: 0 10px; }
  .foot-inner { grid-template-columns: 1fr; }
  .find { gap: 14px; }
  .photo figcaption { gap: 10px; }
  .photo figcaption b { font-size: 1.15rem; }
  .photo-step { width: 26px; height: 26px; font-size: .9rem; }
  .lightbox-close { top: 8px; right: 8px; }
  .foot-links { justify-content: flex-start; }
  .dock {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--ink); padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgb(208 178 122 / .35);
  }
  .dock a {
    display: grid; justify-items: center; gap: 4px; padding: 6px 4px; border-radius: 8px;
    color: var(--on-ink); text-decoration: none; font-size: .8rem; font-weight: 500;
  }
  .dock a svg { width: 22px; height: 22px; color: var(--brass-2); }
  .dock a:active { background: var(--ink-3); }
}
