/* Pohlidam.to landing. Tokens from DESIGN.md (app "Prehled"). */
:root {
  --primary: #1F4D3A;
  --primary-deep: #173B2C;
  --primary-wash: #E4EDE7;
  --ground: #F1F3F4;
  --paper: #FFFFFF;
  --ink: #15181B;
  --ink-2: #454B52;
  --ink-3: #656B72;
  --rule: #D9DEE1;
  --amber: #7A4E0E;
  --amber-wash: #F5ECDC;
  --area-firma: #34506B;
  --area-majetek: #86652A;
  --area-rodina: #4E6A39;
  --area-zdravi: #9C4B42;
  --area-osobni: #5D5371;
  --serif: Didot, "Bodoni 72", "Iowan Old Style", Georgia, serif;
  --sans: "Avenir Next", Avenir, Seravek, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(21,24,27,.06), 0 12px 32px -12px rgba(21,24,27,.18);
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.015em; line-height: 1.08; }
h1 { font-size: clamp(40px, 6.4vw, 88px); max-width: 15ch; }
h2 { font-size: clamp(30px, 3.6vw, 52px); max-width: 18ch; }
h3 { font-size: 19px; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 18px;
}
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-2); max-width: 36em; margin-top: 28px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--primary); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 16px; letter-spacing: .005em;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--primary-deep); }
.btn:active { transform: scale(.98); }
.btn:focus-visible, .link:focus-visible { outline: 3px solid #9FB5A8; outline-offset: 3px; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-big { min-height: 60px; padding: 0 34px; font-size: 18px; margin-top: 48px; }
.link { font-weight: 600; color: var(--primary); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* progress + header */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 30; }
.progress span { display: block; height: 100%; background: var(--primary); transform-origin: 0 50%; transform: scaleX(0); }
.top {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { font-family: var(--serif); font-size: 24px; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--primary); }

/* 1 hero */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter) 80px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; z-index: 0; width: 70vmax; height: 70vmax; right: -18vmax; top: -10vmax;
  background: radial-gradient(closest-side, var(--primary-wash), transparent 70%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; max-width: 1180px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-top: 40px; }
