/* ==========================================================================
   iTradeAIMS Theme - Main / Global Styles
   ========================================================================== */

/* Modern CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-primary);
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--bg-surface-elevated);
  clip: auto !important;
  clip-path: none;
  color: var(--accent-primary);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 8px;
  top: 8px;
  padding: 12px 18px;
  text-decoration: none;
  width: auto;
  z-index: 100000;
  border-radius: 6px;
  outline: 2px solid var(--accent-primary);
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #1c2433;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2a374d;
}

/* Hero & Preview Layout */
/* Site Main & Page Containers */
.site-main {
  flex: 1;
  width: 100%;
}

.front-page-main {
  min-height: calc(100vh - var(--header-offset));
  padding-top: var(--header-offset);
}

.page-main {
  min-height: calc(100vh - var(--header-offset));
  padding-top: var(--header-offset);
}

.page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px var(--container-padding) 100px;
}

.page-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.page-content {
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 16px;
  letter-spacing: -0.02em;
}

.page-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 12px;
}

.page-content p {
  margin-bottom: 20px;
}

.page-content ul,
.page-content ol {
  margin: 0 0 24px 24px;
}

.page-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.page-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.page-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content a:hover {
  color: #60a5fa;
}

.page-content .policy-callout {
  background: rgba(0, 122, 255, 0.08);
  border: 1px solid rgba(0, 122, 255, 0.25);
  border-left: 4px solid var(--accent-primary);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
  color: var(--text-primary);
}

/* Universal Page Hero Header (Products, Customer Stories, Support, etc.) */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(0, 122, 255, 0.08);
  border: 1px solid rgba(0, 122, 255, 0.25);
  border-radius: 9999px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-badge .badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-primary);
}

.page-hero-header {
  padding: 60px 24px 48px;
  text-align: center;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0, 122, 255, 0.12), transparent 70%);
  border-bottom: 1px solid var(--border-subtle);
}

.page-hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.page-hero-title {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-hero-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.has-page-hero .page-container {
  padding-top: 48px;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  padding: 24px 0;
  margin-top: auto;
}

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

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.copyright-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}
