/* ============================================
   LOOPGATE CYCLE — Circular Guest Journey
   Dark Premium Design
   ============================================ */

:root {
  --lg-black: #0F1117;
  --lg-black2: #141820;
  --lg-black3: #1A1F2B;
  --lg-teal: #00BFA6;
  --lg-cyan: #00D4FF;
  --lg-silver: #E8E9EB;
  --lg-silver-m: #9EA1A8;
  --lg-silver-f: #5A5E68;
  --lg-gold: #FFD54F;
  --lg-purple: #BB86FC;
  --lg-magenta: #E040FB;
  --font-display: 'DM Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--lg-black);
  color: var(--lg-silver);
  min-height: 100dvh;
  overflow-x: hidden;
}

.teal { color: var(--lg-teal); }

/* ============================================
   HERO
   ============================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(80px + 3rem) 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0,191,166,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  max-width: min(600px, 88vw);
  height: auto;
  border-radius: 12px;
  position: relative;
}

.hero-tagline {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.2rem);
  color: var(--lg-silver-m);
  letter-spacing: 0.5px;
}

/* ============================================
   CYCLE SECTION — large circle, compact cards
   ============================================ */
.cycle-section {
  padding: 2rem 0 3rem;
  overflow-x: auto;
}

.cycle-wrapper {
  position: relative;
  width: 1200px;
  height: 1200px;
  margin: 0 auto;
}

/* Center hub */
.cycle-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
}