.hero-papers { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.paper {
  position: absolute; width: 210px; padding: 18px 18px 20px;
  background: var(--paper); border-radius: 8px; box-shadow: var(--shadow);
  display: grid; gap: 8px;
}
.paper b { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.paper i { display: block; height: 6px; border-radius: 3px; background: var(--rule); }
.paper i.s { width: 60%; }
.paper.env { background: #FBFAF7; }
.paper.msg { border-radius: 16px 16px 16px 4px; width: 150px; }
.p1 { right: 6%;  top: 16%; transform: rotate(4deg); }
.p2 { right: 22%; top: 9%;  transform: rotate(-6deg); }
.p3 { right: 4%;  top: 52%; transform: rotate(-3deg); }
.p4 { right: 20%; top: 60%; transform: rotate(7deg); width: 190px; }
.p5 { right: 35%; top: 78%; transform: rotate(-4deg); }
.p6 { right: 2%; top: 36%; transform: rotate(3deg); opacity: .9; }
.p7 { right: 12%; top: 82%; transform: rotate(-8deg); }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; width: 1px; height: 48px; background: var(--rule); overflow: hidden; }
.scroll-hint span { display: block; width: 100%; height: 40%; background: var(--primary); animation: hint 2.2s ease-in-out infinite; }
@keyframes hint { from { transform: translateY(-100%); } to { transform: translateY(250%); } }

/* scenes, static default: stacked and readable */
.scene { padding: 96px var(--gutter); }
.scene:nth-of-type(odd) { background: var(--paper); }
.pin {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.steps { position: relative; }
.step + .step { margin-top: 36px; }
.step p, .steps.single p:not(.eyebrow) { color: var(--ink-2); font-size: 18px; margin-top: 16px; max-width: 30em; }
.stage { position: relative; }

/* 2 letter */
.letter {
  background: var(--paper); border-radius: 6px; box-shadow: var(--shadow);
  padding: 32px 34px; font-size: 15px; line-height: 1.6; color: var(--ink-2);
  max-width: 520px;
}
.letter header { display: flex; flex-direction: column; margin-bottom: 20px; }
.letter header b { color: var(--ink); font-size: 16px; }
.letter header span { font-size: 13px; color: var(--ink-3); }
.letter .words + .words { margin-top: 12px; }
.letter .dim { color: var(--ink-3); font-size: 13px; }
.letter mark { background: linear-gradient(var(--amber-wash), var(--amber-wash)) no-repeat 0 0 / 100% 100%; color: var(--ink); padding: 1px 2px; border-radius: 3px; }
.letter footer { margin-top: 22px; display: grid; gap: 8px; }
.letter footer i { display: block; height: 6px; border-radius: 3px; background: var(--rule); }
.letter footer i.s { width: 45%; }
.letter .w { display: inline-block; white-space: pre; }

.task {
  margin-top: 28px; max-width: 460px;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px;
}
.task-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.task-who { font-size: 13px; color: var(--ink-3); }
.chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: #fff; }
.chip-majetek { background: var(--area-majetek); }
.task-main { display: flex; gap: 22px; align-items: center; margin: 18px 0; }
.task-date { display: flex; flex-direction: column; align-items: center; min-width: 76px; }
.task-date .num { font-family: var(--serif); font-size: 52px; line-height: 1; font-variant-numeric: lining-nums; }
.task-date .mon { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.task-amount { color: var(--ink-2); margin-top: 4px; }
.task blockquote {
  margin: 0; padding: 12px 14px;
  background: var(--amber-wash); border-radius: 8px; font-size: 15px; color: var(--ink);
}
.task cite { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* 3 sources */
.sources { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sources li {
  padding: 10px 16px; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--rule); font-size: 15px; font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.today {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px 0; max-width: 460px;
}
.today-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 22px 12px; }
.today-head span:first-child { font-family: var(--serif); font-size: 30px; }
.today-count { font-size: 13px; color: var(--ink-3); }
.today-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 22px; border-top: 1px solid var(--rule); }
.today-item b { display: block; font-weight: 600; font-size: 16px; }
.today-item small { color: var(--ink-3); font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.d-rodina { background: var(--area-rodina); } .d-osobni { background: var(--area-osobni); } .d-majetek { background: var(--area-majetek); }

/* 4 confirm */
.confirm-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.proposal { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.proposal-label { font-size: 12px; font-weight: 600; color: var(--amber); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.proposal-date { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pa { font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
.pa-yes { background: var(--primary); color: #fff; border-color: var(--primary); }
.cal { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.cal-head { font-family: var(--serif); font-size: 24px; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.cal-grid span { padding: 6px 0; border-radius: 6px; }
.cal-grid .wd { color: var(--ink-3); font-size: 11px; font-weight: 600; }
.cal-grid .target { background: var(--primary); color: #fff; font-weight: 600; }
.cal-grid .rem { box-shadow: inset 0 0 0 1px var(--amber); color: var(--amber); }
.cal-note { font-size: 13px; color: var(--ink-3); margin-top: 12px; }
.cal-note u { color: var(--primary); text-underline-offset: 3px; }

/* 5 family */
.who { display: inline-flex; padding: 4px; background: var(--ground); border-radius: 999px; margin-bottom: 18px; position: relative; }
.who span { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-3); position: relative; z-index: 1; }
.who span.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.area {
  border-radius: 12px; padding: 18px 16px; color: #fff; min-height: 96px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.area span { font-weight: 600; font-size: 17px; }
.area small { opacity: .85; font-size: 13px; }
.a-firma { background: var(--area-firma); } .a-majetek { background: var(--area-majetek); }
.a-rodina { background: var(--area-rodina); } .a-zdravi { background: var(--area-zdravi); }
.a-osobni { background: var(--area-osobni); }
.bundle {
  margin-top: 16px; padding: 16px 18px; border-radius: 12px; border: 1px dashed var(--ink-3);
  display: flex; flex-direction: column; background: var(--paper);
}
.bundle small { color: var(--ink-3); font-size: 13px; }

/* 6 data */
.dark { background: var(--primary-deep); color: #fff; padding: 128px var(--gutter); }
.dark .eyebrow { color: #9FB5A8; }
.wrap { max-width: 1240px; margin: 0 auto; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 64px; }
/* colours follow currentColor so the scroll tone shift (app.js) carries them along */
.fact { border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); padding-top: 22px; }
.fact-n { font-family: var(--serif); font-size: clamp(64px, 8vw, 112px); line-height: 1; font-variant-numeric: lining-nums; display: block; }
.fact p { color: color-mix(in srgb, currentColor 82%, transparent); margin-top: 12px; max-width: 22em; }
.note { margin-top: 56px; color: color-mix(in srgb, currentColor 72%, transparent); max-width: 40em; }

/* 7 start */
.start { padding: 128px var(--gutter); background: var(--paper); }
.how { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.how li { display: flex; gap: 16px; }
.how li > span {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--primary); color: var(--primary);
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px;
}
.how b { font-size: 18px; }
.how p { color: var(--ink-2); margin-top: 6px; }
.small { font-size: 14px; color: var(--ink-3); margin-top: 16px; }

.foot {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  padding: 32px var(--gutter); font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--rule);
}
.foot .brand { font-size: 20px; color: var(--ink); }

/* motion mode: set by app.js only when motion is allowed */
.motion .scene { padding: 0; background: var(--ground); }
.motion .scene:nth-of-type(odd) { background: var(--paper); }
.motion .pin { height: 100svh; padding: 88px var(--gutter) 40px; max-width: none; }
.motion .pin > * { max-width: 620px; }
.motion .pin > .steps { justify-self: end; width: 100%; }
.motion .steps:not(.single) .step { position: absolute; left: 0; right: 0; top: 40px; margin: 0; }
.motion .steps:not(.single) { min-height: 260px; }
.motion .s-letter .stage { min-height: 520px; }
.motion .s-letter .task { position: absolute; left: 6%; top: 50%; margin: 0; width: min(460px, 92%); }
.motion .reveal .line-mask { overflow: clip; }
.motion .hero-papers { will-change: opacity; }

/* wide screens: the stage takes the space instead of leaving it empty */
@media (min-width: 1200px) {
  .motion .pin { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
  .motion .pin > .stage { max-width: 760px; }
  .motion .letter { max-width: 640px; padding: 44px 48px; font-size: 17px; }
  .motion .s-letter .stage { min-height: 640px; }
  .motion .s-letter .task, .motion .today { width: min(540px, 92%); max-width: 540px; }
  .motion .today-item b { font-size: 18px; }
  .motion .sources li { font-size: 17px; padding: 12px 20px; }
  .motion .proposal { padding: 30px; }
  .motion .proposal h3 { font-size: 22px; }
  .motion .cal { padding: 24px; }
  .motion .cal-grid { font-size: 15px; gap: 6px; }
  .motion .cal-grid span { padding: 9px 0; }
  .motion .areas { gap: 16px; }
  .motion .area { min-height: 140px; padding: 22px 20px; }
  .motion .area span { font-size: 20px; }
}

@media (max-width: 860px) {
  .pin { grid-template-columns: 1fr; }
  .confirm-stage { grid-template-columns: 1fr; }
  .facts, .how { grid-template-columns: 1fr; }
  .areas { grid-template-columns: repeat(2, 1fr); }
  .paper { width: 120px; padding: 12px; }
  .paper.msg { width: 110px; }
  .p2, .p6 { display: none; }
  .p1 { right: -20px; top: 9%; } .p3 { right: -10px; top: 70%; } .p4 { right: 30%; top: 84%; width: 130px; }
  .p5 { left: -20px; top: 86%; right: auto; } .p7 { right: 52%; top: 6%; }
  .letter { padding: 20px; font-size: 13px; }
  .letter .dim, .letter footer { display: none; }

  .motion .pin { align-content: start; gap: 12px; padding: 76px var(--gutter) 20px; }
  .motion .pin > .steps { justify-self: stretch; }
  .motion .steps .eyebrow { margin-bottom: 8px; }
  .motion h2 { font-size: 28px; }
  .motion .step p, .motion .steps.single p:not(.eyebrow) { font-size: 15px; margin-top: 8px; }
  .motion .steps:not(.single) { min-height: 150px; }
  .motion .steps:not(.single) .step { top: 26px; }
  .motion .s-letter .stage { min-height: 360px; }
  .motion .s-letter .task { left: 0; top: 34%; width: 100%; }
  .motion .sources { margin-bottom: 14px; gap: 6px; }
  .motion .sources li { padding: 7px 12px; font-size: 13px; }
  .motion .today-item { padding: 10px 18px; }
  .motion .confirm-stage { gap: 12px; }
  .motion .cal { padding: 12px; }
  .motion .cal-grid span { padding: 3px 0; }
  .motion .area { min-height: 72px; padding: 12px; }
}
