/* ==========================================================================
   BUnique Pay — stylesheet
   ========================================================================== */

/* Dark theme (default). A small inline script in <head> sets
   data-theme="light" or "dark" on <html> before first paint — light by
   day, dark by evening, or whatever the visitor last chose. */
:root {
  --bg: #070a1e;
  --bg-alt: #0a0e27;
  --surface: #10163a;
  --surface-2: #141b47;
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #eef2ff;
  --text-dim: #9aa7d4;
  --text-dimmer: #6c76a3;
  --accent: #00e5a0;
  --accent-2: #00b8d9;
  --accent-purple: #7c5cfc;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --shadow-glow: 0 0 60px rgba(0, 229, 160, 0.15);
  --ff-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-head: "Space Grotesk", "Manrope", system-ui, sans-serif;

  /* theme-dependent helpers used by a few hand-tuned backgrounds below */
  --scrim-strong: rgba(7, 10, 30, 0.55);
  --scrim-weak: rgba(7, 10, 30, 0.05);
  --header-scroll-bg: rgba(7, 10, 30, 0.85);
  --benefits-grad-end: #0c1130;
  --hero-glow-1: rgba(0, 184, 217, 0.18);
  --hero-glow-2: rgba(124, 92, 252, 0.14);
  --card-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

/* Light theme overrides */
:root[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f9;
  --border: rgba(15, 23, 60, 0.1);
  --border-soft: rgba(15, 23, 60, 0.07);
  --text: #0c1130;
  --text-dim: #4a5480;
  --text-dimmer: #7883ac;
  --accent: #00a67a;
  --accent-2: #0090ab;
  --accent-purple: #6a4de0;
  --shadow-glow: 0 0 60px rgba(0, 166, 122, 0.12);

  --scrim-strong: rgba(255, 255, 255, 0.75);
  --scrim-weak: rgba(255, 255, 255, 0.1);
  --header-scroll-bg: rgba(255, 255, 255, 0.85);
  --benefits-grad-end: #e9edf7;
  --hero-glow-1: rgba(0, 144, 171, 0.12);
  --hero-glow-2: rgba(106, 77, 224, 0.1);
  --card-shadow: 0 16px 36px rgba(15, 23, 60, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

section, .site-header, .site-footer, .problem-card, .benefit-card, .step,
.faq-item, .contact-inner, .compare-table-wrap, .form-row input, .form-row textarea {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 12px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06121a;
  box-shadow: 0 8px 24px rgba(0, 229, 160, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 229, 160, 0.35); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--header-scroll-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 0;
  border-bottom-color: var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text {
  font-family: var(--ff-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.logo-text b { color: var(--accent); font-weight: 700; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--ff-head);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dimmer);
}
.lang-toggle .lang-opt { padding: 2px 4px; color: var(--text-dimmer); transition: color 0.2s ease; }
.lang-toggle .lang-opt.active { color: var(--accent); }
.lang-toggle .lang-sep { color: var(--border); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, background-color 0.35s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle .theme-icon { display: none; font-size: 0.95rem; line-height: 1; }
/* dark mode: show a sun (click to switch to light) */
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline-block; }
/* light mode: show a moon (click to switch to dark) */
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline-block; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, var(--hero-glow-1), transparent 60%),
              radial-gradient(ellipse 60% 50% at 15% 85%, var(--hero-glow-2), transparent 60%),
              var(--bg-alt);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, var(--bg) 100%),
              linear-gradient(90deg, var(--scrim-strong) 0%, var(--scrim-weak) 45%, transparent 65%);
}
.hero-inner { position: relative; z-index: 3; }
.hero-copy { max-width: 640px; }

.pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 229, 160, 0.1);
  border: 1px solid rgba(0, 229, 160, 0.3);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--text);
  margin-bottom: 22px;
}
.hero h1 .highlight {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 32px;
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 52px; }

