/* ==========================================================================
   CALLTIME LANDING — "Spokój" (baza). Animacje: motion.css, makiety: phone.css / laptop.css.
   Papier, tusz, jeden teal. Sygnatura: linijka i playhead.
   Skala: hero 68-240 / sekcja 36-60 / lead 20 / tekst 17 / mono 13.
   ========================================================================== */
:root {
  --bg: #eef1f0; --surface: #ffffff; --elevated: #f6f8f7;
  --ink: #14211f; --ink-2: #3f524e; --muted: #566a66;
  --line: #d5dedb; --line-strong: #b7c4c0;
  --accent: #0f766e; --accent-hover: #0b5a54; --accent-on: #ffffff;
  --accent-soft: #dff0ed; --accent-ink: #0b5a54;
  --ok: #14663d; --ok-soft: #dcf3e6; --warn: #8a5a00; --warn-soft: #fdf0d6;
  --d1: #5b7fa6; --d2: #b07a2e; --d3: #4f8a62; --d4: #9a5b7a; --d5: #7a6aa8;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gut: 16px;
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1716; --surface: #172220; --elevated: #1f2d2a;
    --ink: #e8f0ee; --ink-2: #b4c6c2; --muted: #92a6a1;
    --line: #2b3b38; --line-strong: #3b4f4b;
    --accent: #3cc4b6; --accent-hover: #6fd8cc; --accent-on: #04201d;
    --accent-soft: #12332f; --accent-ink: #7fe0d4;
    --ok: #4cc38a; --ok-soft: #12301f; --warn: #e0b040; --warn-soft: #33290d;
    --d1: #7fa3cc; --d2: #d29a52; --d3: #6fb185; --d4: #c47fa0; --d5: #a090d0;
  }
}
@media (min-width: 720px) { :root { --gut: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--font); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.label { font: 500 13px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:focus-visible:not([data-ct-laptop] *):not([data-ct-phone] *) { border-radius: 6px; }
.skip { position: absolute; left: var(--gut); top: -80px; z-index: 40; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-on);
  transition: background-color .15s, transform .15s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--elevated); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 18px; }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* Nagłówek */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.mark { font: 700 22px/1 var(--font); letter-spacing: -.02em; text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; }
.mark i { font-style: normal; color: var(--accent-ink); }
.nav { display: none; gap: 4px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--elevated); }
.nav a[aria-current="true"] { color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a[aria-current="true"]::after { transform: scaleX(1); }
@media (min-width: 900px) { .nav { display: flex; } }

/* Linijka (sygnatura) */
.ruler { display: block; width: 100%; height: 14px; color: var(--line-strong); }

/* Hero */
.hero { padding-top: 40px; padding-bottom: 0; }
.hero-grid { display: grid; gap: 32px; }
h1 {
  font-weight: 700; letter-spacing: -.05em; line-height: 1;
  font-size: clamp(4.25rem, 21vw, 15rem);
}
@media (min-width: 960px) { h1 { font-size: min(15vw, 11rem); } }
h1 .ln { display: block; overflow: hidden; padding: 0 .06em .14em 0; margin-bottom: -.14em; }
h1 .ln > span { display: block; }
h1 .acc { color: var(--accent); padding-left: .5em; }
.hero-side { display: grid; gap: 24px; align-content: start; }
.lead { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 960px) {
  .hero { padding-top: 40px; }
  .hero-grid { gap: 24px; }
  .hero-side { grid-template-columns: 1fr auto; gap: 48px; align-items: end; border-top: 1px solid var(--line-strong); padding-top: 24px; }
  .hero-cta { flex-direction: column; }
}

/* Dzień eventu z playheadem */
.day { margin-top: 40px; border-top: 1px solid var(--line-strong); padding-top: 18px; }
.day-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-bottom: 14px; }
.tl { --lw: 0px; position: relative; padding-bottom: 36px; }
.tl-axis { display: grid; grid-template-columns: var(--lw) 1fr; cursor: pointer; }
.tl-hours { position: relative; height: 22px; grid-column: 2; }
.tl-hours span { position: absolute; top: 0; transform: translateX(-50%); font: 500 13px/1 var(--mono); color: var(--muted); }
.tl-hours span:first-child { transform: none; }
.tl-hours span:last-child { transform: translateX(-100%); }
.tl-axis .ruler { grid-column: 2; }
.lane { display: grid; grid-template-columns: var(--lw) 1fr; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lane:last-of-type { border-bottom: 0; }
.lane-name { font: 500 13px/1.2 var(--mono); color: var(--muted); grid-column: 1 / -1; margin-bottom: 4px; }
.track { position: relative; height: 34px; grid-column: 1 / -1; }
.blk {
  position: absolute; top: 0; bottom: 0; background: var(--elevated);
  border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden;
  font: 500 13px/32px var(--font); padding: 0 12px 0 26px; white-space: nowrap; text-overflow: ellipsis;
  color: transparent; cursor: pointer;
  transition: background-color .25s, border-color .25s, opacity .25s;
}
.blk::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--c); }
.blk:hover { border-color: var(--ink-2); }
.blk.on { background: var(--accent-soft); border-color: var(--accent); }
.blk.done { opacity: .55; }

