/* Calendar Hub — strona produktu. Kolory wyłącznie przez tokeny. */

:root {
  --bg: #f6f7f9;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --text: #16181d;
  --text-2: #4a5160;
  --border: #dfe3ea;
  --accent: #0f6cbd;
  --accent-hover: #0c5a9e;
  --accent-text: #0f5ea6;
  --accent-soft: #e6f0fa;
  --on-accent: #ffffff;
  --success: #0e7a0d;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.1);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.06), 0 32px 64px rgba(16, 24, 40, 0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --max: 1160px;
  --font: 'Segoe UI Variable Text', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --dur: 180ms;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #111317;
    --bg-alt: #16191e;
    --surface: #1d2127;
    --surface-2: #232830;
    --text: #f2f4f7;
    --text-2: #b4bcc8;
    --border: #2e343d;
    --accent: #479ef5;
    --accent-hover: #6cb2f7;
    --accent-text: #7ab8f8;
    --accent-soft: #15283d;
    --on-accent: #0b1520;
    --success: #6ccb5f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 32px 64px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #111317;
  --bg-alt: #16191e;
  --surface: #1d2127;
  --surface-2: #232830;
  --text: #f2f4f7;
  --text-2: #b4bcc8;
  --border: #2e343d;
  --accent: #479ef5;
  --accent-hover: #6cb2f7;
  --accent-text: #7ab8f8;
  --accent-soft: #15283d;
  --on-accent: #0b1520;
  --success: #6ccb5f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 32px 64px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* ───── Nagłówek ───── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background var(--dur), color var(--dur);
}
.nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn,
.lang {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur);
}
.icon-btn:hover,
.lang:hover {
  background: var(--surface-2);
  color: var(--text);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
.theme-dark-icon {
  display: none;
}
:root[data-theme='dark'] .theme-dark-icon,
:root:not([data-theme='light']) .theme-dark-icon.auto-dark {
  display: block;
}

/* ───── 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: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur), transform var(--dur);
  touch-action: manipulation;
}
.btn:active {
  transform: scale(0.98);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
}

/* ───── Hero ───── */

.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 720px;
  background: radial-gradient(ellipse at 50% 30%, var(--accent-soft), transparent 65%);
  z-index: -1;
}

.hero-inner {
  display: grid;
  gap: 48px;
  text-align: center;
  justify-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}
.eyebrow svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  max-width: 14ch;
  margin-top: 20px;
}
.hero h1 .accent {
  color: var(--accent-text);
}

.lead {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--text-2);
  max-width: 60ch;
  margin: 20px auto 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 15px;
}
.meta-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.meta-row svg {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* okno aplikacji */
.window {
  width: 100%;
  max-width: 1040px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.window-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  height: 32px;
  padding: 0 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.window-bar span {
  width: 10px;
  height: 1.5px;
  background: var(--text-2);
  opacity: 0.7;
}
.window-bar span:nth-child(2) {
  height: 10px;
  background: none;
  border: 1.5px solid var(--text-2);
}
.window-bar span:nth-child(3) {
  position: relative;
  background: none;
}
.window-bar span:nth-child(3)::before,
.window-bar span:nth-child(3)::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 13px;
  height: 1.5px;
  background: var(--text-2);
  transform-origin: left;
}
.window-bar span:nth-child(3)::before {
  transform: rotate(45deg) translate(-1px, -4px);
}
.window-bar span:nth-child(3)::after {
  transform: rotate(-45deg) translate(-5px, 1px);
}
.window img {
  width: 100%;
  aspect-ratio: 1280 / 820;
}
.shot-dark {
  display: none;
}
:root[data-theme='dark'] .shot-light {
  display: none;
}
:root[data-theme='dark'] .shot-dark {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .shot-light {
    display: none;
  }
  :root:not([data-theme='light']) .shot-dark {
    display: block;
  }
}

/* ───── Sekcje ───── */

.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head .kicker {
  display: block;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
}
.section-head p {
  color: var(--text-2);
  font-size: 19px;
  margin-top: 16px;
}

/* cztery pytania */
.questions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.question {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.question .num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 700;
  margin-bottom: 14px;
}
.question h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.question p {
  color: var(--text-2);
  font-size: 16px;
}

/* funkcje */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.feature {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.feature:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  margin-bottom: 18px;
}
.feature-icon svg {
  width: 26px;
  height: 26px;
}
.feature h3 {
  font-size: 21px;
  margin-bottom: 10px;
}
.feature p {
  color: var(--text-2);
  font-size: 16px;
}

/* zrzuty — zakładki */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 28px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tab {
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
}
.tab:hover {
  color: var(--text);
}
.tab[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.tab-panel {
  display: grid;
  justify-items: center;
  gap: 20px;
}
.tab-panel[hidden] {
  display: none;
}
.tab-panel figcaption {
  color: var(--text-2);
  text-align: center;
  max-width: 60ch;
}

/* prywatność */
.privacy-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.checklist li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
}
.checklist svg {
  width: 28px;
  height: 28px;
  color: var(--success);
}
.checklist strong {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}
.checklist span {
  color: var(--text-2);
  font-size: 16px;
}

.scope-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.scope-card h3 {
  font-size: 20px;
  margin-bottom: 16px;
}
.scope-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.scope-table th,
.scope-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.scope-table th {
  width: 42%;
  padding-right: 16px;
  font-weight: 600;
}
.scope-table td {
  color: var(--text-2);
}
.scope-table tr:last-child th,
.scope-table tr:last-child td {
  border-bottom: none;
}
.note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 15px;
  color: var(--text);
}