.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.stat { display: flex; flex-direction: column; gap: 4px; max-width: 170px; }
.stat-num { font-family: var(--ff-head); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text-dimmer); line-height: 1.4; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 24px;
  height: 38px;
  border: 2px solid var(--border);
  border-radius: 14px;
}
.scroll-hint span {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- trust strip ---------- */
.trust-strip { background: var(--bg); border-bottom: 1px solid var(--border-soft); padding: 28px 0; }
.trust-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.trust-label { font-size: 0.78rem; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.06em; }
.trust-logos { display: flex; gap: 32px; flex-wrap: wrap; }
.trust-logo { font-family: var(--ff-head); font-weight: 600; font-size: 0.95rem; color: var(--text-dimmer); opacity: 0.8; }

/* ---------- section shared ---------- */
section { position: relative; padding: 110px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--ff-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.section-head p { font-size: 1.02rem; max-width: 520px; margin-left: auto; margin-right: auto; }

.section-head, .problem-card, .step, .benefit-card, .compare-table-wrap, .faq-item, .contact-inner {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.section-head.in-view, .problem-card.in-view, .step.in-view, .benefit-card.in-view,
.compare-table-wrap.in-view, .faq-item.in-view, .contact-inner.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- problem ---------- */
.problem { background: var(--bg); }
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.problem-card:nth-child(2) { transition-delay: 0.08s; }
.problem-card:nth-child(3) { transition-delay: 0.16s; }
.problem-card:nth-child(4) { transition-delay: 0.24s; }
.p-icon { font-size: 1.8rem; margin-bottom: 16px; }
.problem-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.problem-card p { font-size: 0.92rem; margin: 0; }

/* ---------- how it works ---------- */
.how { background: var(--bg-alt); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step { position: relative; padding: 28px 22px 0; border-top: 1px solid var(--border); }
.step:nth-child(2) { transition-delay: 0.08s; }
.step:nth-child(3) { transition-delay: 0.16s; }
.step:nth-child(4) { transition-delay: 0.24s; }
.step-num {
  font-family: var(--ff-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: 0.92rem; margin: 0; }

/* ---------- benefits ---------- */
.benefits {
  background: linear-gradient(180deg, var(--bg) 0%, var(--benefits-grad-end) 100%);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background-color 0.35s ease;
}
.benefit-card:hover {
  border-color: rgba(0, 229, 160, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}
.b-icon {
  font-size: 1.5rem;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 229, 160, 0.1);
  border-radius: 12px;
  margin-bottom: 16px;
}
.benefit-card h3 { font-size: 1rem; margin-bottom: 6px; }
.benefit-card p { font-size: 0.88rem; margin: 0; }

/* ---------- compare ---------- */
.compare { background: var(--bg); }
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td {
  padding: 18px 22px;
  text-align: left;
  font-size: 0.94rem;
  border-bottom: 1px solid var(--border-soft);
}
.compare-table thead th {
  font-family: var(--ff-head);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dimmer);
  border-bottom: 1px solid var(--border);
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td.col-bank { color: var(--text-dimmer); }
.compare-table td.col-bunique, .compare-table th.col-bunique {
  color: var(--accent);
  font-weight: 600;
}
.compare-table th.col-bunique { color: var(--accent); }
.compare-table td:first-child { color: var(--text); font-weight: 500; }

/* ---------- faq ---------- */
.faq { background: var(--bg-alt); }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.faq-item:nth-child(even) { transition-delay: 0.06s; }
.faq-item summary {
  cursor: pointer;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.25s ease;
  margin-left: 12px;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 14px; margin-bottom: 0; font-size: 0.92rem; }

/* ---------- contact ---------- */
.contact { background: var(--bg); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px;
}
.contact-copy h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); }
.contact-details { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.contact-line { font-size: 0.95rem; color: var(--text-dim); }
a.contact-line:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.82rem; color: var(--text-dimmer); font-weight: 500; }
.form-row input, .form-row textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.form-status { font-size: 0.85rem; min-height: 1.2em; margin: 4px 0 0; text-align: center; }
.form-status.success { color: var(--accent); }
.form-status.error { color: var(--danger); }
.form-status.pending { color: var(--text-dimmer); }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border-soft); padding: 56px 0 28px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr 1.2fr;
  gap: 32px;
  align-items: start;
}
.footer-brand p { font-size: 0.88rem; margin-top: 10px; max-width: 260px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { font-size: 0.88rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }
.footer-legal { text-align: right; }
.footer-legal p { font-size: 0.78rem; color: var(--text-dimmer); margin: 0 0 4px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .problem-grid, .steps, .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; padding: 40px 28px; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; gap: 22px; }
  .footer-legal { text-align: left; }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 0; width: 100%; }
  .hamburger { display: flex; }
  .header-actions .btn-sm { display: none; }
  .header-actions { gap: 8px; }
  .logo-text { white-space: nowrap; }
  section { padding: 76px 0; }
  .hero { padding-top: 100px; }
  .hero-stats { gap: 24px; }
  .problem-grid, .steps, .benefits-grid { grid-template-columns: 1fr; }
  .trust-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  .contact-inner { padding: 30px 20px; }
}

@media (max-width: 400px) {
  .header-inner { gap: 10px; }
  .logo-text { font-size: 1rem; }
  .theme-toggle { width: 30px; height: 30px; }
  .lang-toggle { padding: 6px 9px; }
  .header-actions { gap: 6px; }
}
