/* ==========================================================================
   Sub2Unlock — Premium Blue + White theme with Dark Mode & Glassmorphism
   ========================================================================== */

:root {
  --blue-600: #3b5bfd;
  --blue-700: #2f47d6;
  --blue-500: #5b78ff;
  --blue-100: #e8ecff;
  --ink: #10152b;
  --ink-soft: #4b5170;
  --bg: #f6f7fc;
  --surface: #ffffff;
  --border: rgba(16, 21, 43, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-lg: 0 20px 50px -18px rgba(59, 91, 253, 0.35);
  --shadow-sm: 0 6px 18px -10px rgba(16, 21, 43, 0.15);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
  --ink: #eef0ff;
  --ink-soft: #b6bcdf;
  --bg: #0b0e1f;
  --surface: #12162d;
  --border: rgba(255, 255, 255, 0.08);
  --blue-100: rgba(91, 120, 255, 0.14);
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4, .brand, .btn-primary-lg { font-family: var(--font-display); }

a { text-decoration: none; color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  backdrop-filter: blur(10px);
}
.brand { font-size: 1.3rem; font-weight: 800; color: var(--blue-600); display: flex; align-items: center; gap: 4px; }
.site-header nav a { font-weight: 600; color: var(--ink-soft); font-size: .95rem; }
.site-header nav a.active, .site-header nav a:hover { color: var(--blue-600); }
.theme-toggle, .navbar-toggler-custom {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
}

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: -320px; width: 280px; height: 100vh; z-index: 200;
  background: var(--surface); box-shadow: -10px 0 40px rgba(0,0,0,.15);
  padding: 70px 28px; display: flex; flex-direction: column; gap: 22px;
  transition: right .3s ease;
}
.mobile-menu.open { right: 0; }
.mobile-menu a { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.mobile-menu-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 1.4rem; color: var(--ink); }
.mobile-menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199; display: none; }
.mobile-menu-backdrop.open { display: block; }

