/* ============================================================
   UseSaved marketing site — design system tokens
   Source of truth: D:\viber-projects\UseSaved\DESIGN-SYSTEM.md
   Palette: #150485 navy / #590995 violet / #C62A88 magenta / #03C4A1 teal
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #150485;
  --secondary:      #590995;
  --magenta:        #C62A88;
  --teal:           #03C4A1;
  --teal-dark:      #02a889;
  --surface:        #ffffff;
  --surface-var:    #f5f3ff;
  --outline:        #e8e6ff;
  --outline-strong: #c4c0e0;
  --text:           #111827;
  --text-2:         #4b4b6b;
  --text-3:         #9ca3af;
  --radius-full:    9999px;
  --radius-md:      12px;
  --radius-sm:      8px;
  --gradient:       linear-gradient(135deg, #150485 0%, #590995 100%);
  --shadow-card:    0 4px 16px rgba(21, 4, 133, 0.16);
}

html {
  scroll-behavior: smooth;
  /* Stops the empty rubber-band/bounce effect without disabling a real pull-to-refresh */
  overscroll-behavior-y: contain;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Header ─────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--outline);
}
.wordmark {
  display: flex; align-items: center;
  text-decoration: none;
}
/* Single fixed-proportion asset — the icon+wordmark lockup as submitted.
   Never rebuild this from a separate icon + hand-sized text; only scale
   this image as one unit (height sets the size, width follows the file's
   native 1679:946 aspect ratio automatically). */
