/* Fetch Order Tracking — marketing site */

:root {
  --c-ink: #0b1020;
  --c-ink-2: #1e293b;
  --c-muted: #64748b;
  --c-line: #e2e8f0;
  --c-bg: #ffffff;
  --c-bg-alt: #f8fafc;
  --c-bg-dark: #0b1020;
  --c-primary: #6366f1;
  --c-primary-2: #4f46e5;
  --c-accent: #06b6d4;
  --c-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --c-gradient-soft: linear-gradient(135deg, rgba(99,102,241,.1) 0%, rgba(6,182,212,.1) 100%);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 24px 60px -20px rgba(99,102,241,.35);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--c-primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ========= Layout primitives ========= */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }
.section--dark {
  background: linear-gradient(180deg, #0b1020 0%, #131a36 100%);
  color: #e2e8f0;
}
.section--alt { background: var(--c-bg-alt); }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-primary-2);
  background: rgba(99,102,241,.08);
  padding: 6px 14px;
  border-radius: 999px;
}
.section--dark .eyebrow { color: #a5b4fc; background: rgba(165,180,252,.12); }

h1, h2, h3, h4 { color: var(--c-ink); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
h1 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; margin-top: 14px; }
h3 { font-size: 22px; font-weight: 700; }
p.lead { font-size: 18px; color: var(--c-muted); margin: 20px 0 0; max-width: 620px; }
.section--dark p.lead { color: #94a3b8; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head p.lead { margin: 18px auto 0; }

/* ========= Buttons ========= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  color: #fff;
  background: var(--c-gradient);
  box-shadow: var(--shadow-lg);
}
.btn-primary:hover { box-shadow: 0 26px 70px -20px rgba(99,102,241,.55); }
.btn-ghost {
  color: var(--c-ink);
  background: transparent;
  border-color: var(--c-line);
}
.btn-ghost:hover { background: var(--c-bg-alt); }
.section--dark .btn-ghost { color: #e2e8f0; border-color: rgba(255,255,255,.18); }
.section--dark .btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ========= Navigation ========= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,232,240,.6);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--c-ink); font-size: 18px; line-height: 1; }
.brand:hover { text-decoration: none; }
/* The logo is a wordmark image — let it size by HEIGHT, with width=auto so its
   aspect ratio is preserved. Was previously squashed into a 38×38 box. */
.brand .logo { display: inline-flex; align-items: center; }
.brand .logo img,
.brand .logo svg { height: 56px; width: auto; max-width: 100%; display: block; }
.footer .brand .logo img { height: 64px; width: auto; max-width: 240px; }
/* Footer sits on a dark background; give the logo a white card so it stays visible. */
.footer .brand .logo {
  background: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--c-ink-2); font-weight: 500; font-size: 15px;
}
.nav-links a:hover { color: var(--c-primary-2); text-decoration: none; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
/* Explicit color: a <button> does NOT inherit the page text color, so the
   stroke="currentColor" hamburger icon was rendering an invisible system default
   on mobile. Force a dark ink color so it's always visible. */
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: #0b1020; cursor: pointer; }
/* Explicit stroke too — a <button> doesn't inherit page text color, so the
   currentColor hamburger was rendering an invisible system default on mobile. */
.nav-toggle svg { width: 26px; height: 26px; stroke: #0b1020; color: #0b1020; }

/* ========= Hero ========= */
.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,.10), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 30%, rgba(6,182,212,.08), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 70px; align-items: center;
}
.hero h1 .grad {
  background: var(--c-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 19px; }
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 26px; color: var(--c-muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-trust .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: #fff; border: 1px solid var(--c-line); border-radius: 999px;
  font-weight: 500; color: var(--c-ink-2);
}
.hero-trust .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }

/* ========= Hero SVG (flow diagram) ========= */
.flow-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  overflow: hidden;
}
.flow-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--c-gradient-soft);
  opacity: .5; z-index: 0;
}
.flow-card > svg { position: relative; z-index: 1; width: 100%; height: auto; }