/* ---------- Hero ---------- */
.hero-wrap { padding: 40px 0 60px; }
.hero-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px 28px; max-width: 640px; margin: 0 auto;
  border: 1px solid var(--border);
}
.hero-banner {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; border-radius: 18px; padding: 22px 24px; display: flex; gap: 16px; align-items: center;
  margin-bottom: 26px;
}
.hero-banner .icon-circle {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 4px; }
.task-grid .task-cell { display: flex; justify-content: center; min-width: 0; }
.task-grid .task-cell.full { grid-column: 1 / -1; }
.task-btn {
  width: 100%; max-width: 100%; min-width: 0; border: none; border-radius: 14px; padding: 10px 14px; font-weight: 700;
  background: var(--blue-600); color: #fff; display: flex; align-items: center; gap: 6px;
  transition: transform .15s ease, box-shadow .15s ease; cursor: pointer;
  font-size: .88rem; min-height: 44px; justify-content: center;
}
.task-btn span:last-child { white-space: normal; text-align: left; line-height: 1.25; overflow-wrap: break-word; word-break: break-word; min-width: 0; }
.task-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.task-btn.selected { background: #e0433f; color: #fff; }
.task-btn.done { background: #22c55e; cursor: default; }
.task-btn.done:hover { transform: none; box-shadow: none; }
.task-btn .plus-circle {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; font-size: .72rem; flex-shrink: 0;
}
.task-btn.selected .plus-circle { background: rgba(255,255,255,.22); color: #fff; }
.task-btn.done .plus-circle { background: rgba(255,255,255,.3); color: #fff; }
@media (min-width: 400px) {
  .task-btn { font-size: .92rem; padding: 12px 16px; gap: 8px; }
  .task-btn .plus-circle { width: 22px; height: 22px; }
}
@media (min-width: 576px) {
  .task-btn { font-size: .9rem; padding: 13px 18px; gap: 10px; }
  .task-btn .plus-circle { width: 24px; height: 24px; }
}
.form-input-glass {
  background: var(--blue-100); border: none; border-radius: 14px; padding: 16px 18px;
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
}
.form-input-glass input {
  border: none; background: transparent; width: 100%; font-size: .98rem; color: var(--ink); outline: none;
}
.form-input-glass i { color: var(--blue-600); font-size: 1.1rem; }
.btn-generate {
  width: 100%; background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff; border: none; border-radius: 14px; padding: 16px; font-weight: 800; font-size: 1.05rem;
  margin-top: 20px; box-shadow: var(--shadow-lg); transition: transform .15s ease;
}
.btn-generate:hover { transform: translateY(-2px); }

.dark-toggle-row { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 22px 0; }
.switch { position: relative; width: 56px; height: 30px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-toggle {
  position: absolute; inset: 0; background: #ccc; border-radius: 30px; cursor: pointer; transition: .3s;
}
.slider-toggle::before {
  content: ""; position: absolute; height: 24px; width: 24px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.switch input:checked + .slider-toggle { background: var(--blue-600); }
.switch input:checked + .slider-toggle::before { transform: translateX(26px); }

/* ---------- Sections ---------- */
section { padding: 60px 0; }
.section-title { font-weight: 800; font-size: 2rem; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 520px; margin: 0 auto 40px; }

.glass-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px; box-shadow: var(--shadow-sm); height: 100%;
}
.glass-card h3 { font-weight: 700; margin-bottom: 10px; }
.glass-card p { color: var(--ink-soft); margin: 0; }

.step-circle {
  width: 130px; height: 130px; border-radius: 50%; background: var(--blue-100);
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--blue-600);
  margin: 0 auto 20px; position: relative;
}
.step-num {
  position: absolute; top: 0; right: 6px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-600); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}
.step-block { text-align: center; margin-bottom: 40px; }
.step-block h4 { font-weight: 700; }
.step-block p { color: var(--ink-soft); }

.cta-section {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff; border-radius: var(--radius-lg); padding: 50px 30px; text-align: left;
}
.cta-section h2 { font-weight: 800; font-size: 2rem; }
.cta-section p { opacity: .9; }
.btn-outline-white {
  border: 2px solid #fff; color: #fff; border-radius: 12px; padding: 12px 26px; font-weight: 700; display: inline-block;
}
.btn-outline-white:hover { background: #fff; color: var(--blue-600); }

/* FAQ */
.accordion-item { background: var(--surface); border: none; border-bottom: 1px solid var(--border); }
.accordion-button { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: none !important; }
.accordion-button:not(.collapsed) { color: var(--blue-600); background: var(--surface); }
.accordion-body { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: #0b0e1f; color: #cfd3ee; padding: 60px 0 24px; margin-top: 40px; }
.site-footer h3 { color: #fff; font-weight: 800; }
.site-footer h4 { color: #fff; font-weight: 700; margin-bottom: 14px; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer a { display: block; color: #9ba1cc; margin-bottom: 10px; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer hr { border-color: rgba(255,255,255,.1); margin: 30px 0 16px; }
.copyright { color: #7d83ab; font-size: .85rem; text-align: center; margin: 0; }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Generic form / admin utilities ---------- */
.card-clean { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.btn-blue { background: var(--blue-600); color: #fff; border: none; border-radius: 10px; padding: 10px 20px; font-weight: 700; }
.btn-blue:hover { background: var(--blue-700); color: #fff; }
.form-control:focus { border-color: var(--blue-600); box-shadow: 0 0 0 .2rem rgba(59,91,253,.15); }

/* ---------- Unlock (visitor) page ---------- */
.unlock-wrap { max-width: 560px; margin: 60px auto; }
.progress-ring-wrap { text-align: center; margin-bottom: 20px; }
.unlock-task {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 12px;
}
.unlock-task.done { border-color: #22c55e; background: rgba(34,197,94,.06); }
.unlock-task .task-label { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.unlock-task .btn-do { background: var(--blue-600); color: #fff; border: none; border-radius: 10px; padding: 8px 16px; font-weight: 700; font-size: .88rem; }
.unlock-task.done .btn-do { background: #22c55e; }
.unlock-btn-final {
  width: 100%; padding: 16px; border-radius: 14px; border: none; font-weight: 800; font-size: 1.05rem;
  background: #d6dae8; color: #7c8199; margin-top: 10px; transition: all .25s ease;
}
.unlock-btn-final.active {
  background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 15px 30px -12px rgba(34,197,94,.5); cursor: pointer;
}

@media (max-width: 767px) {
  .cta-section { text-align: center; }
  .section-title { font-size: 1.6rem; }
}
