/* The TuitionDesk Journey — visual storytelling (Stripe/Linear-inspired) */
/* Uses brand tokens from styles.css — slate + mild blue, no rainbow accents */

.tj-page {
  --tj-glass: rgba(255, 255, 255, 0.72);
  --tj-glass-border: rgba(226, 232, 240, 0.9);
  --tj-glow: rgba(61, 110, 201, 0.35);
  --tj-ink: var(--primary-900, #0f172a);
  --tj-muted: var(--primary-600, #475569);
  --tj-accent: var(--accent-700, #3d6ec9);
  --tj-accent-soft: var(--accent-50, #f3f6fc);
  --tj-surface: #f6f7fb;
  --tj-dark: #0b1220;
  overflow-x: clip;
}

.tj-page .header {
  position: relative;
  z-index: 40;
}

/* —— Hero —— */
.tj-hero {
  position: relative;
  min-height: min(100vh, 920px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.25rem 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(61, 110, 201, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(61, 110, 201, 0.08), transparent 50%),
    linear-gradient(180deg, #eef2f8 0%, var(--tj-surface) 55%, #fff 100%);
  overflow: hidden;
}

.tj-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.tj-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1100px, 100%);
  text-align: center;
}

.tj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tj-accent);
  margin-bottom: 1rem;
}

.tj-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--tj-ink);
  margin: 0 0 1rem;
}

.tj-hero h1 span {
  background: linear-gradient(120deg, var(--tj-accent), #5b8fde 55%, var(--tj-ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tj-hero-sub {
  max-width: 34rem;
  margin: 0 auto 2.5rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
  color: var(--tj-muted);
}

.tj-ecosystem {
  position: relative;
  width: min(720px, 100%);
  height: min(420px, 58vw);
  margin: 0 auto;
}

.tj-eco-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff, var(--tj-accent-soft));
  border: 1px solid var(--tj-glass-border);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(61, 110, 201, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  z-index: 3;
}

.tj-eco-core img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.tj-eco-core strong {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--tj-ink);
}

.tj-eco-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tj-eco-line {
  fill: none;
  stroke: var(--tj-accent);
  stroke-width: 1.5;
  stroke-opacity: 0.35;
  stroke-dasharray: 4 6;
  animation: tj-dash 18s linear infinite;
}

.tj-eco-line.glow {
  stroke-opacity: 0.55;
  filter: drop-shadow(0 0 4px var(--tj-glow));
  animation-duration: 12s;
}

@keyframes tj-dash {
  to { stroke-dashoffset: -200; }
}

.tj-float {
  position: absolute;
  z-index: 2;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  background: var(--tj-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--tj-glass-border);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tj-ink);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  animation: tj-float-y 5.5s ease-in-out infinite;
}

.tj-float i {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--tj-accent-soft);
  color: var(--tj-accent);
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
}

.tj-float[data-pos="website"] { left: 6%; top: 12%; animation-delay: 0s; }
.tj-float[data-pos="whatsapp"] { right: 4%; top: 18%; animation-delay: 0.4s; }
.tj-float[data-pos="students"] { left: 0%; top: 48%; animation-delay: 0.8s; }
.tj-float[data-pos="parents"] { right: 0%; top: 46%; animation-delay: 1.1s; }
.tj-float[data-pos="teachers"] { left: 10%; bottom: 10%; animation-delay: 0.2s; }
.tj-float[data-pos="ai"] { right: 12%; bottom: 8%; animation-delay: 0.6s; }
.tj-float[data-pos="fees"] { left: 38%; top: 4%; animation-delay: 1.3s; }
.tj-float[data-pos="attendance"] { right: 36%; bottom: 2%; animation-delay: 0.9s; }

@keyframes tj-float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tj-scroll-hint {
  margin-top: 2.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400, #94a3b8);
}

.tj-scroll-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 36px;
  margin: 0.75rem auto 0;
  background: linear-gradient(to bottom, var(--tj-accent), transparent);
  animation: tj-pulse 1.8s ease-in-out infinite;
}

@keyframes tj-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* —— Section chrome —— */
.tj-section {
  position: relative;
  padding: 5rem 1.25rem;
}

.tj-section-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.tj-section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.tj-section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.025em;
  color: var(--tj-ink);
  margin: 0.35rem 0 0.75rem;
}