.wordmark-lockup { height: 38px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.nav a:hover { color: var(--primary); }
.nav .nav-cta {
  background: var(--teal); color: #000; font-weight: 700; font-size: 14px;
  padding: 9px 20px; border-radius: var(--radius-full);
  white-space: nowrap;
}
.nav .nav-cta:hover { background: var(--teal-dark); color: #000; }

/* ── Hero ───────────────────────────────────── */
.hero {
  background: var(--primary);
  background-image: var(--gradient);
  color: #fff;
  text-align: center;
  padding: 72px 20px 88px;
}
.hero h1 { font-size: clamp(32px, 5.5vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.hero .definition {
  max-width: 620px; margin: 18px auto 0;
  font-size: clamp(16px, 2.2vw, 19px); color: rgba(255, 255, 255, 0.88);
}
.hero .definition strong { color: #fff; }

/* Signup card inside hero */
.signup-card {
  max-width: 560px; margin: 36px auto 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px;
  text-align: left;
  color: var(--text);
}
.signup-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row input[type="email"] {
  flex: 1 1 220px;
  padding: 12px 16px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--outline-strong); border-radius: var(--radius-sm);
  color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-row input[type="email"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 4, 133, 0.08);
}
.cta-btn {
  background: var(--teal); color: #000;
  font-size: 15px; font-weight: 700; font-family: inherit;
  padding: 12px 26px; border: none; border-radius: var(--radius-full);
  cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.cta-btn:hover:not(:disabled)  { background: var(--teal-dark); }
.cta-btn:active { transform: scale(0.98); }
.cta-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.consent-area { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.consent-row  { display: flex; align-items: flex-start; }
.checkbox-label, .toggle-label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.checkbox-label input { margin-top: 3px; accent-color: var(--primary); }
.consent-text { font-size: 13px; color: var(--text-2); }
.consent-text a { color: var(--secondary); }

/* Toggle */
.toggle-wrap { position: relative; width: 36px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; border-radius: var(--radius-full);
  background: var(--outline-strong); transition: background 0.2s; cursor: pointer;
}
.slider::before {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform 0.2s;
}
.toggle-wrap input:checked + .slider { background: var(--teal); }
.toggle-wrap input:checked + .slider::before { transform: translateX(16px); }

.form-note    { margin-top: 14px; font-size: 12px; color: var(--text-3); }
.social-proof { margin-top: 6px; font-size: 12px; color: var(--text-3); }
.error-msg    { margin-top: 10px; font-size: 13px; color: #dc2626; }

/* Success state */
.success-box  { text-align: left; }
.success-main { font-size: 18px; font-weight: 700; color: #065f46; }
.success-sub  { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.role-section { margin-top: 18px; }
.role-label   { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.role-pills   { display: flex; flex-wrap: wrap; gap: 8px; }
.role-pill {
  font-size: 13px; font-family: inherit; padding: 8px 16px;
  background: var(--surface-var); color: var(--primary);
  border: 1px solid var(--outline); border-radius: var(--radius-full);
  cursor: pointer; transition: all 0.15s;
}
.role-pill:hover, .role-pill.selected { background: #e8e3ff; border-color: var(--primary); }
.role-thanks { font-size: 14px; color: #065f46; }

.hero-secondary { margin-top: 18px; font-size: 14px; }
.hero-secondary a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; }
.hero-secondary a:hover { color: #fff; }

/* ── Sections ───────────────────────────────── */
section.band       { padding: 72px 20px; }
section.band.tint  { background: var(--surface-var); }
.band-inner        { max-width: 960px; margin: 0 auto; }
.section-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--secondary); margin-bottom: 10px;
}
section.band h2 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; }
.band-sub { font-size: 16px; color: var(--text-2); max-width: 640px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 34px; }
.step-card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius-md); padding: 24px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: #000; font-weight: 700; font-size: 15px;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: 14px; color: var(--text-2); }

/* Cards grid (use cases) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 34px; }
.info-card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius-md); padding: 24px;
}
.info-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--primary); }
.info-card em  { display: block; font-size: 13px; color: var(--magenta); font-style: normal; font-weight: 600; margin-bottom: 8px; }
.info-card p   { font-size: 14px; color: var(--text-2); }

/* Comparison table — scrolls horizontally instead of breaking layout on narrow screens */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 30px; }
.table-scroll .compare-table { margin-top: 0; min-width: 480px; }
.compare-table { width: 100%; border-collapse: collapse; margin-top: 30px; font-size: 14px; }
.compare-table th, .compare-table td {
  text-align: left; padding: 12px 14px; border: 1px solid var(--outline); color: var(--text-2);
}
.compare-table th { background: var(--surface-var); color: var(--text); font-weight: 700; }
.compare-table td:first-child { font-weight: 600; color: var(--text); }

/* FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius-md); padding: 16px 20px; margin-top: 12px;
}
.faq summary { font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text); }
.faq details p { margin-top: 10px; font-size: 14px; color: var(--text-2); }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 34px; max-width: 720px; }
.price-card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius-md); padding: 30px;
}
.price-card.featured { border: 2px solid var(--teal); box-shadow: var(--shadow-card); }
.price-card .plan   { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--secondary); }
.price-card .amount { font-size: 38px; font-weight: 800; margin: 10px 0 2px; }
.price-card .per    { font-size: 13px; color: var(--text-3); }
.price-card ul      { list-style: none; margin: 18px 0 22px; }
.price-card li      { font-size: 14px; color: var(--text-2); padding: 5px 0 5px 26px; position: relative; }
.price-card li::before {
  content: "✓"; position: absolute; left: 0; top: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal); color: #000; font-size: 11px; font-weight: 700;
}

/* Final CTA band */
.cta-band { background: var(--primary); background-image: var(--gradient); color: #fff; text-align: center; padding: 64px 20px; }
.cta-band h2 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; }
.cta-band p  { margin-top: 10px; color: rgba(255,255,255,0.85); font-size: 15px; }
.cta-band .cta-btn { margin-top: 24px; display: inline-block; text-decoration: none; }

/* ── Footer ─────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--outline); background: var(--surface-var);
  padding: 28px 24px; text-align: center;
  font-size: 13px; color: var(--text-3);
}
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Subpage hero (smaller, for /how-it-works, /pricing) */
.subhero {
  background: var(--primary); background-image: var(--gradient);
  color: #fff; text-align: center; padding: 56px 20px;
}
.subhero h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.subhero p  { margin-top: 12px; color: rgba(255,255,255,0.88); font-size: 16px; max-width: 620px; margin-left: auto; margin-right: auto; }

@media (max-width: 640px) {
  /* Drop the two secondary text links; keep Log in and the CTA reachable */
  .nav a.nav-secondary { display: none; }
  .nav { gap: 12px; }
  .wordmark-lockup { height: 32px; }
}

@media (max-width: 560px) {
  .hero { padding: 52px 16px 64px; }
  .signup-card { padding: 20px; }
  .subhero { padding: 44px 16px; }
  section.band { padding: 48px 16px; }
  .price-card { padding: 22px; }
  .steps, .card-grid { gap: 14px; }
}

@media (max-width: 400px) {
  .input-row { flex-direction: column; align-items: stretch; }
  .cta-btn { width: 100%; }
}
