/**
 * Candor marketing site — professional design layer.
 * Content and copy are unchanged; only visual consistency and polish.
 */

:root {
  --candor-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --candor-text: #0f172a;
  --candor-text-muted: #64748b;
  --candor-surface: #ffffff;
  --candor-bg: #f8fafc;
  --candor-blue: #2563eb;
  --candor-blue-dark: #1d4ed8;
  --candor-green: #059669;
  --candor-green-light: #10b981;
  --candor-border: rgba(15, 23, 42, 0.08);
  --candor-radius-sm: 8px;
  --candor-radius: 12px;
  --candor-radius-lg: 16px;
  --candor-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --candor-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --candor-max-width: 1400px;
  --candor-header-spacer: 80px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--candor-font) !important;
  color: var(--candor-text);
  line-height: 1.65 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Layout rhythm */
.container {
  max-width: var(--candor-max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

main#main-content {
  outline: none;
}

/* Typography — professional hierarchy without changing text */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--candor-font) !important;
  color: var(--candor-text);
  letter-spacing: -0.02em;
  line-height: 1.25 !important;
}

p {
  line-height: 1.7;
}

/* Links */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* Primary actions */
.btn-primary,
a.btn-primary,
button.btn-primary {
  border-radius: var(--candor-radius) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  box-shadow: var(--candor-shadow-sm) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.btn-primary:hover,
a.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--candor-shadow-md) !important;
}

.btn-outline,
a.btn-outline,
.btn-outline-primary,
a.btn-outline-primary {
  border-radius: var(--candor-radius) !important;
  font-weight: 600 !important;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease !important;
}

/* Cards & sections */
.premium-card,
.feature-deep-card,
.card {
  border-radius: var(--candor-radius-lg) !important;
  border-color: var(--candor-border) !important;
}

.section-padding {
  padding-top: clamp(64px, 8vw, 96px) !important;
  padding-bottom: clamp(64px, 8vw, 96px) !important;
}

/* Imagery */
img {
  max-width: 100%;
  height: auto;
}

/* Header — refined chrome (logo size set in site-chrome.css) */
header.header {
  padding: 12px 0 !important;
  border-bottom-color: var(--candor-border) !important;
  box-shadow: var(--candor-shadow-sm) !important;
}

header.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-link {
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}

.nav-link.signup-btn-style {
  border-radius: var(--candor-radius-sm) !important;
}

.nav-download-btn,
a.nav-download-btn,
.drawer-download-btn,
.drawer-links a[onclick*="openDownloadModal"] {
  border-radius: var(--candor-radius-sm) !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
}

.nav-download-btn:hover,
a.nav-download-btn:hover,
.drawer-download-btn:hover,
.drawer-links a[onclick*="openDownloadModal"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.38) !important;
  filter: brightness(1.05);
}

/* Hero / CTA primary download buttons */
.hero-buttons a[onclick*="openDownloadModal"],
.cta-buttons a[onclick*="openDownloadModal"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-buttons a[onclick*="openDownloadModal"]::before,
.cta-buttons a[onclick*="openDownloadModal"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 35%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.1) 65%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: candor-download-shine 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-buttons a[onclick*="openDownloadModal"]::before,
  .cta-buttons a[onclick*="openDownloadModal"]::before {
    animation: none;
  }
}

/* Fixed-header spacer consistency */
body > div[style*="height: 80px"],
body > div[style*="height: 92px"] {
  height: var(--candor-header-spacer) !important;
  min-height: var(--candor-header-spacer) !important;
}

/* Footer — align with header quality */
footer {
  margin-top: auto;
}

footer .footer-section h3 {
  letter-spacing: 0.01em;
}

/* Policy / legal pages */
.policy-modal,
.modal-content {
  border-radius: var(--candor-radius-lg) !important;
}

/* Forms — contact modals */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  border-radius: var(--candor-radius-sm) !important;
  border-color: var(--candor-border) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--candor-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

/* Focus accessibility */
*:focus-visible {
  outline: 2px solid var(--candor-blue) !important;
  outline-offset: 2px !important;
}

/* Tables & data blocks */
table {
  border-collapse: collapse;
}

/* Mobile drawer */
.mobile-drawer {
  border-radius: 0 var(--candor-radius-lg) var(--candor-radius-lg) 0;
}

.drawer-links a:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--candor-blue);
}

/* ── Alignment audit: centered section intros & grids (all pages) ── */

.section-header,
.text-center.mb-5,
.text-center.mt-5,
.features-hero,
.pricing-hero,
.cta-box {
  text-align: center !important;
}

.section-header,
.text-center.mb-5,
.text-center.mt-5 {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
}

.section-header h1,
.section-header h2,
.section-header h3,
.section-title,
.section-subtitle,
.text-center.mb-5 h1,
.text-center.mb-5 h2,
.text-center.mb-5 h3,
.text-center.mb-5 h4,
.text-center.mb-5 p,
.text-center.mb-5 span,
.text-center.mt-5 p,
.features-hero h1,
.features-hero h2,
.features-hero p,
.pricing-hero h1,
.pricing-hero p,
.cta-box h2,
.cta-box p {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.section-subtitle,
.text-center.mb-5 p,
.text-center.mt-5 p,
.features-hero p,
.pricing-hero p {
  max-width: 52rem;
}

.text-center.mb-5 h2,
.section-header h2,
.section-title {
  max-width: 56rem;
  width: 100%;
}

.hero-badge {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Paddle callout badge: desktop left / mobile center (see site-pages.css) */
.paddle-callout .hero-badge {
  display: inline-block;
}

/* Database / platform connectivity block */
body:not(.page-features) .db-grid {
  width: 100%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  justify-items: stretch;
}

body:not(.page-features) .db-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Centered content blocks below section titles */
.feature-deep-list,
.faq-accordion,
.pricing-grid,
.pricing-grid-cursor,
.pricing-plans-grid,
.benefits-grid,
.value-props-grid,
.use-cases-grid,
.security-features {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Split / two-column heroes stay left-aligned */
.about-hero .row > .col-lg-6:first-child,
.about-hero .row > [class*="col-"]:first-child {
  text-align: left !important;
}

.about-hero .row > .col-lg-6:first-child h1,
.about-hero .row > .col-lg-6:first-child h3,
.about-hero .row > .col-lg-6:first-child p {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.split-layout .split-text {
  text-align: left;
  align-items: flex-start;
}

.split-layout .split-text h2,
.split-layout .split-text p,
.split-layout .split-text span {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Bootstrap row cards under centered headers */
.section-header + .row,
.text-center.mb-5 + .row,
.text-center.mb-5 + .feature-deep-list,
.text-center.mb-5 + .db-grid {
  width: 100%;
}

/* Index comparison & FAQ */
.comparison-table,
.faq-list {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  header.header .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  footer .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body:not(.page-features) .text-center.mb-5 h2,
  body:not(.page-features) .section-title {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
  }
}
