/* Farpath Technology - Custom Styles */

:root {
  --brand-900: #0b1f3a;
  --brand-800: #10305c;
  --brand-700: #17457f;
  --brand-600: #1f5aa6;
  --brand-500: #2b71c9;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
}

.font-display {
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
}

.text-gradient-brand {
  background: linear-gradient(90deg, orange, var(--accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Article content typography ===== */
.article-body {
  color: #475569;
  line-height: 1.75;
  font-size: 1.125rem;
}

.article-body p,
.article-body li,
.article-body blockquote {
  text-align: justify;
  text-justify: inter-word;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body > :last-child {
  margin-bottom: 0;
}

.article-body p {
  margin: 1.25em 0;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  color: #0b1f3a;
  font-weight: 700;
  line-height: 1.3;
}

.article-body h1 { font-size: 2.25em; margin: 2em 0 0.8em; }
.article-body h2 { font-size: 1.5em; margin: 1.8em 0 0.8em; }
.article-body h3 { font-size: 1.25em; margin: 1.6em 0 0.6em; }
.article-body h4 { font-size: 1.125em; margin: 1.4em 0 0.6em; }

.article-body a {
  color: var(--brand-600);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--brand-800);
}

.article-body strong {
  color: #0f172a;
  font-weight: 600;
}

.article-body ul {
  list-style: disc;
  margin: 1.25em 0;
  padding-left: 1.625em;
}

.article-body ol {
  list-style: decimal;
  margin: 1.25em 0;
  padding-left: 1.625em;
}

.article-body li {
  margin: 0.5em 0;
}

.article-body li > ul,
.article-body li > ol {
  margin: 0.25em 0;
}

.article-body blockquote {
  border-left: 4px solid #b8cde9;
  padding-left: 1.25em;
  font-style: italic;
  color: #64748b;
  margin: 1.6em 0;
}

.article-body img {
  border-radius: 1rem;
  margin: 1.6em 0;
}

/* Lead image floated inline inside the text */
.article-body .lead-image {
  float: right;
  width: 42%;
  max-width: 340px;
  margin: 0.35em 0 1.25em 1.75em;
}

.article-body .lead-image img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(11, 31, 58, 0.25);
  margin: 0;
}

.article-body .lead-image figcaption {
  margin-top: 0.6em;
  font-size: 0.8em;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 640px) {
  .article-body .lead-image {
    float: none;
    width: 100%;
    max-width: none;
    margin: 1.6em 0;
  }
}

.article-body figure {
  margin: 1.6em 0;
}

.article-body figcaption {
  margin-top: 0.75em;
  font-size: 0.875em;
  color: #94a3b8;
  text-align: center;
}

.article-body code {
  background: #f1f5f9;
  color: #334155;
  font-weight: 500;
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  border-radius: 0.375rem;
}

.article-body pre {
  background: #0b1f3a;
  color: #f1f5f9;
  padding: 1.25em 1.5em;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: 0.875em;
  line-height: 1.7;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-weight: 400;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.875em;
}

.article-body th,
.article-body td {
  border: 1px solid #e2e8f0;
  padding: 0.6em 0.9em;
  text-align: left;
}

.article-body th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.article-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2em 0;
}

.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-img {
  min-height: 78vh;
}

.clip-slant {
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.chip {
  letter-spacing: 0.08em;
}

.timeline-dot::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 0.85rem;
  height: 0.85rem;
  background: var(--accent-500);
  border-radius: 9999px;
}

a, button { transition: all .2s ease; }

/* Mobile trust bar marquee */
@keyframes trust-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.trust-track:hover {
  animation-play-state: paused;
}

/* ===== Scroll Entrance Animations ===== */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-revealed {
  opacity: 1;
}

/* Animation variants */
[data-reveal="fade-up"] { transform: translateY(40px); }
[data-reveal="fade-up"].is-revealed { transform: translateY(0); }

[data-reveal="fade-down"] { transform: translateY(-40px); }
[data-reveal="fade-down"].is-revealed { transform: translateY(0); }

[data-reveal="fade-left"] { transform: translateX(-50px); }
[data-reveal="fade-left"].is-revealed { transform: translateX(0); }

[data-reveal="fade-right"] { transform: translateX(50px); }
[data-reveal="fade-right"].is-revealed { transform: translateX(0); }

[data-reveal="zoom-in"] { transform: scale(0.9); }
[data-reveal="zoom-in"].is-revealed { transform: scale(1); }

[data-reveal="zoom-out"] { transform: scale(1.08); }
[data-reveal="zoom-out"].is-revealed { transform: scale(1); }

[data-reveal="flip-up"] {
  transform: perspective(800px) rotateX(15deg) translateY(30px);
  transform-origin: top;
}
[data-reveal="flip-up"].is-revealed {
  transform: perspective(800px) rotateX(0) translateY(0);
}

[data-reveal="blur-in"] {
  transform: translateY(20px);
  filter: blur(10px);
}
[data-reveal="blur-in"].is-revealed {
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger delays */
[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"] { transition-delay: 0.4s; }
[data-reveal][data-delay="5"] { transition-delay: 0.5s; }
[data-reveal][data-delay="6"] { transition-delay: 0.6s; }
[data-reveal][data-delay="7"] { transition-delay: 0.7s; }
[data-reveal][data-delay="8"] { transition-delay: 0.8s; }

/* Backward compatibility with legacy .reveal class */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