/* Playhead: pozycja przez transform (JS ustawia translate3d w px) */
.ph { position: absolute; top: 22px; bottom: 0; left: 0; width: 0; pointer-events: none; will-change: transform; }
.ph-line { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.ph-h {
  position: absolute; left: -22px; top: -26px; width: 44px; height: 44px; pointer-events: auto;
  cursor: grab; touch-action: none; border-radius: 50%;
}
.ph-h:active { cursor: grabbing; }
.ph-h::before {
  content: ""; position: absolute; left: 14px; top: 14px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
}
.ph-h:focus-visible { outline-offset: -2px; }
.ph em {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-on); font: 500 13px/1 var(--mono);
  padding: 10px 14px; border-radius: 6px; font-style: normal; white-space: nowrap;
}
.tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: var(--ink); color: var(--bg); border-radius: 8px; padding: 12px 16px;
  font: 500 13px/1.35 var(--font); white-space: nowrap; transition: opacity .12s;
}
.tip.show { opacity: 1; }
.tip .mono { display: block; opacity: .8; }
.now-line {
  display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline;
  padding-top: 14px; border-top: 1px solid var(--line); min-height: 64px;
}
.now-line .label { color: var(--accent-ink); }
.now-line strong { font-weight: 600; }
.now-line span.mono { color: var(--muted); font-size: 14px; }
@media (min-width: 720px) {
  .tl { --lw: 150px; }
  .lane { padding: 7px 0; }
  .lane-name { grid-column: 1; margin: 0; padding-right: 12px; }
  .track { grid-column: 2; }
  .blk { color: var(--ink-2); }
  .blk.on { color: var(--ink); }
}

/* Dalej (tylko mobile: bloki osi są tam bez nazw) */
.next-line { border-top: 0; padding-top: 4px; min-height: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
.next-line .label { color: var(--muted); }
.next-line > span:not(.label) { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
@media (min-width: 720px) { .next-line { display: none; } }

/* Sekcje */
section { padding: 88px 0 0; scroll-margin-top: 64px; }
h2 { font-weight: 700; letter-spacing: -.03em; line-height: 1; font-size: clamp(2.25rem, 7vw, 3.75rem); max-width: 16ch; }
.sec-lead { font-size: 20px; color: var(--ink-2); max-width: 44ch; line-height: 1.5; margin-top: 20px; }
.two { display: grid; gap: 40px; }
@media (min-width: 960px) {
  section { padding-top: 136px; }
  .two { grid-template-columns: 1fr 380px; gap: 80px; align-items: center; }
}
/* Listy z linią u góry; linia to pseudo-element, żeby dało się ją "narysować" */
.rl { position: relative; }
.rl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong); transform-origin: left; }

/* Role: przełącznik widoku telefonu */
.roles { margin-top: 36px; }
.role {
  display: grid; gap: 4px 20px; width: 100%; padding: 14px 0; min-height: 64px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; align-content: center;
}
.role .nm { position: relative; padding-left: 20px; font: 500 14px/1.3 var(--mono); color: var(--accent-ink); }
.role .nm::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--accent); transform: scale(0); transition: transform .2s var(--ease);
}
.role .ds { padding-left: 20px; color: var(--ink-2); }
.role:hover .ds { color: var(--ink); }
.role[aria-selected="true"] .nm::before { transform: scale(1); }
.role[aria-selected="true"] .nm { font-weight: 600; }
.role[aria-selected="true"] .ds { color: var(--ink); }
@media (min-width: 720px) {
  .role { grid-template-columns: 160px 1fr; align-items: baseline; }
  .role .ds { padding-left: 0; }
}

