@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./fonts/bricolage-ext.woff2") format("woff2");
  font-weight: 500 800;
  unicode-range: U+0100-02FF, U+1E00-1EFF, U+20A0-20CF;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./fonts/bricolage.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("./fonts/instrument-ext.woff2") format("woff2");
  font-weight: 400 600;
  unicode-range: U+0100-02FF, U+1E00-1EFF, U+20A0-20CF;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("./fonts/instrument.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --cream: #f6f1e7;
  --paper: #fffdf8;
  --ink: #16233a;
  --ink-2: #3e4d66;
  --coral: #e4572e;
  --teal: #137a69;
  --disp: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.45;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.shot img { max-width: none; }

.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.brand-text {
  display: block;
  line-height: 1.05;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 18px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); }

h1 {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.lede { margin: 0 0 22px; color: var(--ink-2); max-width: 34em; font-size: 18px; }

.stores { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.stores img { height: 48px; width: auto; display: block; }
.store-ios img, .store-android img { height: 48px; width: auto; }
html[data-store="ios"] .store-android { display: none; }
html[data-store="android"] .store-ios { display: none; }

.note { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }

.shot {
  margin: 0;
  position: relative;
  background: transparent;
  overflow: hidden;
  isolation: isolate;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: top center;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}
.shot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to bottom, transparent 0%, var(--cream) 90%);
}

.hero-visual {
  position: relative;
  width: min(340px, 100%);
  justify-self: end;
}
.shot-hero { width: 100%; }
.shot-hero::after { /* overlay handles fade */ opacity: 1; }
.shot-mini::after { opacity: 1; }
.shot-pdf img {
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%),
    linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%),
    linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  mask-composite: intersect;
}
.shot-pdf::after {
  opacity: 1;
  height: 100%;
  background:
    linear-gradient(to bottom, transparent 55%, var(--cream) 92%),
    linear-gradient(to right, transparent 82%, var(--cream) 100%);
}

.section { padding: 4px 0 36px; }
.section h2 {
  font-family: var(--disp);
  font-size: 28px;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.faq { display: grid; gap: 0; border-top: 2px solid var(--ink); }
details {
  border-bottom: 2px solid var(--ink);
  padding: 14px 0;
}
summary {
  font-family: var(--disp);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-weight: 700;
  color: var(--coral);
  flex: none;
}
details[open] > summary::after { content: "\2013"; }
details p { margin: 8px 0 0; color: var(--ink-2); max-width: 40em; }

footer {
  padding: 20px 0 40px;
  font-size: 13px;
  color: var(--ink-2);
}

/* A: oś dnia — strona jest dniem */
.dir-os { background: var(--cream); }
.dir-os .page { position: relative; --p: 0; }
.dir-os .wrap, .dir-os nav, .dir-os .hero, .dir-os .section, .dir-os footer {
  position: relative;
  z-index: 1;
}
.dir-os .brand img {
  outline: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--coral);
}
.dir-os h1 {
  font-size: clamp(36px, 6.2vw, 56px);
  max-width: 14ch;
}
.dir-os .lede {
  font-size: 18px;
  max-width: 28em;
}
.dir-os .lede strong { color: var(--ink); font-weight: 600; }

.hero {
  display: grid;
  gap: 28px;
  padding: 20px 0 28px;
  align-items: start;
}
@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 36px;
    padding: 28px 0 36px;
    align-items: center;
  }
}

.day { padding-top: 0; }
.day-grid {
  display: grid;
  gap: 22px;
}
@media (min-width: 860px) {
  /* same right column as hero-visual so page axis = Dziś axis through PDF */
  .day-grid { grid-template-columns: minmax(0,1fr) 340px; align-items: start; gap: 36px; }
}
.day-main h2 { margin-bottom: 6px; }
.day-point {
  background: transparent;
  outline: 0;
  box-shadow: none;
  /* timeline text in Dziś starts ~48px; axis at ~6.4% of 340px */
  padding: 0 0 0 44px;
  position: relative;
}
.day-point h3 { margin: 10px 0 4px; font-family: var(--disp); font-size: 22px; }
.day-point p { margin: 0; color: var(--ink-2); font-size: 15px; }
.day-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 440px;
  align-items: start;
}
.day-mini article {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.day-mini article h3 {
  font-family: var(--disp);
  font-size: 15px;
  margin: 0;
  order: 2;
}
.day-mini .shot { order: 1; }
.shot-mini img {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}

.dir-os .faq { border-top: 0; }
.dir-os details { border: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); padding: 12px 0; }
.dir-os details[open] {
  background: var(--paper);
  margin: 0 0 12px;
  padding: 12px;
  outline: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

@media (max-width: 859px) {
  .dir-os .wrap { width: auto; margin: 0 16px; }
  .dir-os .hero { display: flex; flex-direction: column; gap: 16px; padding-bottom: 16px; }
  .dir-os .hero-visual { display: none; }
  .dir-os h1 { font-size: 34px; max-width: 14ch; }
  .nav-links { display: none; }
  .axis { display: none; }
}

/* B park: zeszyt whisper */
.dir-zeszyt { background: var(--cream); }
.dir-zeszyt .page {
  background: var(--paper);
  min-height: 100vh;
  border-left: 2px solid var(--coral);
  margin-left: 20px;
}
@media (max-width: 859px) {
  .dir-zeszyt .page { margin-left: 0; border-left: 0; }
}
.dir-zeszyt .shot { transform: none; }
.dir-zeszyt h1 { max-width: 12ch; }

.axis {
  position: absolute;
  left: 0;
  top: 0;
  height: 0;
  width: 14px;
  z-index: 3;
  pointer-events: none;
}
.axis-line,
.axis-fill {
  position: absolute;
  left: 6px;
  top: 0;
  width: 2px;
  height: 100%;
}
.axis-line {
  background: color-mix(in srgb, var(--ink) 26%, transparent);
}
.axis-fill {
  height: calc(var(--p) * 100%);
  background: var(--ink);
}
.axis-bead {
  position: absolute;
  left: 1px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  box-sizing: border-box;
  background: var(--coral);
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--ink);
  top: calc(var(--p) * 100%);
  z-index: 1;
}

@supports (animation-timeline: view()) {
  .day-mini .shot {
    animation: stamp-mini linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}
@keyframes stamp-mini {
  from { transform: translate(3px, 8px); opacity: 0.45; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .dir-os .page { --p: 1 !important; }
  .axis-fill { height: 100%; }
  .day-mini .shot { animation: none; }
}
