/* =========================================================
   Tidora Design System
   Inspired by Jony Ive: white, breathable, precise.
   ========================================================= */

:root {
  --color-one: #d35f5f;
  --color-one-soft: #f7e2e2;
  --color-club: #800066;
  --color-club-soft: #f0e3ed;
  --color-business: #162d50;
  --color-business-soft: #e8eef6;
  --color-ink: #1a1a1a;
  --color-ink-secondary: #6b6b6b;
  --color-muted: #a1a1a1;
  --color-surface: #ffffff;
  --color-surface-subtle: #fafafa;
  --color-line: #f0f0f0;

  --font-display: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
  --radius-xl: 2.5rem;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.08);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-surface);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-one);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(128, 0, 102, 0.12);
  color: var(--color-ink);
}

button {
  font-family: inherit;
}

/* Typography */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* Animation utilities */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.fade-in {
  opacity: 0;
  transition: opacity 1s var(--ease-out-expo);
}

.fade-in.is-visible {
  opacity: 1;
}

/* Decorative gradient orbs */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

.orb-one {
  background: var(--color-one);
}

.orb-club {
  background: var(--color-club);
}

.orb-business {
  background: var(--color-business);
}

.orb-dual {
  background: linear-gradient(135deg, var(--color-one), var(--color-club));
}

/* Cards */
.tidora-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo);
}

.tidora-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), background 0.25s;
  border: none;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary-one {
  background: var(--color-one);
  color: #fff;
  box-shadow: 0 6px 24px rgba(211, 95, 95, 0.28);
}

.btn-primary-one:hover {
  box-shadow: 0 10px 32px rgba(211, 95, 95, 0.38);
}

.btn-primary-club {
  background: var(--color-club);
  color: #fff;
  box-shadow: 0 6px 24px rgba(128, 0, 102, 0.28);
}

.btn-primary-club:hover {
  box-shadow: 0 10px 32px rgba(128, 0, 102, 0.38);
}

.btn-primary-business {
  background: var(--color-business);
  color: #fff;
  box-shadow: 0 6px 24px rgba(22, 45, 80, 0.28);
}

.btn-primary-business:hover {
  box-shadow: 0 10px 32px rgba(22, 45, 80, 0.38);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-surface-subtle);
  border-color: #e5e5e5;
}

/* Feature icon circles */
.feature-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.feature-icon-one {
  background: var(--color-one-soft);
  color: var(--color-one);
}

.feature-icon-club {
  background: var(--color-club-soft);
  color: var(--color-club);
}

.feature-icon-business {
  background: var(--color-business-soft);
  color: var(--color-business);
}

/* Section labels */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.section-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Navigation */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Mobile menu */
.mobile-menu {
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-line);
  background: var(--color-surface-subtle);
}

/* Link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero headline highlight */
.headline-gradient-one {
  background: linear-gradient(135deg, var(--color-one) 0%, #b54848 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.headline-gradient-club {
  background: linear-gradient(135deg, var(--color-club) 0%, #590047 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.headline-gradient-business {
  background: linear-gradient(135deg, var(--color-business) 0%, #29649e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Product selector cards on homepage */
.product-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), border-color 0.4s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card-one:hover {
  border-color: rgba(211, 95, 95, 0.35);
}

.product-card-club:hover {
  border-color: rgba(128, 0, 102, 0.35);
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.product-card-one::before {
  background: radial-gradient(circle at 50% 0%, rgba(211, 95, 95, 0.08), transparent 70%);
}

.product-card-club::before {
  background: radial-gradient(circle at 50% 0%, rgba(128, 0, 102, 0.08), transparent 70%);
}

.product-card:hover::before {
  opacity: 1;
}

/* Step numbers */
.step-number {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal, .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   Podstrony produktowe: funkcje.html, demo.html, kontakt.html
   -------------------------------------------------------
   Komponenty poniżej są wspólne dla trzech marek. Kolor akcentu bierzemy
   ze zmiennej --brand ustawianej raz na <body> danej strony
   (style="--brand: var(--color-business)"), zamiast mnożyć warianty
   .shot-frame-one / -club / -business jak przy .btn-primary-*.
   ========================================================= */

.brand-accent { color: var(--brand, var(--color-business)); }
.brand-bg { background: var(--brand, var(--color-business)); }

/* ---------- Ramka „okna przeglądarki” wokół zrzutu ekranu ----------
   Zrzut bez obramowania zlewa się z białym tłem strony i wygląda jak
   przypadkowy obrazek; pasek okna od razu mówi „to jest aplikacja”. */
.shot-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
}

.shot-frame__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-line);
}

.shot-frame__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0e0e0;
  flex: none;
}

.shot-frame__url {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-frame__img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* Pasek miniatur pod głównym zrzutem - dodatkowe widoki tego samego modułu. */
.shot-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  cursor: zoom-in;
  transition: border-color 0.25s, transform 0.25s var(--ease-out-expo);
}

.shot-thumb:hover {
  border-color: var(--brand, var(--color-business));
  transform: translateY(-2px);
}

/* Zrzut z telefonu - węższy, z zaokrągleniem jak ekran urządzenia. */
.shot-phone {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
  cursor: zoom-in;
}

/* ---------- Zakładki modułów ---------- */
.module-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--color-ink-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.module-tab:hover {
  background: var(--color-surface-subtle);
  color: var(--color-ink);
}

.module-tab[aria-selected="true"] {
  background: var(--color-surface);
  border-color: var(--color-line);
  color: var(--color-ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.module-tab[aria-selected="true"]::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  margin-right: 0.6rem;
  vertical-align: -0.15em;
  border-radius: 2px;
  background: var(--brand, var(--color-business));
}

.module-panel[hidden] { display: none; }

/* ---------- Lightbox (pełny podgląd zrzutu) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  /* Zrzuty desktopowe są wysokie - na wąskim ekranie pozwalamy je przewinąć
     zamiast skalować do nieczytelnego paska. */
  object-fit: contain;
}

.lightbox__caption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Checklista funkcjonalności ---------- */
.check-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--color-ink-secondary);
}

.check-item::before {
  content: '';
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.22rem;
  /* Ptaszek rysowany maską z SVG, nie znakiem ‚✓’: przyjmuje kolor marki
     (--brand), wygląda tak samo w każdym kroju pisma i NIE trafia do
     schowka, gdy ktoś kopiuje listę funkcji. */
  background: var(--brand, var(--color-business));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.check-group {
  break-inside: avoid;
}

/* ---------- Formularze ---------- */
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ink-secondary);
  margin-bottom: 0.4rem;
}

.field-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input:focus {
  outline: none;
  border-color: var(--brand, var(--color-business));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, var(--color-business)) 15%, transparent);
}

.field-input::placeholder { color: var(--color-muted); }

textarea.field-input {
  min-height: 8rem;
  resize: vertical;
}

/* Pułapka na boty - musi być niewidoczna dla człowieka, ale wypełnialna dla
   skryptu, więc NIE display:none (część botów pomija ukryte pola). */
.field-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  line-height: 1.5;
}

.form-status--ok {
  background: #f0f9f4;
  border: 1px solid #cce9d8;
  color: #1f7a4d;
}

.form-status--err {
  background: #fdf2f2;
  border: 1px solid #f5d5d5;
  color: #b3261e;
}

.form-status[hidden] { display: none; }