.tj-section-head p {
  max-width: 28rem;
  margin: 0 auto;
  color: var(--tj-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* —— Winding journey —— */
.tj-path-section {
  background: linear-gradient(180deg, #fff 0%, #f3f6fc 40%, #fff 100%);
  padding-bottom: 6rem;
}

.tj-path-wrap {
  position: relative;
  width: min(920px, 100%);
  margin: 0 auto;
  min-height: 2200px;
}

.tj-path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.tj-path-track {
  fill: none;
  stroke: #dbe4f5;
  stroke-width: 3;
  stroke-linecap: round;
}

.tj-path-progress {
  fill: none;
  stroke: var(--tj-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px var(--tj-glow));
  transition: stroke-dashoffset 0.05s linear;
}

.tj-stop {
  position: absolute;
  width: min(280px, 78vw);
  opacity: 0;
  transform: translateY(36px) scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.tj-stop.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tj-stop-card {
  padding: 1.15rem 1.25rem 1.25rem;
  border-radius: 20px;
  background: var(--tj-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--tj-glass-border);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tj-stop-illu {
  height: 88px;
  border-radius: 14px;
  margin-bottom: 0.85rem;
  background:
    linear-gradient(135deg, var(--tj-accent-soft), #fff 60%),
    radial-gradient(circle at 80% 20%, rgba(61, 110, 201, 0.25), transparent 50%);
  border: 1px solid #e8eef8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.tj-stop-illu svg {
  width: 72%;
  height: 70%;
}

.tj-stop-num {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--tj-accent);
  opacity: 0.8;
}

.tj-stop h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--tj-ink);
  letter-spacing: -0.01em;
}

.tj-stop p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--tj-muted);
}

/* Desktop zig-zag positions */
.tj-stop[data-i="0"] { top: 2%; left: 4%; }
.tj-stop[data-i="1"] { top: 10%; right: 2%; left: auto; }
.tj-stop[data-i="2"] { top: 19%; left: 6%; }
.tj-stop[data-i="3"] { top: 28%; right: 4%; left: auto; }
.tj-stop[data-i="4"] { top: 37%; left: 2%; }
.tj-stop[data-i="5"] { top: 46%; right: 0%; left: auto; }
.tj-stop[data-i="6"] { top: 55%; left: 8%; }
.tj-stop[data-i="7"] { top: 64%; right: 6%; left: auto; }
.tj-stop[data-i="8"] { top: 73%; left: 4%; }
.tj-stop[data-i="9"] { top: 82%; right: 2%; left: auto; }
.tj-stop[data-i="10"] { top: 91%; left: 50%; transform: translate(-50%, 36px) scale(0.96); }
.tj-stop[data-i="10"].is-in { transform: translate(-50%, 0) scale(1); }

/* —— Data flow / isometric —— */
.tj-flow-section {
  background: var(--tj-dark);
  color: #e2e8f0;
  overflow: hidden;
}

.tj-flow-section .tj-section-head h2 { color: #fff; }
.tj-flow-section .tj-section-head p { color: #94a3b8; }
.tj-flow-section .tj-eyebrow { color: #8eb0ef; }

.tj-iso {
  position: relative;
  height: min(480px, 70vw);
  max-width: 900px;
  margin: 0 auto;
}

.tj-iso-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tj-module {
  position: absolute;
  width: min(150px, 28vw);
  padding: 1rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.tj-module.is-in {
  opacity: 1;
  transform: translateY(0);
}

.tj-module strong {
  display: block;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.tj-module span {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
}

.tj-module .tj-mod-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.6rem;
  border-radius: 10px;
  background: rgba(61, 110, 201, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #c7d9f8;
}

.tj-module[data-m="0"] { left: 2%; top: 18%; }
.tj-module[data-m="1"] { left: 18%; top: 48%; transition-delay: 0.08s; }
.tj-module[data-m="2"] { left: 36%; top: 22%; transition-delay: 0.16s; }
.tj-module[data-m="3"] { left: 52%; top: 52%; transition-delay: 0.24s; }
.tj-module[data-m="4"] { left: 68%; top: 20%; transition-delay: 0.32s; }
.tj-module[data-m="5"] { left: 82%; top: 46%; transition-delay: 0.4s; }

.tj-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b93e0;
  box-shadow: 0 0 10px #3d6ec9;
  opacity: 0;
  pointer-events: none;
}

/* —— Roles —— */
.tj-roles-section {
  background: #fff;
}

.tj-role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.tj-role-card {
  appearance: none;
  border: 1px solid var(--gray-200, #e2e8f0);
  background: #fff;
  border-radius: 18px;
  padding: 1.25rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  font-family: inherit;
  color: inherit;
}

.tj-role-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tj-role-card.is-active {
  border-color: var(--tj-accent);
  box-shadow: 0 0 0 3px rgba(61, 110, 201, 0.15), var(--shadow-md);
}

.tj-role-card .tj-role-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tj-accent-soft);
  color: var(--tj-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.tj-role-card h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--tj-ink);
}

.tj-role-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--tj-muted);
  line-height: 1.4;
}

.tj-role-flow {
  position: relative;
  min-height: 160px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(61, 110, 201, 0.08), transparent 50%),
    linear-gradient(180deg, #f8fafc, #eef2f8);
  border: 1px solid var(--gray-200, #e2e8f0);
  padding: 1.75rem 1.25rem;
  overflow: hidden;
}

.tj-role-steps {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.35rem;
}

.tj-role-steps.is-active {
  display: flex;
  animation: tj-fade-up 0.45s ease;
}

@keyframes tj-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.tj-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tj-ink);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  opacity: 0;
  transform: translateY(8px);
}

.tj-role-steps.is-active .tj-chip {
  animation: tj-chip-in 0.45s ease forwards;
}

.tj-role-steps.is-active .tj-chip:nth-child(1) { animation-delay: 0.05s; }
.tj-role-steps.is-active .tj-chip:nth-child(2) { animation-delay: 0.12s; }
.tj-role-steps.is-active .tj-chip:nth-child(3) { animation-delay: 0.19s; }
.tj-role-steps.is-active .tj-chip:nth-child(4) { animation-delay: 0.26s; }
.tj-role-steps.is-active .tj-chip:nth-child(5) { animation-delay: 0.33s; }
.tj-role-steps.is-active .tj-chip:nth-child(6) { animation-delay: 0.4s; }
.tj-role-steps.is-active .tj-chip:nth-child(7) { animation-delay: 0.47s; }

@keyframes tj-chip-in {
  to { opacity: 1; transform: translateY(0); }
}

.tj-arrow {
  color: var(--tj-accent);
  font-size: 0.9rem;
  opacity: 0.5;
}

.tj-role-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--tj-muted);
}