/* Makiety urządzeń: kontener, rezerwacja miejsca, podpowiedź */
.phone-col { display: flex; justify-content: center; }
.phone-col figure { width: 100%; max-width: 360px; }
.dev { position: relative; }
.hint-row { display: flex; flex-wrap: wrap; min-height: 40px; margin-bottom: 12px; justify-content: center; }
.dev-wide-top { justify-content: flex-start; }
.hint {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; white-space: nowrap;
  border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink);
  font: 500 13px/1 var(--mono); transition: opacity .3s, transform .3s var(--ease), visibility .3s;
}
.hint i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hint.gone { opacity: 0; transform: translateY(-4px); visibility: hidden; }
.cap { margin-top: 14px; font: 500 13px/1.4 var(--mono); color: var(--muted); text-align: center; min-height: 3.6em; }
[data-ct-phone], [data-ct-laptop] { position: relative; }
.js [data-ct-phone]:empty { min-height: 800px; }
.js [data-ct-laptop]:empty { min-height: 420px; }
@media (min-width: 960px) { .js [data-ct-laptop]:empty { min-height: 600px; } }
.js [data-ct-phone]:empty::before, .js [data-ct-laptop]:empty::before {
  content: "Ładowanie podglądu…"; position: absolute; inset: 0; display: grid; place-items: center;
  border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); font: 500 14px/1 var(--mono);
}

/* Panel agencji: kroki */
.admin-sec .head { max-width: 640px; }
.steps { margin-top: 32px; max-width: 560px; }
.steps li { border-bottom: 1px solid var(--line); }
.step {
  display: grid; grid-template-columns: 36px 1fr; width: 100%; min-height: 56px; padding: 14px 0; text-align: left;
  background: none; border: 0; cursor: pointer; color: var(--ink-2); align-content: center;
}
.step .mono { position: relative; color: var(--accent-ink); font-size: 14px; padding-top: 2px; align-self: start; }
.step .mono::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 18px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.step:hover { color: var(--ink); }
.step[aria-pressed="true"] { color: var(--ink); }
.step[aria-pressed="true"] .mono { font-weight: 600; }
.step[aria-pressed="true"] .mono::after { transform: scaleX(1); }
.dev-wide { margin-top: 40px; }
@media (min-width: 960px) {
  .admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
  .steps { margin-top: 0; }
  .dev-wide { margin-top: 56px; }
}

/* Pięć rzeczy */
.feats { margin-top: 48px; }
.feat { display: grid; gap: 10px 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.feat h3 { font: 600 24px/1.2 var(--font); letter-spacing: -.015em; }
.feat h3 .mono { display: block; color: var(--accent-ink); font-size: 13px; margin-bottom: 8px; }
.feat p { color: var(--ink-2); max-width: 56ch; }
@media (min-width: 900px) { .feat { grid-template-columns: 360px 1fr; padding: 36px 0; } }
.chat { margin-top: 20px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.chat div { padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.chat div + div { border-top: 1px solid var(--line); }
.chat .q { color: var(--ink); font-weight: 500; }
.chat .a { color: var(--ink-2); }
.chat .src { display: inline-block; margin-top: 8px; font: 500 13px/1 var(--mono); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 6px; padding: 7px 12px; }

/* Mikro-ilustracje cech (dekoracyjne, aria-hidden). Stan domyślny = stan końcowy. */
.demo {
  position: relative; margin-top: 20px; max-width: 520px; min-height: 60px; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  font: 500 14px/1.35 var(--mono); color: var(--ink-2);
}
.d-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 600; white-space: nowrap; }
.d-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.demo.is-on .d-pill { background: var(--ok-soft); color: var(--ok); }
.d-stack { position: relative; flex: 1 1 220px; min-height: 40px; }
.d-msg { position: absolute; left: 0; right: 0; top: 0; display: grid; gap: 2px; color: var(--ink); }
.d-msg b { font: 600 15px/1.3 var(--font); }
.d-msg small { font: 500 13px/1.2 var(--mono); color: var(--muted); }
.d-msg.gone { opacity: 0; }
.d-msg.wait { opacity: 0; }
.d-sub { font: 500 13px/1.3 var(--mono); color: var(--muted); }
.d-count { font-size: 20px; color: var(--ink); font-weight: 600; }
.d-bar { flex: 1 1 140px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.d-bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; }
.demo.is-end .d-count { color: var(--ok); }
.demo.is-end .d-bar i { background: var(--ok); }

/* CTA */
.cta { padding: 96px 0 72px; }
.cta-box { position: relative; padding-top: 40px; display: grid; gap: 28px; }
.cta h2 { max-width: 12ch; font-size: clamp(2.5rem, 9vw, 5.5rem); }
.cta p { font-size: 20px; color: var(--ink-2); max-width: 36ch; }
.cta-col { display: grid; gap: 24px; }
.cta-act { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.cta-act a.m { font: 500 15px/1 var(--mono); color: var(--ink-2); min-height: 48px; display: inline-flex; align-items: center; }
.cta-act a.m:hover { color: var(--ink); }
@media (min-width: 960px) { .cta-box { grid-template-columns: 1.4fr 1fr; align-items: end; gap: 80px; } }
footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .btn svg { transition: none; } }
