/*!
 * Passly.pl — Design System v2
 * Light, premium/corporate visual layer built on top of Tailwind utilities.
 */

/* ---------------------------------------------------------------
   1. Design tokens (light only — one committed identity)
--------------------------------------------------------------- */
:root {
  --ink-950: #0e0c19;
  --ink-900: #14121f;

  --brand-700: #402fb0;
  --brand-600: #4f39d6;
  --brand-500: #6d5ef5;
  --brand-400: #8b7ff8;
  --brand-200: #d6d1ff;
  --brand-100: #ece9ff;
  --brand-50:  #f5f3ff;

  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  --teal-50:  #f0fdfa;

  --amber-600: #b45309;
  --amber-500: #d97706;
  --amber-100: #fef3e2;
  --amber-50:  #fffaf0;

  --success: #16a34a;
  --warning: #d97706;
  --danger:  #dc2626;

  --bg: #faf9fd;
  --surface: #ffffff;
  --surface-2: #f4f2fb;
  --surface-3: #edeafb;
  --border: #e7e4f5;
  --border-strong: #d8d3f0;
  --text: #14121f;
  --text-muted: #5c5775;
  --text-soft: #8f8aa8;

  --shadow-sm: 0 1px 2px rgba(20, 18, 31, 0.05);
  --shadow-md: 0 12px 28px -10px rgba(79, 57, 214, 0.18);
  --shadow-lg: 0 30px 70px -24px rgba(20, 18, 31, 0.22);
  --shadow-glow: 0 0 0 1px var(--border-strong), 0 20px 50px -16px rgba(109, 94, 245, 0.35);

  --radius-sm: 0.6rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.75rem;
  --radius-xl: 2.5rem;

  --font-display: "Sora", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  color-scheme: light;
  scrollbar-color: var(--brand-300, #a89dfa) transparent;
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display { font-family: var(--font-display); letter-spacing: -0.02em; }

::selection { background: var(--brand-200); color: var(--ink-900); }

.container-page { max-width: 80rem; margin-inline: auto; padding-inline: 1.25rem; }

/* ---------------------------------------------------------------
   2. Backdrop: soft aurora blobs (replaces the old dark hero band)
--------------------------------------------------------------- */
.bg-app { background: var(--bg); }

.aurora { position: relative; overflow: hidden; isolation: isolate; }
.aurora::before {
  content: "";
  position: absolute; inset: -10% -10% auto -10%; height: 140%;
  z-index: -1;
  background-image:
    radial-gradient(34rem 26rem at 12% 18%, rgba(109, 94, 245, 0.20), transparent 60%),
    radial-gradient(28rem 24rem at 88% 6%, rgba(20, 184, 166, 0.16), transparent 60%),
    radial-gradient(26rem 22rem at 60% 92%, rgba(217, 119, 6, 0.10), transparent 60%);
  filter: blur(2px);
  pointer-events: none;
}
.aurora-dots::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--border-strong) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: radial-gradient(60% 55% at 78% 25%, black, transparent);
  pointer-events: none;
}

.blob {
  position: absolute; border-radius: 999px; filter: blur(60px); z-index: -1; pointer-events: none;
}

/* ---------------------------------------------------------------
   3. Buttons
--------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  padding: 0.85rem 1.5rem; border-radius: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: 0 16px 34px -10px rgba(79, 57, 214, 0.45); transform: translateY(-1px); }
.btn-teal {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: #fff; box-shadow: 0 12px 28px -10px rgba(13, 148, 136, 0.4);
}
.btn-teal:hover { transform: translateY(-1px); }
.btn-outline {
  background: #fff; color: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--brand-400); color: var(--brand-600); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { padding: 0.55rem 0.9rem; font-size: 0.825rem; border-radius: 0.65rem; }
.btn-icon { padding: 0.7rem; border-radius: 0.75rem; }

/* ---------------------------------------------------------------
   4. Cards / surfaces
--------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-400); }

.spotlight-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
  isolation: isolate;
  overflow: hidden;
}
.spotlight-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, var(--brand-50), #fff 40%, var(--teal-50));
}

.device-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
}

.option-card {
  background: var(--surface-2);
  border-radius: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.option-card:hover { box-shadow: var(--shadow-sm); border-color: var(--brand-400); }

/* ---------------------------------------------------------------
   5. Badges / chips / eyebrow
--------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  color: var(--brand-700);
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
}

.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 600;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}

.gradient-text {
  background: linear-gradient(100deg, var(--brand-600), var(--teal-600) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

button.badge { cursor: pointer; transition: all 0.2s ease; }
button.badge:hover { border-color: var(--brand-400); }
button.badge.is-active {
  background: var(--brand-100); color: var(--brand-700); border-color: var(--brand-200); font-weight: 700;
}

#mobile-menu.is-open { display: block; }

.ribbon {
  background: linear-gradient(90deg, var(--brand-50), var(--surface) 40%, var(--teal-50));
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.ribbon strong { color: var(--text); }

/* ---------------------------------------------------------------
   6. Section furniture
--------------------------------------------------------------- */
.section-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
.section-kicker {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-600);
}