/* pobieranie */
.download {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 40px;
  align-items: center;
  padding: 48px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.download h2 {
  font-size: clamp(28px, 3.4vw, 38px);
}
.download p {
  color: var(--text-2);
  margin-top: 12px;
}
.download-actions {
  display: grid;
  gap: 12px;
  justify-items: stretch;
  min-width: 280px;
}
.store-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 700;
  text-align: center;
}
.store-soon svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.req {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--text-2);
}
.small {
  font-size: 14px;
  color: var(--text-2);
}

/* FAQ */
.faq {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq details {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg) translateY(-3px);
  transition: transform var(--dur);
}
.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-3px);
}
.faq .answer {
  padding: 0 20px 20px;
  color: var(--text-2);
}
.faq .answer p + p {
  margin-top: 10px;
}

/* stopka */
.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 15px;
  color: var(--text-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h2 {
  font-size: 15px;
  letter-spacing: 0;
  margin-bottom: 12px;
  color: var(--text);
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.footer-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-2);
}
.footer-grid a:hover {
  color: var(--text);
}
.legal {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  display: grid;
  gap: 6px;
}

/* ───── Strony tekstowe (polityka prywatności) ───── */

.doc {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.doc h1 {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 12px;
}
.doc h2 {
  font-size: 24px;
  margin: 40px 0 12px;
}
.doc h3 {
  font-size: 19px;
  margin: 24px 0 8px;
}
.doc p,
.doc li {
  color: var(--text-2);
}
.doc p + p {
  margin-top: 12px;
}
.doc ul {
  padding-left: 22px;
}
.doc li + li {
  margin-top: 6px;
}
.doc strong {
  color: var(--text);
}
.doc .updated {
  font-size: 15px;
}
.doc .lang-switch {
  display: flex;
  gap: 8px;
  margin: 20px 0 8px;
}
.doc hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 64px 0 24px;
}
.doc .highlight {
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  margin: 16px 0;
}
.doc .table-wrap {
  overflow-x: auto;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.doc th {
  color: var(--text);
}

/* ───── Animacja wejścia (tylko gdy użytkownik nie ogranicza ruchu) ───── */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ───── Responsywność ───── */

@media (max-width: 420px) {
  .nav-cta {
    display: none;
  }
}

@media (max-width: 1023px) {
  .questions {
    grid-template-columns: repeat(2, 1fr);
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .privacy-grid {
    grid-template-columns: 1fr;
  }
  .download {
    grid-template-columns: 1fr;
    padding: 32px;
  }
  .download-actions {
    min-width: 0;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }
  .container {
    padding: 0 16px;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .section {
    padding: 64px 0;
  }
  .section-head {
    margin-bottom: 36px;
  }
  .questions,
  .features {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .window-bar {
    height: 24px;
  }
  .cta-row .btn {
    width: 100%;
  }
  .tabs {
    width: 100%;
  }
  .tab {
    flex: 1 1 auto;
    padding: 0 12px;
  }
  .scope-table th {
    width: 38%;
  }
}