/* —— Honeycomb industries —— */
.tj-industries {
  background: linear-gradient(180deg, #f8fafc, #fff);
}

.tj-honey {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  max-width: 820px;
  margin: 0 auto;
}

.tj-honey-card {
  width: min(170px, 44vw);
  aspect-ratio: 1;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  background: linear-gradient(145deg, #fff, var(--tj-accent-soft));
  border: none;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(61, 110, 201, 0.12);
  transition: transform 0.3s ease, filter 0.3s ease;
  text-align: center;
}

.tj-honey-card:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 24px rgba(61, 110, 201, 0.2));
}

.tj-honey-card .tj-hex-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--tj-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.tj-honey-card strong {
  font-size: 0.8rem;
  color: var(--tj-ink);
  line-height: 1.25;
}

/* —— Finale —— */
.tj-finale {
  position: relative;
  padding: 6rem 1.25rem 8rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(61, 110, 201, 0.18), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #132036 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.tj-finale-orbit {
  position: relative;
  width: min(560px, 92vw);
  height: min(320px, 55vw);
  margin: 0 auto 2.5rem;
}

.tj-finale-orbit svg {
  width: 100%;
  height: 100%;
}

.tj-finale-node {
  position: absolute;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.tj-finale-node[data-n="0"] { left: 0; top: 42%; }
.tj-finale-node[data-n="1"] { left: 18%; top: 12%; }
.tj-finale-node[data-n="2"] { left: 42%; top: 8%; }
.tj-finale-node[data-n="3"] { right: 14%; top: 18%; }
.tj-finale-node[data-n="4"] { right: 0; top: 48%; }

.tj-finale h2 {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  line-height: 1.15;
}

.tj-finale .btn-primary {
  display: inline-flex;
  margin: 0 0.35rem 0.5rem;
}

.tj-finale .btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.tj-finale .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tj-stat-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.tj-stat {
  text-align: center;
}

.tj-stat b {
  display: block;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.tj-stat span {
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .tj-role-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tj-path-wrap {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .tj-path-svg {
    display: none;
  }

  .tj-stop {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100%;
    transform: translateY(24px);
  }

  .tj-stop[data-i="10"] {
    transform: translateY(24px);
  }

  .tj-stop.is-in,
  .tj-stop[data-i="10"].is-in {
    transform: translateY(0);
  }

  .tj-module {
    width: 42%;
  }

  .tj-module[data-m="0"] { left: 4%; top: 8%; }
  .tj-module[data-m="1"] { left: 52%; top: 8%; }
  .tj-module[data-m="2"] { left: 4%; top: 38%; }
  .tj-module[data-m="3"] { left: 52%; top: 38%; }
  .tj-module[data-m="4"] { left: 4%; top: 68%; }
  .tj-module[data-m="5"] { left: 52%; top: 68%; }
}

@media (max-width: 560px) {
  .tj-hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .tj-ecosystem {
    height: 340px;
  }

  .tj-float {
    font-size: 0.7rem;
    padding: 0.45rem 0.6rem;
  }

  .tj-float[data-pos="fees"],
  .tj-float[data-pos="attendance"] {
    display: none;
  }

  .tj-role-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tj-arrow {
    display: none;
  }

  .tj-finale-node {
    font-size: 0.65rem;
    padding: 0.35rem 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tj-float,
  .tj-eco-line,
  .tj-scroll-hint::after,
  .tj-particle {
    animation: none !important;
  }

  .tj-stop,
  .tj-module,
  .tj-chip {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .tj-path-progress {
    stroke-dashoffset: 0 !important;
  }
}