.divider-fade { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------
   7. Bento grid (features)
--------------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(11rem, auto); gap: 1.25rem; }
.bento-lg { grid-column: span 4 / span 4; grid-row: span 2 / span 2; }
.bento-sm { grid-column: span 4 / span 4; }
@media (min-width: 768px) {
  .bento-lg { grid-column: span 2 / span 2; }
  .bento-sm { grid-column: span 2 / span 2; }
}
@media (min-width: 1024px) {
  .bento-lg { grid-column: span 2 / span 2; }
  .bento-sm { grid-column: span 1 / span 1; }
}

/* ---------------------------------------------------------------
   8. Stepper (how it works)
--------------------------------------------------------------- */
.stepper { display: grid; gap: 2.5rem; }
@media (min-width: 768px) {
  .stepper { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; }
  .stepper::before {
    content: ""; position: absolute; top: 1.75rem; left: 12%; right: 12%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--border-strong) 0 10px, transparent 10px 18px);
  }
}
.stepper-num {
  width: 3.5rem; height: 3.5rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); position: relative; z-index: 1;
}

/* ---------------------------------------------------------------
   9. Stats strip
--------------------------------------------------------------- */
.stat-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1; }

/* ---------------------------------------------------------------
   10. Form controls (generator)
--------------------------------------------------------------- */
input[type=range] {
  width: 100%; height: 8px; border-radius: 9999px;
  background: linear-gradient(to right, var(--brand-500) 50%, var(--border) 50%);
  appearance: none; cursor: pointer; transition: background 0.3s ease;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand-500), var(--shadow-sm);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 0 0 1px var(--brand-500), var(--shadow-sm);
}

.toggle {
  position: relative; width: 46px; height: 26px; border-radius: 9999px;
  background-color: var(--border-strong); transition: all 0.35s; flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.35s;
}
input:checked + .toggle { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); }
input:checked + .toggle::after { transform: translateX(20px); }
input:focus-visible + .toggle { outline: 2px solid var(--brand-400); outline-offset: 2px; }

.mode-tabs { display: inline-flex; padding: 0.25rem; gap: 0.25rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 0.9rem; }
.mode-tab {
  padding: 0.55rem 1rem; border-radius: 0.65rem; font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.mode-tab.active { background: #fff; color: var(--brand-600); box-shadow: var(--shadow-sm); }

.strength-track { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.strength-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease, background-color 0.4s ease; }

/* ---------------------------------------------------------------
   11. Accordion (FAQ)
--------------------------------------------------------------- */
.accordion-item { border: 1px solid var(--border); border-radius: 1.1rem; background: var(--surface); overflow: hidden; position: relative; }
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem; text-align: left; font-weight: 700; cursor: pointer; background: none; border: none; color: var(--text);
}
.accordion-trigger .chev { transition: transform 0.3s ease; flex-shrink: 0; color: var(--brand-500); }
.accordion-item[data-open="true"] .chev { transform: rotate(180deg); }
.accordion-item[data-open="true"] { border-color: var(--brand-300, var(--brand-400)); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.accordion-panel-inner { padding: 0 1.35rem 1.35rem; color: var(--text-muted); line-height: 1.65; }

/* ---------------------------------------------------------------
   12. Comparison table
--------------------------------------------------------------- */
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.compare-table th, .compare-table td { padding: 0.9rem 1rem; text-align: center; border-bottom: 1px solid var(--border); }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table thead th { font-family: var(--font-display); font-size: 0.9rem; }
.compare-table .col-highlight { background: var(--brand-50); border-left: 1px solid var(--brand-100); border-right: 1px solid var(--brand-100); }

/* ---------------------------------------------------------------
   13. Confetti (very-strong-password micro-celebration)
--------------------------------------------------------------- */
.confetti-piece {
  position: fixed; top: -10px; z-index: 9998; pointer-events: none;
  width: 8px; height: 8px; border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(80vh) rotate(540deg); opacity: 0; }
}

/* ---------------------------------------------------------------
   14. Breach timeline
--------------------------------------------------------------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 0.4rem; top: 0.4rem; bottom: 0.4rem; width: 2px;
  background: linear-gradient(var(--brand-300, var(--brand-400)), var(--teal-500));
}
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -2rem; top: 0.15rem; width: 0.85rem; height: 0.85rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-500), var(--teal-500)); box-shadow: 0 0 0 4px var(--surface-2);
}
.timeline-year { font-family: var(--font-display); font-weight: 800; color: var(--brand-600); font-size: 0.85rem; }

/* ---------------------------------------------------------------
   15. Wall of shame (worst passwords)
--------------------------------------------------------------- */
.shame-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem 1rem; border-radius: 0.75rem; background: var(--surface-2); border: 1px solid var(--border);
}
.shame-rank { font-family: var(--font-display); font-weight: 800; color: var(--text-soft); font-size: 0.8rem; width: 1.5rem; }
.shame-pwd { font-family: ui-monospace, monospace; text-decoration: line-through; color: var(--text-soft); flex: 1; }

/* ---------------------------------------------------------------
   16. Misc
--------------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--brand-600); color: #fff; padding: 0.75rem 1.25rem; border-radius: 0 0 0.5rem 0;
}
.skip-link:focus { left: 0; }

.focus-ring:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 0.4rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
