:root {
  --credaris-navy: #0b1f3b;
  --credaris-gold: #c8a044;
  --credaris-gray: #6b7280;
  --credaris-light: #f3f4f6;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--credaris-gray);
}

.text-navy {
  color: var(--credaris-navy);
}

.bg-grid {
  background-image: linear-gradient(
      rgba(11, 31, 59, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(11, 31, 59, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-glow {
  background: radial-gradient(
    ellipse 80% 60% at 70% 20%,
    rgba(200, 160, 68, 0.12),
    transparent 55%
  );
}

/* Hero credit flow graph (orchestration) */
.hero-credit-flow {
  position: relative;
  min-height: 300px;
  /* Safe inset so centered nodes (translate -50%) never clip under overflow-hidden card */
  padding: 0.875rem 1.25rem 1.125rem;
  z-index: 0;
}

.hero-credit-flow__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-credit-flow__glow {
  animation: ccf-glow-breathe 3.6s ease-in-out infinite;
}

.hero-credit-flow__dash {
  stroke-dasharray: 6 12;
  filter: drop-shadow(0 0 5px rgba(200, 160, 68, 0.35));
  animation: ccf-dash-flow 2s linear infinite;
}

.hero-credit-flow__dash.ccf-dash--gsap {
  animation: none;
}

.hero-credit-flow__track {
  opacity: 0.92;
}

@keyframes ccf-dash-flow {
  to {
    stroke-dashoffset: -120;
  }
}

@keyframes ccf-glow-breathe {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-credit-flow__dash {
    animation: none;
  }

  .hero-credit-flow__glow {
    animation: none;
  }
}

.ccf-node {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 7.25rem;
  max-width: 8.5rem;
  padding: 0.6rem 0.75rem 0.65rem;
  text-align: left;
  border-radius: 0.75rem;
  border: 1px solid rgba(200, 160, 68, 0.35);
  background: linear-gradient(145deg, rgba(26, 34, 56, 0.95), rgba(15, 22, 41, 0.98));
  box-shadow: 0 0 18px rgba(200, 160, 68, 0.12);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  appearance: none;
  font: inherit;
  color: #fff;
}

.ccf-node:hover {
  transform: translate(-50%, -50%) scale(1.03);
  box-shadow: 0 0 28px rgba(200, 160, 68, 0.28);
  border-color: rgba(200, 160, 68, 0.65);
}

.ccf-node--bump {
  animation: ccf-bump 0.45s ease;
}

@keyframes ccf-bump {
  50% {
    transform: translate(-50%, -50%) scale(1.045);
  }
}

.ccf-node--flash {
  background: linear-gradient(145deg, rgba(200, 160, 68, 0.35), rgba(11, 31, 59, 0.98)) !important;
  border-color: rgba(200, 160, 68, 0.85) !important;
}

.ccf-node--flow-hot {
  box-shadow: 0 0 24px rgba(200, 160, 68, 0.4);
  border-color: rgba(200, 160, 68, 0.72);
}

.ccf-node--api.ccf-node--flow-hot {
  box-shadow: 0 0 32px rgba(200, 160, 68, 0.48);
  border-color: rgba(200, 160, 68, 0.78);
}

.ccf-node__kicker {
  display: block;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 160, 68, 0.95);
}

.ccf-node__title {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: #f8fafc;
}

.ccf-node--api {
  border-color: rgba(200, 160, 68, 0.55);
  background: linear-gradient(135deg, #0b1f3b 0%, #132f52 100%);
  box-shadow: 0 8px 28px rgba(11, 31, 59, 0.45);
}

.ccf-node--api .ccf-node__title {
  color: #fff;
}

.ccf-node__pulse {
  position: absolute;
  inset: -3px;
  border-radius: 0.8rem;
  border: 2px solid rgba(200, 160, 68, 0.45);
  pointer-events: none;
  opacity: 0.35;
  animation: ccf-engine-ring 2.2s ease-in-out infinite;
}

@keyframes ccf-engine-ring {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccf-node__pulse {
    animation: none;
    opacity: 0.35;
  }
}

/* Ingress + API share a short horizontal segment on the SVG — keep boxes compact & layered */
.ccf-node--user,
.ccf-node--api {
  min-width: 4.5rem;
  max-width: 5.5rem;
  padding: 0.42rem 0.48rem 0.48rem;
}

.ccf-node--user {
  left: 13.85%;
  top: 50%;
  z-index: 3;
}

.ccf-node--api {
  left: 30.15%;
  top: 50%;
  z-index: 4;
}

.ccf-node--bank {
  left: 63%;
  top: 22.5%;
}

.ccf-node--nbfc {
  left: 63%;
  top: 77.5%;
}

.ccf-node--out {
  left: 79.2%;
  top: 50%;
}

/* Hero graph: compact on phones so animation stays visible & readable */
@media (max-width: 639px) {
  .hero-credit-flow--responsive {
    min-height: 248px;
    padding: 0.6rem 0.55rem 0.85rem;
  }

  .hero-credit-flow--responsive .hero-credit-flow__svg path.hero-credit-flow__glow {
    stroke-width: 3.25;
  }

  .hero-credit-flow--responsive .hero-credit-flow__svg .hero-credit-flow__track,
  .hero-credit-flow--responsive .hero-credit-flow__svg .hero-credit-flow__dash {
    stroke-width: 1.85;
  }

  .hero-credit-flow--responsive .ccf-node {
    min-width: 5.25rem;
    max-width: 6.75rem;
    padding: 0.4rem 0.45rem 0.48rem;
    border-radius: 0.65rem;
    touch-action: manipulation;
  }

  .hero-credit-flow--responsive .ccf-node__kicker {
    font-size: 0.45rem;
    letter-spacing: 0.1em;
  }

  .hero-credit-flow--responsive .ccf-node__title {
    font-size: 0.56rem;
    line-height: 1.15;
  }

  .hero-credit-flow--responsive .ccf-node__pulse {
    inset: -2px;
    border-width: 1.5px;
  }
}

/* Partner ecosystem orbit (light surface, brand gold + navy) */
.partner-eco__stage {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.partner-eco__svg {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  pointer-events: none;
  z-index: 0;
}

.partner-eco__ring-outer {
  stroke: rgba(200, 160, 68, 0.22);
  stroke-width: 1.15;
  stroke-dasharray: 3 8;
  vector-effect: non-scaling-stroke;
}

.partner-eco__spoke {
  stroke: rgba(200, 160, 68, 0.34);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.88;
}

.partner-eco__orbit {
  position: absolute;
  inset: 0;
  z-index: 1;
  animation: partner-eco-spin 28s linear infinite;
}

.partner-eco__slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7.5rem;
  margin-left: -3.75rem;
  transform-origin: center center;
  transform: rotate(var(--a)) translateY(-6.25rem);
}

@media (min-width: 400px) {
  .partner-eco__slot {
    transform: rotate(var(--a)) translateY(-7.25rem);
  }
}

@media (min-width: 640px) {
  .partner-eco__slot {
    transform: rotate(var(--a)) translateY(-8.25rem);
  }
}

/* Slightly tighter orbit when embedded in home “Connected ecosystem” column */
.partner-eco.partner-eco--home .partner-eco__slot {
  transform: rotate(var(--a)) translateY(-5.5rem);
}

@media (min-width: 400px) {
  .partner-eco.partner-eco--home .partner-eco__slot {
    transform: rotate(var(--a)) translateY(-6.35rem);
  }
}

@media (min-width: 640px) {
  .partner-eco.partner-eco--home .partner-eco__slot {
    transform: rotate(var(--a)) translateY(-7.35rem);
  }
}

.partner-eco.partner-eco--home .partner-eco__core {
  width: 5.5rem;
  height: 5.5rem;
  margin: -2.75rem 0 0 -2.75rem;
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .partner-eco.partner-eco--home .partner-eco__core {
    width: 6.25rem;
    height: 6.25rem;
    margin: -3.125rem 0 0 -3.125rem;
    font-size: 0.8rem;
  }
}

.partner-eco__node-rotate {
  animation: partner-eco-counter 28s linear infinite;
}

.partner-eco__node {
  display: block;
  width: 100%;
  padding: 0.5rem 0.4rem;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  color: #0b1f3b;
  cursor: pointer;
  border-radius: 0.7rem;
  border: 1.5px solid rgba(200, 160, 68, 0.38);
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(11, 31, 59, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

@media (min-width: 640px) {
  .partner-eco__node {
    font-size: 0.7rem;
    padding: 0.5rem 0.5rem;
  }
}

.partner-eco__node:hover {
  transform: scale(1.05);
  border-color: rgba(200, 160, 68, 0.65);
  background: #fffef8;
  box-shadow: 0 4px 20px rgba(200, 160, 68, 0.18);
}

.partner-eco__node--flash {
  border-color: rgba(200, 160, 68, 0.95) !important;
  background: #fffef5 !important;
  box-shadow: 0 0 0 2px rgba(200, 160, 68, 0.35), 0 6px 24px rgba(200, 160, 68, 0.22) !important;
}

.partner-eco__core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6.25rem;
  height: 6.25rem;
  margin: -3.125rem 0 0 -3.125rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fdf6e3, #c8a044 42%, #0b1f3b 125%);
  border: 2px solid rgba(200, 160, 68, 0.55);
  box-shadow: 0 4px 28px rgba(200, 160, 68, 0.28);
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 1px 4px rgba(11, 31, 59, 0.35);
}

@media (min-width: 640px) {
  .partner-eco__core {
    width: 7rem;
    height: 7rem;
    margin: -3.5rem 0 0 -3.5rem;
    font-size: 0.875rem;
  }
}

.partner-eco__core-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(200, 160, 68, 0.4);
  pointer-events: none;
  animation: partner-eco-core-pulse 2.8s ease-in-out infinite;
}

.partner-eco__core-text {
  position: relative;
  z-index: 1;
}

.partner-eco__particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.partner-eco__particle {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: #c8a044;
  box-shadow: 0 0 8px rgba(200, 160, 68, 0.85);
  opacity: 0.95;
  transition: left 2.5s ease-in, top 2.5s ease-in, opacity 2.5s ease-in;
}

.partner-eco__particle--navy {
  background: #0b1f3b;
  box-shadow: 0 0 7px rgba(11, 31, 59, 0.35);
}

.partner-eco__particle.partner-eco__particle--to-center {
  left: 50% !important;
  top: 50% !important;
  opacity: 0;
}

@keyframes partner-eco-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes partner-eco-counter {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes partner-eco-core-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-eco__orbit {
    animation: none;
  }

  .partner-eco__node-rotate {
    animation: none;
  }

  .partner-eco__core-pulse {
    animation: none;
    opacity: 0.55;
  }
}

/* Blog */
.blog-prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #374151;
}

.blog-prose p {
  margin-bottom: 1.25rem;
}

.blog-prose h2 {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--credaris-navy);
  margin: 2rem 0 1rem;
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 1.25rem 1.25rem;
}

.blog-card-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* About page — team headshots (aspect box + absolute img; works without Tailwind in edge cases) */
.about-team-photo-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: min(100%, 20rem);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .about-team-photo-wrap {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

.about-team-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Ecosystem — connected flow (light, brand) */
.ecosystem-flow--light .ecosystem-flow__bg-pattern {
  background: radial-gradient(ellipse 90% 45% at 50% 0%, rgba(200, 160, 68, 0.07) 0%, transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.ecosystem-flow__stage {
  position: relative;
  isolation: isolate;
}

.ecosystem-flow__ring-stroke {
  stroke: rgba(200, 160, 68, 0.28);
}

/* Text inside circles: never overflow */
.ecosystem-flow__orb-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  word-break: break-word;
  line-height: 1.1;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: inherit;
  padding: 0 0.2rem;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .ecosystem-flow__orb-text {
    font-size: 0.625rem;
  }
}

.ecosystem-flow__orb {
  width: 2.875rem;
  height: 2.875rem;
  min-width: 0;
  flex-shrink: 0;
  overflow: hidden;
  border-width: 1.5px;
  border-style: solid;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .ecosystem-flow__orb {
    width: 3.125rem;
    height: 3.125rem;
  }
}

/* Ingress — navy ring, soft gold fill */
.ecosystem-flow__orb--ingress {
  background: linear-gradient(160deg, #fffdf9, rgba(200, 160, 68, 0.12));
  border-color: rgba(11, 31, 59, 0.35);
  color: #0b1f3b;
  width: 3.25rem;
  height: 3.25rem;
  box-shadow: 0 2px 8px rgba(11, 31, 59, 0.08);
}

.ecosystem-flow__orb--ingress .ecosystem-flow__orb-text {
  font-size: 0.5rem;
  letter-spacing: 0.02em;
  -webkit-line-clamp: 1;
}

@media (min-width: 640px) {
  .ecosystem-flow__orb--ingress {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* Channel — white + navy border, gold hairline on pulse */
.ecosystem-flow__orb--chan {
  background: #ffffff;
  border-color: rgba(11, 31, 59, 0.18);
  color: #0b1f3b;
  box-shadow: 0 1px 3px rgba(11, 31, 59, 0.06);
}

/* Lender — gold tint ring */
.ecosystem-flow__orb--lender {
  background: linear-gradient(165deg, #ffffff, rgba(200, 160, 68, 0.08));
  border-color: rgba(200, 160, 68, 0.55);
  color: #0b1f3b;
  box-shadow: 0 1px 3px rgba(200, 160, 68, 0.12);
}

.ecosystem-flow__core {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  padding: 0.4rem 0.35rem;
  background: linear-gradient(145deg, #fdf6e3, #c8a044 45%, #0b1f3b 130%);
  border: 2px solid rgba(200, 160, 68, 0.55);
  box-shadow: 0 4px 20px rgba(200, 160, 68, 0.25);
  animation: ecosystem-core-breathe 2.2s ease-in-out infinite;
  overflow: hidden;
}

@media (min-width: 640px) {
  .ecosystem-flow__core {
    width: 6.5rem;
    height: 6.5rem;
    padding: 0.5rem 0.45rem;
  }
}

.ecosystem-flow__core-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  line-height: 1.15;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(11, 31, 59, 0.45);
}

@media (min-width: 640px) {
  .ecosystem-flow__core-line {
    font-size: 0.75rem;
  }
}

.ecosystem-flow__core-line--sub {
  margin-top: 0.1rem;
  font-weight: 600;
  font-size: 0.55rem;
  opacity: 0.92;
  -webkit-line-clamp: 1;
  color: #fff;
}

@media (min-width: 640px) {
  .ecosystem-flow__core-line--sub {
    font-size: 0.6rem;
  }
}

.ecosystem-flow__orb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.4rem;
  max-width: 11.5rem;
  margin: 0 auto;
  justify-items: center;
}

@media (min-width: 1024px) {
  .ecosystem-flow__orb-grid {
    max-width: none;
    width: 100%;
  }
}

.ecosystem-flow__orb-cell {
  display: flex;
  justify-content: center;
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ecosystem-flow__core {
    animation: none;
  }
}

@keyframes ecosystem-core-breathe {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(200, 160, 68, 0.22);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 28px rgba(200, 160, 68, 0.38);
    transform: scale(1.04);
  }
}

.ecosystem-flow__dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  z-index: 5;
}

/* Flow particles — brand gold (primary) / navy (alternate) */
.ecosystem-flow__dot--path {
  background: #c8a044;
  box-shadow: 0 0 8px rgba(200, 160, 68, 0.85);
}

.ecosystem-flow__dot--route {
  background: #0b1f3b;
  box-shadow: 0 0 6px rgba(11, 31, 59, 0.45);
}

/* Orb idle pulse — subtle gold on white */
.ecosystem-flow__orb--ingress,
.ecosystem-flow__orb--chan,
.ecosystem-flow__orb--lender {
  animation: ecosystem-orb-breathe 2.4s ease-in-out infinite;
  animation-delay: var(--orb-delay, 0s);
  will-change: transform, box-shadow;
}

@media (prefers-reduced-motion: reduce) {
  .ecosystem-flow__orb--ingress,
  .ecosystem-flow__orb--chan,
  .ecosystem-flow__orb--lender {
    animation: none;
  }
}

@keyframes ecosystem-orb-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 1px 3px rgba(11, 31, 59, 0.06);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 1px rgba(200, 160, 68, 0.35), 0 3px 10px rgba(200, 160, 68, 0.15);
  }
}
