/* 
  Design System Tokens
*/
:root {
  /* Colors */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  
  --text-dark: #0F172A;
  --text-muted: #64748B;
  
  --bg-white: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-gray: #F1F5F9;
  
  --border-color: #E2E8F0;
  
  --success: #10B981;
  
  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Radius */
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.bg-light { background-color: var(--bg-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-dark);
}

.btn-ghost:hover {
  background-color: var(--bg-gray);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--bg-light);
  border-color: var(--text-muted);
}

.btn-large {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  /* Solid white — no rgba, no blur. Anything translucent leaks the hero
     copy through the bar when scrolled. The visibility is controlled by
     translateY toggled from cannonsign_landing.js (CSP-safe external). */
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
  transition: transform 0.25s ease;
  will-change: transform;
}

.navbar.nav-hidden {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* CannonSign — match the app's signed-in navbar wrapper (max-w-6xl + px-4 /
   md:px-2) so the logo lands at the same x-coordinate on the landing and
   on every Rails-rendered page. */
.navbar .container.nav-container {
  max-width: 1152px;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .navbar .container.nav-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.logo img {
  /* Matches DocuSeal _title.html.erb (height: 72px !important) so the logo
     lands in the same spot on the landing as on every signed-in page. */
  height: 72px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-dark);
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-dark);
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
  background: radial-gradient(circle at top right, var(--primary-light), transparent 50%),
              radial-gradient(circle at bottom left, #F5F3FF, transparent 50%);
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #DBEAFE;
  color: #1E40AF;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 90%;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-trust {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Hero Visual / Mockup */
.hero-visual {
  position: relative;
  perspective: 1000px;
}

.document-mockup {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s ease;
}

.document-mockup:hover {
  transform: rotateY(0) rotateX(0);
}

.mockup-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.mockup-dots {
  display: flex;
  gap: 0.35rem;
}

.mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #CBD5E1;
}

.mockup-dots span:nth-child(1) { background-color: #EF4444; }
.mockup-dots span:nth-child(2) { background-color: #F59E0B; }
.mockup-dots span:nth-child(3) { background-color: #10B981; }

.mockup-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.mockup-body {
  padding: 2rem;
  height: 350px;
  position: relative;
}

.mockup-line {
  height: 8px;
  background-color: #E2E8F0;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.mockup-gap { height: 2rem; }

.mockup-text {
  font-size: 0.875rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-family: monospace;
}

.variable-tag {
  background-color: #FEF08A;
  color: #854D0E;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 600;
}

.signature-block {
  margin-top: 3rem;
  width: 200px;
}

.sign-here {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.signature-line {
  border-bottom: 2px dashed var(--primary);
}

.floating-element {
  position: absolute;
  background: white;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  animation: float 6s ease-in-out infinite;
}

.float-1 {
  top: 10%;
  right: -10%;
  animation-delay: 0s;
}

.float-2 {
  bottom: 20%;
  left: -15%;
  animation-delay: 3s;
}

.icon-check, .icon-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
}

.icon-check { background-color: #D1FAE5; color: #059669; }
.icon-lock { background-color: #DBEAFE; color: #2563EB; }

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Logo Cloud */
.logo-cloud {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
}

.logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.logos:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.logo-placeholder {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: sans-serif;
  color: var(--text-dark);
}

/* Features Section */
.features {
  padding: 6rem 0;
}

.section-header {
  margin-bottom: 4rem;
  max-width: 600px;
  margin-inline: auto;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.icon-blue { background-color: #DBEAFE; color: #1E40AF; }
.icon-purple { background-color: #F3E8FF; color: #6B21A8; }
.icon-green { background-color: #D1FAE5; color: #065F46; }
.icon-orange { background-color: #FFEDD5; color: #9A3412; }

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
  padding: 6rem 0;
  background: var(--text-dark);
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.4) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.125rem;
  color: #94A3B8;
  margin-bottom: 2rem;
}

.cta-btn {
  background-color: white;
  color: var(--text-dark);
}

.cta-btn:hover {
  background-color: var(--bg-light);
  transform: scale(1.05);
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1rem;
  filter: grayscale(1) opacity(0.8);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 300px;
}

.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    margin: 0 auto 2rem;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-visual {
    max-width: 500px;
    margin: 0 auto;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .floating-element {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Marketing subpages — How it Works + Pricing.
   The landing page already supplies the navbar/footer/CTA styles; below are
   the additions that only those two pages need.
   -------------------------------------------------------------------------- */

.page-hero {
  padding: 9rem 0 4rem;
  text-align: center;
}

.page-hero .badge {
  margin-left: auto;
  margin-right: auto;
}

.page-hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 1rem 0 1.25rem;
  color: var(--text-dark);
}

.page-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Steps (How it Works) ------------------------------------------------ */

.steps-section {
  padding: 4rem 0 5rem;
}

.step-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.step-row:last-child {
  border-bottom: 0;
}

.step-num {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #14b8a6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.step-body h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0.25rem 0 0.5rem;
  color: var(--text-dark);
}

.step-body p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.step-body .variable-tag {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}

/* --- Pricing ------------------------------------------------------------- */

.pricing-section {
  padding: 3rem 0 5rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pricing-card {
  position: relative;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.pricing-card-featured {
  border: 2px solid #2563EB;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.18);
  transform: translateY(-4px);
}

.pricing-card-featured:hover {
  transform: translateY(-8px);
}

.pricing-tag {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563EB, #14b8a6);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

.pricing-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}

.price-period {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.pricing-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.25rem;
  min-height: 2.75rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  flex-grow: 1;
}

.pricing-features li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.6rem;
  font-size: 0.95rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
  border-bottom: 0;
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background-color: #DBEAFE;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

.pricing-cta {
  width: 100%;
  justify-content: center;
}

.pricing-note {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- FAQ grid (used on Pricing) ------------------------------------------ */

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.faq-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: 1.5rem;
}

.faq-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
}

.faq-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.inline-link {
  color: #2563EB;
  text-decoration: underline;
}

/* --- Subpage responsive -------------------------------------------------- */

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .pricing-card-featured {
    transform: none;
  }

  .pricing-card-featured:hover {
    transform: translateY(-4px);
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page-hero {
    padding: 7rem 0 3rem;
  }

  .step-row {
    gap: 1rem;
  }

  .step-num {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.05rem;
  }
}
