/* ===========================================================================
   Not Bad Technology — one stylesheet, four pages.
   Order: fonts · tokens · base · layout · components · document · footer ·
   breakpoints. Breakpoints live at the bottom, ascending, and there are only
   the nine the spec allows: 560 620 700 720 760 860 900 1000 1080.
   =========================================================================== */

/* --- Fonts. Self-hosted: no third-party request, no consent banner. -------- */

@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/poppins-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: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/poppins-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: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-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;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  --paper:#fbfaf8; --paper-2:#f1efea;
  --ink:#14151a; --ink-2:#4a4b54; --muted:#6b6c75;
  --rule:rgba(20,21,26,.12); --rule-strong:#14151a;
  --accent:#4522d9; --accent-hover:#2f16a3; --accent-soft:#cfc4ff; --on-accent:#fff;
  --plate:#101116; --plate-ink:#ededf0; --plate-muted:#9a9aa6; --plate-link:#c6bcff;
  --display:"Poppins","Segoe UI",system-ui,sans-serif;
  --text:"IBM Plex Sans","Segoe UI",system-ui,sans-serif;
  --mono:ui-monospace,SFMono-Regular,"IBM Plex Mono",Menlo,monospace;
  --shot:rgba(20,21,26,.1);
  --pad:20px;
}

/* Hidden Gem is the same house, repainted. Only custom properties move. */
.theme-hg {
  --paper:#0d1826; --paper-2:#0a1420;
  --ink:#f3f7fb; --ink-2:#c8d6e3; --muted:#92a8bd;
  --rule:rgba(126,220,232,.2); --rule-strong:rgba(126,220,232,.55);
  --accent:#f2b23e; --accent-hover:#ffc65f; --accent-soft:#7edce8; --on-accent:#0d1826;
  --shot:rgba(255,255,255,.08);
}

/* --- Base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
  text-wrap: pretty;
}

p { margin: 0; }
ul { margin: 0; }

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

/* One focus rule for the whole site. */
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; top: 12px; left: -9999px; z-index: 20;
  display: inline-flex; align-items: center; min-height: 48px;
  background: var(--plate); color: var(--plate-ink);
  padding: 12px 18px; border-radius: 3px;
  font: 500 15px/1 var(--text); text-decoration: none;
}
.skip:focus { left: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --- Type scale ----------------------------------------------------------- */

.h1, .h2, .h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
  text-wrap: pretty;
}
.h1 { font-size: clamp(31px, 6.4vw, 56px); }
.h2 { font-size: clamp(23px, 3.4vw, 31px); }
.h3 { font-size: clamp(19px, 2.5vw, 22px); }

.lede {
  font-size: clamp(16px, 2.1vw, 19px);
  line-height: 1.65;
  max-width: 54ch;
  color: var(--ink-2);
}

.label {
  font: 600 11px/1.4 var(--text);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.band-note { font-size: 13.5px; color: var(--muted); max-width: 30ch; }

.pill {
  display: inline-block;
  font: 600 10.5px/1 var(--text);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 9px;
  vertical-align: 2px;
}

.mono { font-family: var(--mono); }

/* --- Layout --------------------------------------------------------------- */

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--pad); }

/* The one ratio the whole page is built on: label rail, then content. */
.cols, .band, .pointer { display: grid; gap: clamp(22px, 4vw, 48px); }

/* House style: a 2px opener, then hairlines between items. */
.rail, .band-rows { border-top: 2px solid var(--rule-strong); }
/* .facts bez gornej kreski: sekcja "What is in it" ma juz wlasna
   kreske z .section, a druga tuz pod nia rozbijala uklad. */
.facts { border-top: 0; }
.rail > div, .facts > div { padding-block: 14px; }
.facts > div { padding-block: 18px; }
/* Pierwszy kafel startuje ROWNO z etykieta obok, tak samo jak treść
   w .section-body. Bez tego padding-block nizej spychal go o 18 px
   i obie sekcje zaczynaly sie na roznych wysokosciach. */
.facts > div:first-child { padding-block-start: 0; }
.rail > div + div, .facts > div + div { border-top: 1px solid var(--rule); }

.rail > div { display: grid; gap: 3px; }
.rail-value { font-size: 15px; color: var(--ink-2); }

.facts h3 { margin-bottom: 6px; }
.facts p { color: var(--ink-2); max-width: 62ch; }

/* --- Header --------------------------------------------------------------- */