.center-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 2px solid rgba(0, 191, 166, 0.35);
  box-shadow: 0 0 60px rgba(0, 191, 166, 0.25), inset 0 0 40px rgba(0, 191, 166, 0.08);
  background: radial-gradient(circle, rgba(0,191,166,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.center-video {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.center-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.center-video-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(15,17,23,0.45) 0%, rgba(15,17,23,0.65) 70%, rgba(15,17,23,0.85) 100%);
}

.center-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.center-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.center-sub {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--lg-silver-m);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.center-desc {
  font-size: 0.65rem;
  color: var(--lg-silver-f);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Orbit ring */
.orbit-ring, .arrow-ring {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.arrow-ring {
  animation: slow-rotate 60s linear infinite;
}

@keyframes slow-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   NODES — 12 positions on a circle r=500
   Center at (600, 600)
   ============================================ */
.node {
  position: absolute;
  width: 155px;
  z-index: 5;
}

/* Positions calculated: center 600,600, radius 500, 30° increments, offset by card half-size */
/* Positions for 11 nodes (~32.7° increments), starting at top, clockwise */
.node-1  { left: 522px; top: 22px; }
.node-2  { left: 772px; top: 89px; }
.node-3  { left: 955px; top: 272px; }
.node-4  { left: 1022px; top: 522px; }
.node-5  { left: 955px; top: 772px; }
.node-6  { left: 772px; top: 955px; }
.node-7  { left: 522px; top: 1022px; }
.node-8  { left: 272px; top: 955px; }
.node-9  { left: 89px; top: 772px; }
.node-10  { left: 22px; top: 522px; }
.node-11  { left: 89px; top: 272px; }
.node-12  { left: 272px; top: 89px; }   /* 327° */

/* Node card */
.node-card {
  background: var(--lg-black2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), border-color 0.3s, box-shadow 0.3s;
  cursor: default;
}

.node-card:hover {
  transform: scale(1.08);
  z-index: 20;
}

[data-color="guest"] .node-card:hover { border-color: var(--lg-teal); box-shadow: 0 0 20px rgba(0,191,166,0.15); }
[data-color="system"] .node-card:hover { border-color: var(--lg-cyan); box-shadow: 0 0 20px rgba(0,212,255,0.15); }
[data-color="gamification"] .node-card:hover { border-color: var(--lg-gold); box-shadow: 0 0 20px rgba(255,213,79,0.15); }
[data-color="app"] .node-card:hover { border-color: var(--lg-purple); box-shadow: 0 0 20px rgba(187,134,252,0.15); }
[data-color="operator"] .node-card:hover { border-color: var(--lg-magenta); box-shadow: 0 0 20px rgba(224,64,251,0.15); }

.node-img-wrap {
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.node-img-wrap img,
.node-img-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.node-info {
  padding: 6px 8px 8px;
}

.node-num {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--lg-teal);
  letter-spacing: 1px;
}

[data-color="system"] .node-num { color: var(--lg-cyan); }
[data-color="gamification"] .node-num { color: var(--lg-gold); }
[data-color="app"] .node-num { color: var(--lg-purple); }
[data-color="operator"] .node-num { color: var(--lg-magenta); }

.node-info h3 {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin: 2px 0 2px;
}

.node-info p {
  font-size: 0.575rem;
  color: var(--lg-silver-m);
  line-height: 1.35;
  margin-bottom: 3px;
}

.node-module {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 500;
  color: var(--lg-silver-f);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.node-dot { display: none; }

/* ============================================
   LEGEND
   ============================================ */
.legend-section {
  padding: 0 1.5rem 2rem;
}

.legend-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--lg-silver-m);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================
   LINEAR FLOW (Mobile)
   ============================================ */
.linear-flow {
  display: none;
  padding: 2rem 1.25rem 3rem;
}

.linear-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 2rem;
}

.linear-steps {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.linear-step {
  width: 100%;
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--lg-black2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: border-color 0.3s;
}

.linear-step[data-color="guest"] { border-left: 3px solid rgba(0,191,166,0.4); }
.linear-step[data-color="system"] { border-left: 3px solid rgba(0,212,255,0.4); }
.linear-step[data-color="gamification"] { border-left: 3px solid rgba(255,213,79,0.4); }
.linear-step[data-color="app"] { border-left: 3px solid rgba(187,134,252,0.4); }
.linear-step[data-color="operator"] { border-left: 3px solid rgba(224,64,251,0.4); }

.linear-step img,
.linear-step video {
  width: 80px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.linear-info { flex: 1; min-width: 0; }

.linear-num {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--lg-teal);
  letter-spacing: 1px;
}

.linear-step[data-color="system"] .linear-num { color: var(--lg-cyan); }
.linear-step[data-color="gamification"] .linear-num { color: var(--lg-gold); }
.linear-step[data-color="app"] .linear-num { color: var(--lg-purple); }
.linear-step[data-color="operator"] .linear-num { color: var(--lg-magenta); }

.linear-info h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin: 1px 0 2px;
}

.linear-info p {
  font-size: 0.72rem;
  color: var(--lg-silver-m);
  line-height: 1.4;
  margin-bottom: 3px;
}

.linear-module {
  font-size: 0.6rem;
  color: var(--lg-silver-f);
}

.linear-arrow {
  padding: 0.3rem 0;
  display: flex;
  justify-content: center;
}

.linear-arrow svg { width: 20px; height: 20px; }

.linear-loop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(0,191,166,0.04);
  border: 1px solid rgba(0,191,166,0.15);
  border-radius: 12px;
  width: 100%;
  text-align: center;
}

.linear-loop svg { width: 36px; height: 36px; }

.linear-loop span {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lg-teal);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.footer p {
  font-size: 0.7rem;
  color: var(--lg-silver-f);
  margin-top: 0.4rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1280px) {
  .cycle-wrapper {
    transform: scale(0.75);
    transform-origin: top center;
    height: 900px;
  }
}

@media (max-width: 960px) {
  .cycle-wrapper {
    transform: scale(0.6);
    transform-origin: top center;
    height: 720px;
  }
}

@media (max-width: 768px) {
  .cycle-section { display: none; }
  .linear-flow { display: block; }
  .legend-section { padding: 1rem 1rem 2rem; }
  .legend-inner { gap: 0.75rem; }
  .legend-item { font-size: 0.65rem; }
  .hero { padding: 2rem 1rem 1.5rem; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.node {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1), transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.node.visible {
  opacity: 1;
  transform: scale(1);
}

.linear-step {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.linear-step.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  body { background: #fff; color: #1a1a1a; }
  .node, .linear-step { opacity: 1; transform: none; }
  .node-card { background: #f5f5f5; border-color: #ddd; }
  .node-info h3, .center-brand, .linear-info h3, .linear-title { color: #1a1a1a; }
  .teal { color: #00876f; }
  .cycle-wrapper { transform: none; height: 1200px; }
}