/* Animated flow */
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes flowDot {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.flow-svg .pipe {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawPath 1.6s ease-out forwards;
}
.flow-svg .pipe.delay-1 { animation-delay: .2s; }
.flow-svg .pipe.delay-2 { animation-delay: .5s; }
.flow-svg .pipe.delay-3 { animation-delay: .9s; }
.flow-svg .node-card { animation: float 5s ease-in-out infinite; }
.flow-svg .node-card.delay-a { animation-delay: .2s; }
.flow-svg .node-card.delay-b { animation-delay: 1s; }
.flow-svg .node-card.delay-c { animation-delay: 1.8s; }
.flow-svg .dot {
  animation: pulse 1.8s ease-in-out infinite;
}
.flow-svg .runner-1, .flow-svg .runner-2, .flow-svg .runner-3 {
  offset-rotate: 0deg;
  animation: flowDot 3s linear infinite;
  fill: #6366f1;
}
.flow-svg .runner-2 { animation-delay: 1s; fill: #06b6d4; }
.flow-svg .runner-3 { animation-delay: 2s; fill: #a855f7; }

/* ========= Features grid ========= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
  position: relative;
  overflow: hidden;
}
.feature::after {
  content: '';
  position: absolute; inset: auto -40% -40% auto;
  width: 160px; height: 160px;
  background: var(--c-gradient-soft);
  border-radius: 50%;
  opacity: 0; transition: opacity .3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(99,102,241,.4); }
.feature:hover::after { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--c-gradient-soft);
  display: grid; place-items: center;
  color: var(--c-primary-2);
  margin-bottom: 18px;
}
.feature h3 { margin: 0 0 8px; }
.feature p { color: var(--c-muted); margin: 0; font-size: 15px; }

/* ========= How it works ========= */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 50px;
}
.step {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
}
.step-num {
  font-size: 14px; font-weight: 700;
  color: #a5b4fc;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(99,102,241,.18);
  margin-bottom: 16px;
}
.step h3 { color: #fff; margin: 6px 0 10px; }
.step p { color: #94a3b8; margin: 0; font-size: 15px; }

/* ========= FAQ ========= */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 0 22px;
  margin-bottom: 12px;
  transition: box-shadow .2s, border-color .2s;
}
.faq details[open] { box-shadow: var(--shadow-md); border-color: rgba(99,102,241,.35); }
.faq summary {
  list-style: none;
  padding: 20px 0;
  font-weight: 600;
  font-size: 17px;
  color: var(--c-ink);
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 24px; color: var(--c-primary-2);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding-bottom: 22px; color: var(--c-muted); font-size: 15.5px; }
.faq .faq-body p { margin: 0; }

/* ========= CTA band ========= */
.cta-band {
  background: var(--c-gradient);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-band::before, .cta-band::after {
  content: '';
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.12);
  pointer-events: none;
}
.cta-band::before { top: -80px; left: -60px; width: 220px; height: 220px; }
.cta-band::after  { bottom: -100px; right: -60px; width: 280px; height: 280px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin: 14px auto 28px; max-width: 560px; }
.cta-band .btn-primary { background: #fff; color: var(--c-primary-2); box-shadow: none; }
.cta-band .btn-primary:hover { background: #f1f5f9; }

/* ========= Footer ========= */
.footer {
  background: #0b1020; color: #94a3b8;
  padding: 72px 0 28px;
}
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-block .brand { color: #fff; font-size: 20px; margin-bottom: 14px; }
.footer-brand-block p { font-size: 14px; line-height: 1.7; }
.footer a { color: #cbd5e1; font-size: 14px; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: #64748b;
}

/* ========= Blog cards ========= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,.4);
  text-decoration: none;
}
.post-cover {
  aspect-ratio: 16/9;
  background: var(--c-gradient);
  position: relative;
  overflow: hidden;
}
.post-cover svg { width: 100%; height: 100%; position: absolute; inset: 0; opacity: .9; }
.post-body { padding: 22px 24px; }
.post-tag { font-size: 12px; color: var(--c-primary-2); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.post-card h3 { margin: 10px 0; color: var(--c-ink); line-height: 1.3; }
.post-card p { color: var(--c-muted); font-size: 15px; margin: 0; }
.post-meta { color: var(--c-muted); font-size: 13px; margin-top: 14px; display: flex; gap: 12px; }

/* Article page */
.article {
  max-width: 760px; margin: 0 auto;
  font-size: 17px; line-height: 1.75; color: var(--c-ink-2);
}
.article h1 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 44px); }
.article .article-meta { color: var(--c-muted); font-size: 14px; margin-bottom: 30px; }
.article h2 { margin: 40px 0 12px; font-size: 26px; }
.article h3 { margin: 28px 0 10px; font-size: 20px; }
.article p { margin: 0 0 18px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article blockquote {
  border-left: 4px solid var(--c-primary);
  margin: 22px 0; padding: 8px 18px;
  background: var(--c-bg-alt);
  color: var(--c-ink-2);
  border-radius: 6px;
}
.article code {
  background: #f1f5f9; padding: 2px 8px; border-radius: 6px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 14px;
}
.article-hero {
  aspect-ratio: 21/9;
  background: var(--c-gradient);
  border-radius: var(--r-xl);
  margin-bottom: 30px;
  position: relative; overflow: hidden;
}
.article-hero svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }

/* ========= About page ========= */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value {
  border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 28px; background: #fff;
}
.value .value-icon { color: var(--c-primary); margin-bottom: 14px; }

.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px; text-align: center;
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--r-xl); padding: 36px 24px;
  margin-top: 32px;
}
.stat-num { font-size: 36px; font-weight: 800; background: var(--c-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lbl { color: var(--c-muted); font-size: 14px; margin-top: 4px; }

/* ========= Scroll reveal ========= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ========= Responsive ========= */

/* Tablet landscape and below (≤1024px) ----------------------------------- */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}

/* Tablet portrait + small laptop (≤900px) -------------------------------- */
@media (max-width: 900px) {
  /* Section + hero rhythm */
  .section { padding: 64px 0; }
  .section--tight { padding: 48px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero p.lead { font-size: 17px; }
  .section-head { margin: 0 auto 40px; }

  /* Grids collapse */
  .features-grid, .posts-grid, .values-grid, .pricing-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-band { grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .cta-band { padding: 40px 24px; }

  /* Logo shrinks slightly on tablet */
  .brand .logo img { height: 48px; }
  .footer .brand .logo img { height: 56px; }

  /* Hamburger nav */
  .nav-inner { padding: 14px 20px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0;
    padding: 12px 20px; border-bottom: 1px solid var(--c-line);
    display: none;
    box-shadow: 0 12px 32px rgba(15,23,42,.08);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line);
    width: 100%;
    font-size: 16px; /* better tap target */
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: block; min-width: 44px; min-height: 44px; }
  .nav-cta .btn-ghost { display: none; }
  .nav-cta .btn { padding: 10px 16px; font-size: 14px; }
}

/* Small tablet / large phone (≤640px) ----------------------------------- */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .section-head { margin: 0 auto 32px; }
  .steps { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr 1fr; padding: 20px 14px; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  /* CTAs full-width so they're tappable */
  .hero-cta { flex-direction: column; gap: 10px; align-items: stretch; }
  .hero-cta .btn { justify-content: center; padding: 14px 20px; }
  .cta-band-actions { flex-direction: column; gap: 10px; align-items: stretch; }
  .cta-band-actions .btn { justify-content: center; }

  /* Smaller hero leading */
  .hero p.lead { font-size: 16px; }

  /* Cards a touch tighter */
  .feature, .post-card, .pricing-card { padding: 22px 20px; }

  /* Stop tables overflowing horizontally */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Logo size adjustments for phone */
  .brand .logo img { height: 44px; }
  .footer .brand .logo img { height: 50px; }
}

/* Small phone (≤420px) -------------------------------------------------- */
@media (max-width: 420px) {
  .container { padding: 0 14px; }
  .section { padding: 40px 0; }
  .hero { padding: 36px 0 48px; }
  p.lead { font-size: 15px; }
  .stats-band { grid-template-columns: 1fr; }
  .btn { padding: 12px 18px; font-size: 14px; }
  .brand .logo img { height: 40px; }
}

/* Accessibility / motion -------------------------------------------------
   Honor the system-level "reduce motion" pref. Lighthouse flagged 7 non-
   composited animations; respecting prefers-reduced-motion at least
   removes the cost for users who opt in. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Tap-target hygiene — minimum 44×44 for buttons/links per WCAG 2.5.5 */
@media (pointer: coarse) {
  .btn, .nav-toggle, .nav-links a {
    min-height: 44px;
  }
}