.head { border-bottom: 1px solid var(--rule); }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 48px; }
.brand-plate {
  width: 38px; height: 38px; flex: none;
  background: var(--plate); border-radius: 3px;
  display: grid; place-items: center;
}
.brand-plate img { width: 23px; display: block; }
.theme-hg .brand-plate { background: #060f19; box-shadow: inset 0 0 0 1px var(--rule); }
.brand-name { display: none; font: 600 15px/1 var(--display); letter-spacing: -.02em; }

.nav { display: flex; align-items: center; gap: 16px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 48px;
  font: 500 14px/1 var(--text); color: var(--muted); text-decoration: none;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* --- Hero ----------------------------------------------------------------- */

.hero {
  padding-block: clamp(44px, 9vw, 108px) clamp(36px, 6vw, 72px);
  display: grid; gap: clamp(22px, 4vw, 48px);
}
.hero-main { display: grid; gap: clamp(20px, 3vw, 28px); align-content: start; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }

/* --- Buttons and links ---------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  font: 500 15px/1.2 var(--text); text-decoration: none;
  color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.link-mail {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--accent); text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 4px; text-decoration-thickness: 1px;
  font-weight: 500;
}
.link-mail:hover { color: var(--ink); text-decoration-color: var(--ink); }

.arrow-link {
  display: inline-flex; align-items: center; min-height: 48px; gap: 8px;
  font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--rule); text-underline-offset: 5px;
}
.arrow-link:hover { text-decoration-color: var(--accent); }

/* --- Sections on paper ---------------------------------------------------- */

.section { padding-block: clamp(34px, 5.5vw, 64px); border-top: 1px solid var(--rule); }
.section-body { display: grid; gap: 20px; }
.section-body p { color: var(--ink-2); max-width: 64ch; }
.section-body strong { color: var(--ink); font-weight: 600; }

.pointer { padding-block: clamp(34px, 5.5vw, 64px); border-top: 1px solid var(--rule); }

/* --- Portfolio bands ------------------------------------------------------ */

.bands { padding-block: clamp(10px, 2vw, 20px) clamp(20px, 4vw, 40px); }
/* Pasma nie mają linii dzielącej: każde otwiera 2px reguła nad wierszami,
   a odstęp niesie separację. Kreska między nimi byłaby trzecim sygnałem. */
.band { padding-block: clamp(30px, 4.5vw, 52px); }

.band-head { align-content: start; }
.band-head h2 { display: flex; align-items: baseline; gap: .45em; margin-bottom: 10px; }
.band-num { font-family: var(--mono); font-size: .62em; color: var(--accent); letter-spacing: 0; }
.band-head .label { display: block; margin-bottom: 8px; }

.proj {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px 16px;
  align-items: center;
  padding: 20px 6px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.proj-icon { grid-row: 1 / span 2; align-self: center; }
.proj img { width: 100%; display: block; border-radius: 15px; }

/* Must sit after `.proj img`, or equal specificity stretches the mark. */
.proj-plate {
  aspect-ratio: 1; background: var(--plate); border-radius: 15px;
  display: grid; place-items: center;
}
.proj-plate img { width: 46%; border-radius: 0; }

.proj-title { display: block; font: 600 clamp(19px, 2.5vw, 22px)/1.2 var(--display); letter-spacing: -.025em; }
.proj-title .pill { margin-left: 10px; }
.proj-desc { display: block; margin-top: 6px; font-size: 14.5px; color: var(--ink-2); max-width: 58ch; }
.proj-go { grid-column: 2; font-size: 14px; color: var(--muted); }
a.proj:hover .proj-title { color: var(--accent); }
a.proj:hover .proj-go { color: var(--accent); }

/* --- Accent panel (home only) --------------------------------------------- */

.panel {
  background: var(--accent); color: var(--on-accent);
  border-radius: 4px;
  padding: clamp(28px, 5vw, 48px) clamp(22px, 4vw, 44px);
  margin-block: clamp(34px, 5.5vw, 64px);
  display: grid; gap: 24px; align-items: end;
}
.panel .label { color: var(--accent-soft); margin-bottom: 14px; display: block; }
.panel .btn { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent); }
.panel .btn:hover { background: transparent; border-color: var(--on-accent); color: var(--on-accent); }

/* --- Product page --------------------------------------------------------- */

.crumb { padding-block: 2px 0; font-size: 13px; color: var(--muted); }
.crumb a { display: inline-block; padding-block: 16px; text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumb span { padding-inline: 6px; }

.prod { padding-block: clamp(26px, 5vw, 52px) clamp(20px, 3vw, 28px); display: grid; gap: clamp(20px, 3vw, 30px); }
.prod-top { display: grid; gap: 20px; align-items: center; }
.prod-icon { width: 96px; height: 96px; border-radius: 21px; display: block; box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.prod-titles { display: grid; gap: 10px; }

.status { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1.4 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.meta { font-size: 14px; color: var(--muted); }
.meta a { display: inline-block; padding-block: 15px; color: var(--ink-2); text-underline-offset: 3px; }
.meta a:hover { color: var(--accent); }
.meta span { padding-inline: 6px; }

.store-soon {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 56px; padding: 10px 24px; border-radius: 10px;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  width: fit-content;
}
.store-soon b { font: 600 18px/1.25 var(--display); letter-spacing: -.02em; }
.store-soon small { font: 600 10.5px/1.4 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

.support-strip {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  font-size: 15px; color: var(--ink-2);
  margin-block: 0 clamp(26px, 4vw, 40px);
}
.support-strip a { color: var(--accent); text-underline-offset: 3px; }
.support-strip a:hover { color: var(--ink); }

/* --- Gallery -------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62vw;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: 4px 14px;
  padding-inline: var(--pad);
  margin-inline: calc(-1 * var(--pad));
}
.shot { scroll-snap-align: start; margin: 0; }
.shot img {
  width: 100%; height: auto; display: block;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.shot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* --- Support section ------------------------------------------------------ */

.support-mail {
  font: 600 clamp(19px, 2.6vw, 26px)/1.3 var(--display);
  letter-spacing: -.02em;
  display: inline-flex; align-items: center; min-height: 48px;
}

/* --- Privacy document ----------------------------------------------------- */

.doc { display: grid; gap: 30px; padding-block: clamp(24px, 4vw, 44px) clamp(30px, 5vw, 60px); }

.note {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  padding: 14px 18px; font-size: 14.5px; color: var(--ink-2); max-width: 68ch;
}

.toc { align-self: start; }
.toc .label { display: block; padding-bottom: 10px; border-bottom: 2px solid var(--rule-strong); }
.toc ol { counter-reset: toc; list-style: none; margin: 0; padding: 0; }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--rule); }
.toc a {
  display: flex; gap: 10px; align-items: baseline;
  min-height: 48px; padding-block: 10px;
  font-size: 14px; color: var(--ink-2); text-decoration: none;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--accent); }
.toc a:hover { color: var(--accent); }

.prose { counter-reset: sec; display: grid; gap: 26px; max-width: 68ch; }
.prose h2 {
  font-size: clamp(19px, 2.5vw, 22px);
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.prose h2:first-of-type { padding-top: 0; border-top: 0; }
.prose h2::before { counter-increment: sec; content: counter(sec) ". "; color: var(--accent); }
.prose p { color: var(--ink-2); }
.prose ul { padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }

/* --- Potwierdzenie skopiowania adresu ------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 30;
  transform: translateX(-50%) translateY(8px);
  background: var(--plate); color: var(--plate-ink);
  padding: 13px 20px; border-radius: 999px;
  font: 500 14px/1 var(--text);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Footer --------------------------------------------------------------- */

.foot {
  background: var(--plate); color: var(--plate-ink);
  margin-top: clamp(32px, 6vw, 72px);
}
.foot-in { display: grid; gap: 28px; padding-block: clamp(32px, 5vw, 54px); }
.foot-logo { width: clamp(150px, 30vw, 200px); display: block; }
.foot-right { display: grid; gap: 14px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-nav a { color: var(--plate-link); font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; }
.foot-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot-legal { font-size: 13px; color: var(--plate-muted); }

/* ===========================================================================
   Breakpoints
   =========================================================================== */

/* 560 — the brand name earns its space. */
@media (min-width: 560px) {
  .brand-name { display: block; }
}

/* 620 — the project row gains its third column. */
@media (min-width: 620px) {
  .proj { grid-template-columns: 76px minmax(0, 1fr) auto; padding: 24px 6px; }
  .proj-icon { grid-row: auto; }
  .proj-go { grid-column: auto; justify-self: end; }
}

/* 700 — the product header goes side by side. */
@media (min-width: 700px) {
  .prod-top { grid-template-columns: auto minmax(0, 1fr); gap: 28px; }
  .prod-icon { width: 132px; height: 132px; border-radius: 29px; }
}

/* 720 — wider gutter, wider gallery columns. */
@media (min-width: 720px) {
  :root { --pad: 40px; }
  .gallery { grid-auto-columns: 40vw; }
}

/* 760 — the footer and the accent panel split in two. */
@media (min-width: 760px) {
  .foot-in { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .foot-right { justify-items: end; text-align: right; }
  .foot-nav { justify-content: flex-end; }
  .panel { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
  .panel .btn { justify-self: end; }
}

/* 860 — the label rail appears: hero, bands, .cols, .pointer. */
@media (min-width: 860px) {
  .cols, .band, .pointer { grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); }
  .hero { grid-template-columns: minmax(0, 1.55fr) minmax(240px, .85fr); }
  .hero .rail { align-self: start; }
}

/* 900 — the table of contents becomes a sidebar that follows you down. */
@media (min-width: 900px) {
  .doc { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); gap: clamp(22px, 4vw, 48px); }
  .toc { position: sticky; top: 24px; }
}

/* 1000 — galeria przestaje się przewijać i staje się siatką. Siedem zrzutów w
   sztywnych czterech kolumnach zostawiłoby jeden sam na końcu, więc ostatni rząd
   jest wyśrodkowany: układ czyta się jako 4 + 3, a nie 4 + 1 + pustka. */
@media (min-width: 1000px) {
  .gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px 18px;
    overflow: visible;
    padding-inline: 0;
    margin-inline: 0;
  }
  .shot { flex: 0 1 calc((100% - 3 * 18px) / 4); }
}

/* 1080 — widest gutter. */
@media (min-width: 1080px) {
  :root { --pad: 56px; }
}
